diff --git a/gulpfile.js b/gulpfile.js index 90cebf19a62bab..eb6ac14b649812 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -436,6 +436,9 @@ function createTestSource(testsName, bot) { if (bot) { args.push("--strictVerify"); } + if (process.argv.includes("--noChrome")) { + args.push("--noChrome"); + } var testProcess = startNode(args, { cwd: TEST_DIR, stdio: "inherit" }); testProcess.on("close", function (code) { @@ -454,6 +457,10 @@ function makeRef(done, bot) { if (bot) { args.push("--noPrompts", "--strictVerify"); } + if (process.argv.includes("--noChrome")) { + args.push("--noChrome"); + } + var testProcess = startNode(args, { cwd: TEST_DIR, stdio: "inherit" }); testProcess.on("close", function (code) { done(); diff --git a/test/test.js b/test/test.js index d4d235d348b829..0540ee8fdef87c 100644 --- a/test/test.js +++ b/test/test.js @@ -43,6 +43,7 @@ function parseOptions() { "fontTest", "noPrompts", "noDownload", + "noChrome", "downloadOnly", "strictVerify", ]) @@ -77,6 +78,7 @@ function parseOptions() { .describe("unitTest", "Run the unit tests.") .describe("fontTest", "Run the font tests.") .describe("noDownload", "Skips test PDFs downloading.") + .describe("noChrome", "Skip Chrome when running tests.") .describe("downloadOnly", "Download test PDFs without running the tests.") .describe("strictVerify", "Error if verifying the manifest files fails.") .describe("statsFile", "The file where to store stats.") @@ -798,8 +800,10 @@ async function startBrowser(browserName, startUrl) { } function startBrowsers(rootUrl, initSessionCallback) { + const browserNames = options.noChrome ? ["firefox"] : ["firefox", "chrome"]; + sessions = []; - for (const browserName of ["chrome", "firefox"]) { + for (const browserName of browserNames) { // The session must be pushed first and augmented with the browser once // it's initialized. The reason for this is that browser initialization // takes more time when the browser is not found locally yet and we don't