-
-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #604 from marp-team/wsl2-mirrored-network
Find Chrome and Edge from the host Windows as fallback when WSL 2 is mirrored network mode
- Loading branch information
Showing
11 changed files
with
286 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,27 @@ | ||
import { launch } from 'puppeteer-core' | ||
import type { | ||
Browser as PuppeteerBrowser, | ||
PuppeteerLaunchOptions, | ||
} from 'puppeteer-core' | ||
import { Browser } from '../browser' | ||
import type { BrowserKind, BrowserProtocol } from '../browser' | ||
|
||
export class FirefoxBrowser extends Browser { | ||
static readonly kind: BrowserKind = 'firefox' | ||
static readonly protocol: BrowserProtocol = 'webDriverBiDi' | ||
|
||
protected async launchPuppeteer( | ||
opts: PuppeteerLaunchOptions | ||
): Promise<PuppeteerBrowser> { | ||
return await launch( | ||
await this.generateLaunchOptions({ | ||
...opts, | ||
|
||
// NOTE: Currently Windows path is incompatible with Puppeteer's preparing | ||
userDataDir: (await this.browserInWSLHost()) | ||
? undefined | ||
: await this.puppeteerDataDir(), | ||
}) | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.