fix(launcher): disable component extensions (#4704)

Chrome has a set of component extensions - e.g. CryptoTokenExtension
that helps with 2FA.

These extensions are loaded regardless of the `--disable-extensions`
flag we already pass. To disable these extensions, we need to pass additional
`--disable-component-extensions-with-background-pages` flag.

Fix #4300
This commit is contained in:
Andrey Lushnikov 2019-07-15 17:54:42 -07:00 committed by GitHub
parent f8616ed54b
commit ad1802188d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View File

@ -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',

View File

@ -1 +1,2 @@
// Mock script for background extension
// Mock script for background extension
window.MAGIC = 42;

View File

@ -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() {