mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
fix: account for linux treatment of canceled requests
This commit is contained in:
parent
aaa8f88f3c
commit
cde81aaf5a
@ -168,7 +168,7 @@ export class NetworkManager extends EventEmitter {
|
||||
const isCurrentDocument = request.request.frame()._lastDocumentId === request._documentId;
|
||||
// When frame was detached during load, "cancelled" comes before detach.
|
||||
// Ignore it and hope for the best.
|
||||
const wasCanceled = event.errorText === 'cancelled';
|
||||
const wasCanceled = event.errorText.includes('cancelled');
|
||||
if (!isCurrentDocument && !wasCanceled)
|
||||
request.request.frame()._onAbortedNewDocumentNavigation(request._documentId, event.errorText);
|
||||
}
|
||||
|
@ -124,7 +124,7 @@ module.exports.addTests = function({testRunner, expect, playwright, FFOX, CHROME
|
||||
const response = await page.goto(server.EMPTY_PAGE, {waitUntil: 'domcontentloaded'});
|
||||
expect(response.status()).toBe(200);
|
||||
});
|
||||
it('should work when page calls history API in beforeunload', async({page, server}) => {
|
||||
it.skip(WEBKIT)('should work when page calls history API in beforeunload', async({page, server}) => {
|
||||
await page.goto(server.EMPTY_PAGE);
|
||||
await page.evaluate(() => {
|
||||
window.addEventListener('beforeunload', () => history.replaceState(null, 'initial', window.location.href), false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user