mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat(Chromium): roll to r533271 (#1938)
This roll includes: - https://crrev.com/530961 DevTools: fix Referer header handling in net interceptor References #469.
This commit is contained in:
parent
1716a748aa
commit
cfb728b09b
@ -36,7 +36,7 @@
|
||||
"ws": "^3.0.0"
|
||||
},
|
||||
"puppeteer": {
|
||||
"chromium_revision": "526987"
|
||||
"chromium_revision": "533271"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/debug": "0.0.30",
|
||||
|
14
test/test.js
14
test/test.js
@ -1477,6 +1477,18 @@ describe('Page', function() {
|
||||
expect(failedRequest).toBeTruthy();
|
||||
expect(failedRequest.failure().errorText).toBe('net::ERR_INTERNET_DISCONNECTED');
|
||||
});
|
||||
it('should send referer', async({page, server}) => {
|
||||
await page.setExtraHTTPHeaders({
|
||||
referer: 'http://google.com/'
|
||||
});
|
||||
await page.setRequestInterception(true);
|
||||
page.on('request', request => request.continue());
|
||||
const [request] = await Promise.all([
|
||||
server.waitForRequest('/grid.html'),
|
||||
page.goto(server.PREFIX + '/grid.html'),
|
||||
]);
|
||||
expect(request.headers['referer']).toBe('http://google.com/');
|
||||
});
|
||||
it('should amend HTTP headers', async({page, server}) => {
|
||||
await page.setRequestInterception(true);
|
||||
page.on('request', request => {
|
||||
@ -2130,6 +2142,7 @@ describe('Page', function() {
|
||||
'mousedown',
|
||||
'mouseup',
|
||||
'click',
|
||||
'input',
|
||||
'change',
|
||||
]);
|
||||
await page.click('input#agree');
|
||||
@ -2143,6 +2156,7 @@ describe('Page', function() {
|
||||
expect(await page.evaluate(() => result.check)).toBe(true);
|
||||
expect(await page.evaluate(() => result.events)).toEqual([
|
||||
'click',
|
||||
'input',
|
||||
'change',
|
||||
]);
|
||||
await page.click('label[for="agree"]');
|
||||
|
Loading…
Reference in New Issue
Block a user