diff --git a/lib/Launcher.js b/lib/Launcher.js index 3e5f5031308..86e425bd532 100644 --- a/lib/Launcher.js +++ b/lib/Launcher.js @@ -42,6 +42,7 @@ const DEFAULT_ARGS = [ '--disable-backgrounding-occluded-windows', '--disable-breakpad', '--disable-client-side-phishing-detection', + '--disable-component-extensions-with-background-pages', '--disable-default-apps', '--disable-dev-shm-usage', '--disable-extensions', diff --git a/test/assets/simple-extension/index.js b/test/assets/simple-extension/index.js index a87bdeed16b..a0bb3f4eae7 100644 --- a/test/assets/simple-extension/index.js +++ b/test/assets/simple-extension/index.js @@ -1 +1,2 @@ -// Mock script for background extension \ No newline at end of file +// Mock script for background extension +window.MAGIC = 42; diff --git a/test/headful.spec.js b/test/headful.spec.js index 965fc2431f4..59bc00798c5 100644 --- a/test/headful.spec.js +++ b/test/headful.spec.js @@ -73,6 +73,7 @@ module.exports.addTests = function({testRunner, expect, puppeteer, defaultBrowse const backgroundPageTarget = await waitForBackgroundPageTarget(browserWithExtension); const page = await backgroundPageTarget.page(); expect(await page.evaluate(() => 2 * 3)).toBe(6); + expect(await page.evaluate(() => window.MAGIC)).toBe(42); await browserWithExtension.close(); }); it('should have default url when launching browser', async function() {