mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat(firefox): support "referer" option in Page.goto (#4000)
This commit is contained in:
parent
fbf36438e8
commit
670d758dfe
@ -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)
|
||||||
|
@ -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",
|
||||||
|
@ -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'),
|
||||||
|
Loading…
Reference in New Issue
Block a user