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:
Andrey Lushnikov 2018-01-31 16:02:56 -08:00 committed by GitHub
parent 1716a748aa
commit cfb728b09b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 1 deletions

View File

@ -36,7 +36,7 @@
"ws": "^3.0.0"
},
"puppeteer": {
"chromium_revision": "526987"
"chromium_revision": "533271"
},
"devDependencies": {
"@types/debug": "0.0.30",

View File

@ -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"]');