mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 21:53:35 +03:00
test: make "remove header" test actually test be havior (#4092)
This commit is contained in:
parent
3c32c1683a
commit
180aa011d0
@ -100,7 +100,7 @@ it('should be able to remove headers', async ({page, server}) => {
|
|||||||
await page.route('**/*', route => {
|
await page.route('**/*', route => {
|
||||||
const headers = Object.assign({}, route.request().headers(), {
|
const headers = Object.assign({}, route.request().headers(), {
|
||||||
foo: 'bar',
|
foo: 'bar',
|
||||||
origin: undefined, // remove "origin" header
|
accept: undefined, // remove "accept" header
|
||||||
});
|
});
|
||||||
route.continue({ headers });
|
route.continue({ headers });
|
||||||
});
|
});
|
||||||
@ -110,7 +110,7 @@ it('should be able to remove headers', async ({page, server}) => {
|
|||||||
page.goto(server.PREFIX + '/empty.html')
|
page.goto(server.PREFIX + '/empty.html')
|
||||||
]);
|
]);
|
||||||
|
|
||||||
expect(serverRequest.headers.origin).toBe(undefined);
|
expect(serverRequest.headers.accept).toBe(undefined);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should contain referer header', async ({page, server}) => {
|
it('should contain referer header', async ({page, server}) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user