test: make sure referer header is reported with request interception (#2986)
The referer header has been fixed some time ago. References #469.
This commit is contained in:
parent
d305c7d8c1
commit
2c9599496a
@ -251,6 +251,17 @@ module.exports.addTests = function({testRunner, expect}) {
|
||||
const response = await page.goto(server.EMPTY_PAGE);
|
||||
expect(response.ok()).toBe(true);
|
||||
});
|
||||
it('should contain referer header', async({page, server}) => {
|
||||
await page.setRequestInterception(true);
|
||||
const requests = [];
|
||||
page.on('request', request => {
|
||||
requests.push(request);
|
||||
request.continue();
|
||||
});
|
||||
await page.goto(server.PREFIX + '/one-style.html');
|
||||
expect(requests[1].url()).toContain('/one-style.css');
|
||||
expect(requests[1].headers().referer).toContain('/one-style.html');
|
||||
});
|
||||
it('should stop intercepting', async({page, server}) => {
|
||||
await page.setRequestInterception(true);
|
||||
page.once('request', request => request.continue());
|
||||
|
Loading…
Reference in New Issue
Block a user