mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
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:
parent
f8616ed54b
commit
ad1802188d
@ -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',
|
||||
|
@ -1 +1,2 @@
|
||||
// Mock script for background extension
|
||||
// Mock script for background extension
|
||||
window.MAGIC = 42;
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user