Skip to content

Commit

Permalink
Bidi: Browser.Process (#2836)
Browse files Browse the repository at this point in the history
  • Loading branch information
kblok authored Dec 4, 2024
1 parent 8d9816d commit dba0f89
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
},
{
"comment": "This is part of organizing the webdriver bidi implementation, We will remove it one by one",
"testIdPattern": "[browser.spec] *Browser.process*",
"testIdPattern": "[browser.spec] *should not return child_process for remote browser*",
"platforms": [
"darwin",
"linux",
Expand Down
5 changes: 3 additions & 2 deletions lib/PuppeteerSharp/Bidi/BidiBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,8 @@ public override async Task<IBrowserContext> CreateBrowserContextAsync(BrowserCon
internal static async Task<BidiBrowser> CreateAsync(
BiDiDriver driver,
LaunchOptions options,
ILoggerFactory loggerFactory)
ILoggerFactory loggerFactory,
LauncherBase launcher)
{
var session = await Session.FromAsync(
driver,
Expand All @@ -164,7 +165,7 @@ await session.SubscribeAsync(
? SubscribeModules
: [.. SubscribeModules, .. SubscribeCdpEvents]).ConfigureAwait(false);

var browser = new BidiBrowser(session.Browser, options, loggerFactory);
var browser = new BidiBrowser(session.Browser, options, loggerFactory) { Launcher = launcher };
browser.InitializeAsync();
return browser;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/PuppeteerSharp/Launcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public async Task<IBrowser> LaunchAsync(LaunchOptions options)
{
var driver = new BiDiDriver(TimeSpan.FromMilliseconds(options.ProtocolTimeout));
await driver.StartAsync(Process.EndPoint + "/session").ConfigureAwait(false);
browser = await BidiBrowser.CreateAsync(driver, options, _loggerFactory).ConfigureAwait(false);
browser = await BidiBrowser.CreateAsync(driver, options, _loggerFactory, Process).ConfigureAwait(false);
}
else
{
Expand Down

0 comments on commit dba0f89

Please sign in to comment.