feat(firefox): support "referer" option in Page.goto (#4000)

This commit is contained in:
Andrey Lushnikov 2019-02-13 13:49:05 -08:00 committed by GitHub
parent fbf36438e8
commit 670d758dfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -193,10 +193,12 @@ class Frame {
const { const {
timeout = this._timeoutSettings.navigationTimeout(), timeout = this._timeoutSettings.navigationTimeout(),
waitUntil = ['load'], waitUntil = ['load'],
referer,
} = options; } = options;
const normalizedWaitUntil = normalizeWaitUntil(waitUntil); const normalizedWaitUntil = normalizeWaitUntil(waitUntil);
const {navigationId} = await this._session.send('Page.navigate', { const {navigationId} = await this._session.send('Page.navigate', {
frameId: this._frameId, frameId: this._frameId,
referer,
url, url,
}); });
if (!navigationId) if (!navigationId)

View File

@ -9,7 +9,7 @@
"node": ">=8.9.4" "node": ">=8.9.4"
}, },
"puppeteer": { "puppeteer": {
"firefox_revision": "32fc518d9228fd0115c0a4fd4bd341780bdba2fc" "firefox_revision": "6186c850885f1fa486e9987b5119d2b4bcb53499"
}, },
"scripts": { "scripts": {
"install": "node install.js", "install": "node install.js",

View File

@ -310,7 +310,7 @@ module.exports.addTests = function({testRunner, expect, Errors, CHROME}) {
} }
expect(error.message).toContain(url); expect(error.message).toContain(url);
}); });
it_fails_ffox('should send referer', async({page, server}) => { it('should send referer', async({page, server}) => {
const [request1, request2] = await Promise.all([ const [request1, request2] = await Promise.all([
server.waitForRequest('/grid.html'), server.waitForRequest('/grid.html'),
server.waitForRequest('/digits/1.png'), server.waitForRequest('/digits/1.png'),