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"
|
"ws": "^3.0.0"
|
||||||
},
|
},
|
||||||
"puppeteer": {
|
"puppeteer": {
|
||||||
"chromium_revision": "526987"
|
"chromium_revision": "533271"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/debug": "0.0.30",
|
"@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).toBeTruthy();
|
||||||
expect(failedRequest.failure().errorText).toBe('net::ERR_INTERNET_DISCONNECTED');
|
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}) => {
|
it('should amend HTTP headers', async({page, server}) => {
|
||||||
await page.setRequestInterception(true);
|
await page.setRequestInterception(true);
|
||||||
page.on('request', request => {
|
page.on('request', request => {
|
||||||
@ -2130,6 +2142,7 @@ describe('Page', function() {
|
|||||||
'mousedown',
|
'mousedown',
|
||||||
'mouseup',
|
'mouseup',
|
||||||
'click',
|
'click',
|
||||||
|
'input',
|
||||||
'change',
|
'change',
|
||||||
]);
|
]);
|
||||||
await page.click('input#agree');
|
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.check)).toBe(true);
|
||||||
expect(await page.evaluate(() => result.events)).toEqual([
|
expect(await page.evaluate(() => result.events)).toEqual([
|
||||||
'click',
|
'click',
|
||||||
|
'input',
|
||||||
'change',
|
'change',
|
||||||
]);
|
]);
|
||||||
await page.click('label[for="agree"]');
|
await page.click('label[for="agree"]');
|
||||||
|
Loading…
Reference in New Issue
Block a user