Skip to content

Commit

Permalink
feat(chromium): roll Chromium to r654752
Browse files Browse the repository at this point in the history
This roll includes:
- https://crrev.com/653809 - FrameLoader: ignore failing provisional loads entirely
- https://crrev.com/654750 - DevTools: make sure Network.requestWillBeSent is emitted on time for sync xhrs

The FrameLoader patch is the reason behind the test change. It's
actually desirable to fail frame navigation if the frame detaches - and
that's consistent with Firefox.

Fixes puppeteer#4337
  • Loading branch information
aslushnikov committed Apr 28, 2019
1 parent f3db28c commit 80a66d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"node": ">=6.4.0"
},
"puppeteer": {
"chromium_revision": "650583"
"chromium_revision": "654752"
},
"scripts": {
"unit": "node test/test.js",
Expand Down
6 changes: 4 additions & 2 deletions test/navigation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -540,18 +540,20 @@ module.exports.addTests = function({testRunner, expect, puppeteer, CHROME}) {
expect(response.frame()).toBe(frame);
expect(page.url()).toContain('/frames/one-frame.html');
});
it_fails_ffox('should resolve when frame detaches', async({page, server}) => {
it('should fail when frame detaches', async({page, server}) => {
await page.goto(server.PREFIX + '/frames/one-frame.html');
const frame = page.frames()[1];

server.setRoute('/empty.html', () => {});
const navigationPromise = frame.waitForNavigation();
let error = null;
const navigationPromise = frame.waitForNavigation().catch(e => error = e);
await Promise.all([
server.waitForRequest('/empty.html'),
frame.evaluate(() => window.location = '/empty.html')
]);
await page.$eval('iframe', frame => frame.remove());
await navigationPromise;
expect(error.message).toBe('Navigating frame was detached');
});
});

Expand Down

0 comments on commit 80a66d3

Please sign in to comment.