Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
fix: account for linux treatment of canceled requests
Pavelcde81aaf5a2e
diff --git a/src/webkit/NetworkManager.ts b/src/webkit/NetworkManager.tsindex a1bf48f210..b44264ae7f 100644--- a/src/webkit/NetworkManager.ts+++ b/src/webkit/NetworkManager.ts@@ -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);}diff --git a/test/navigation.spec.js b/test/navigation.spec.jsindex 1e3e7fc354..a5e7197fd5 100644--- a/test/navigation.spec.js+++ b/test/navigation.spec.js@@ -124,7 +124,7 @@ module.exports.addTests = function({testRunner, expect, playwright, FFOX, CHROMEconst 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);