mirror of
https://github.com/puppeteer/puppeteer
synced 2024-06-14 14:02:48 +00:00
feat(chromium): roll Chromium to r654752 (#4358)
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 #4337
This commit is contained in:
@@ -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');
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user