diff --git a/test/features/interception.spec.js b/test/features/interception.spec.js index 5f59e94562..4b6cd34257 100644 --- a/test/features/interception.spec.js +++ b/test/features/interception.spec.js @@ -19,7 +19,7 @@ const fs = require('fs'); const path = require('path'); const utils = require('../utils'); -module.exports.addTests = function({testRunner, expect, FFOX, CHROME, WEBKIT}) { +module.exports.addTests = function({testRunner, expect, defaultBrowserOptions, playwright, FFOX, CHROME, WEBKIT}) { const {describe, xdescribe, fdescribe} = testRunner; const {it, fit, xit} = testRunner; const {beforeAll, beforeEach, afterAll, afterEach} = testRunner; @@ -660,6 +660,21 @@ module.exports.addTests = function({testRunner, expect, FFOX, CHROME, WEBKIT}) { expect(nonCachedRequest.headers['if-modified-since']).toBe(undefined); }); }); + + describe('ignoreHTTPSErrors', function() { + 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(); + + 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(); + }); + }); }; /** diff --git a/test/ignorehttpserrors.spec.js b/test/ignorehttpserrors.spec.js index 1c5e82247f..5dbc3b2f81 100644 --- a/test/ignorehttpserrors.spec.js +++ b/test/ignorehttpserrors.spec.js @@ -43,12 +43,6 @@ module.exports.addTests = function({testRunner, expect, defaultBrowserOptions, p expect(error).toBe(null); expect(response.ok()).toBe(true); }); - it.skip(WEBKIT)('should work with request interception', async({page, server, httpsServer}) => { - 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); - }); it.skip(WEBKIT)('should work with mixed content', async({page, server, httpsServer}) => { httpsServer.setRoute('/mixedcontent.html', (req, res) => { res.end(``);