test: add failing test for bad request interception (#4108)

References #3973
This commit is contained in:
Andrey Lushnikov 2019-03-04 17:09:23 -08:00 committed by GitHub
parent 02859c3c6d
commit c68df320f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -412,6 +412,18 @@ module.exports.addTests = function({testRunner, expect, CHROME}) {
page.waitForNavigation() page.waitForNavigation()
]); ]);
}); });
// @see https://github.com/GoogleChrome/puppeteer/issues/3973
xit('should work when header manipulation headers with redirect', async({page, server}) => {
server.setRedirect('/rrredirect', '/empty.html');
await page.setRequestInterception(true);
page.on('request', request => {
const headers = Object.assign({}, request.headers(), {
foo: 'bar'
});
request.continue({ headers });
});
await page.goto(server.PREFIX + '/rrredirect');
});
it('should contain referer header', async({page, server}) => { it('should contain referer header', async({page, server}) => {
await page.setRequestInterception(true); await page.setRequestInterception(true);
const requests = []; const requests = [];