mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix(firefox): isolate ignoreHTTPSErrors setting between contexts (#1617)
This commit is contained in:
parent
c2617c090a
commit
c218d8c25f
@ -9,7 +9,7 @@
|
||||
"main": "index.js",
|
||||
"playwright": {
|
||||
"chromium_revision": "754895",
|
||||
"firefox_revision": "1062",
|
||||
"firefox_revision": "1067",
|
||||
"webkit_revision": "1185"
|
||||
},
|
||||
"scripts": {
|
||||
|
||||
@ -92,14 +92,12 @@ export class FFBrowser extends platform.EventEmitter implements Browser {
|
||||
const { browserContextId } = await this._connection.send('Browser.createBrowserContext', {
|
||||
userAgent: options.userAgent,
|
||||
bypassCSP: options.bypassCSP,
|
||||
ignoreHTTPSErrors: options.ignoreHTTPSErrors,
|
||||
javaScriptDisabled: options.javaScriptEnabled === false ? true : undefined,
|
||||
viewport,
|
||||
locale: options.locale,
|
||||
removeOnDetach: true
|
||||
});
|
||||
// TODO: move ignoreHTTPSErrors to browser context level.
|
||||
if (options.ignoreHTTPSErrors)
|
||||
await this._connection.send('Browser.setIgnoreHTTPSErrors', { enabled: true });
|
||||
const context = new FFBrowserContext(this, browserContextId, options);
|
||||
await context._initialize();
|
||||
this._contexts.set(browserContextId, context);
|
||||
|
||||
@ -32,7 +32,7 @@ module.exports.describe = function({testRunner, expect, defaultBrowserOptions, p
|
||||
expect(response.ok()).toBe(true);
|
||||
await context.close();
|
||||
});
|
||||
it.fail(FFOX)('should isolate contexts', async({browser, httpsServer}) => {
|
||||
it('should isolate contexts', async({browser, httpsServer}) => {
|
||||
{
|
||||
let error = null;
|
||||
const context = await browser.newContext({ ignoreHTTPSErrors: true });
|
||||
@ -57,7 +57,7 @@ module.exports.describe = function({testRunner, expect, defaultBrowserOptions, p
|
||||
});
|
||||
const context = await browser.newContext({ ignoreHTTPSErrors: true });
|
||||
const page = await context.newPage();
|
||||
await page.goto(httpsServer.PREFIX + '/mixedcontent.html', {waitUntil: 'load'});
|
||||
await page.goto(httpsServer.PREFIX + '/mixedcontent.html', {waitUntil: 'domcontentloaded'});
|
||||
expect(page.frames().length).toBe(2);
|
||||
// Make sure blocked iframe has functional execution context
|
||||
// @see https://github.com/GoogleChrome/puppeteer/issues/2709
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user