diff --git a/test/features/interception.spec.js b/test/features/interception.spec.js index 2e1f231372..4b6cd34257 100644 --- a/test/features/interception.spec.js +++ b/test/features/interception.spec.js @@ -662,20 +662,15 @@ module.exports.addTests = function({testRunner, expect, defaultBrowserOptions, p }); describe('ignoreHTTPSErrors', function() { - fit('should work with mixed content', async({server, httpsServer}) => { + it('should work with request interception', async({httpsServer}) => { const browser = await playwright.launch({...defaultBrowserOptions, ignoreHTTPSErrors: true}); const context = await browser.newContext(); const page = await context.newPage(); - httpsServer.setRoute('/mixedcontent.html', (req, res) => { - res.end(``); - }); - await page.goto(httpsServer.PREFIX + '/mixedcontent.html', {waitUntil: 'load'}); - expect(page.frames().length).toBe(2); - // Make sure blocked iframe has functional execution context - // @see https://github.com/GoogleChrome/puppeteer/issues/2709 - expect(await page.frames()[0].evaluate('1 + 2')).toBe(3); - expect(await page.frames()[1].evaluate('2 + 3')).toBe(5); + await page.interception.enable(); + page.on('request', request => page.interception.continue(request)); + const response = await page.goto(httpsServer.EMPTY_PAGE); + expect(response.status()).toBe(200); await browser.close(); });