Skip to content

Commit

Permalink
force chrome on WebGPU tests (#16040)
Browse files Browse the repository at this point in the history
  • Loading branch information
RaananW authored Jan 6, 2025
1 parent 4b27b68 commit e2b4360
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default defineConfig({
{
name: "webgpu",
testMatch: "**/*webgpu.test.ts",
use: getUseDefinition("WebGPU"),
use: getUseDefinition("WebGPU", "Chrome", false, true),
},
{
name: "interaction",
Expand Down Expand Up @@ -100,7 +100,7 @@ export default defineConfig({
snapshotPathTemplate: "packages/tools/tests/test/visualization/ReferenceImages/{arg}{ext}",
});

function getUseDefinition(title: string, browser = browserType, noBrowserStack = false) {
function getUseDefinition(title: string, browser = browserType, noBrowserStack = false, forceChromeInsteadOfChromium = forceChrome) {
const args = browser === "Chrome" ? ["--use-angle=default", "--js-flags=--expose-gc"] : browser === "Firefox" ? ["-wait-for-browser"] : [];
args.push(...customFlags);
if (noBrowserStack) {
Expand All @@ -112,7 +112,7 @@ function getUseDefinition(title: string, browser = browserType, noBrowserStack =
},
};
}
return forceChrome
return forceChromeInsteadOfChromium && browserType !== "BrowserStack"
? {
// use real chrome (not chromium) for webgpu tests
channel: "chrome",
Expand Down

0 comments on commit e2b4360

Please sign in to comment.