From 1fecc20238f0a1a5d942726f246decf6fdfab8de Mon Sep 17 00:00:00 2001 From: Yury Semikhatsky Date: Fri, 14 Apr 2023 13:32:50 -0700 Subject: [PATCH] feat(webkit): roll to r1830 (#22412) https://github.com/microsoft/playwright/issues/22411 Fixes https://github.com/microsoft/playwright/issues/21892 --- packages/playwright-core/browsers.json | 2 +- .../playwright-core/src/server/webkit/protocol.d.ts | 4 ++++ tests/library/browsercontext-pages.spec.ts | 10 ++++++++-- tests/library/download.spec.ts | 3 +-- tests/library/video.spec.ts | 6 ++++-- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/packages/playwright-core/browsers.json b/packages/playwright-core/browsers.json index 73d4d846f8..26077dc20c 100644 --- a/packages/playwright-core/browsers.json +++ b/packages/playwright-core/browsers.json @@ -33,7 +33,7 @@ }, { "name": "webkit", - "revision": "1827", + "revision": "1830", "installByDefault": true, "revisionOverrides": { "mac10.14": "1446", diff --git a/packages/playwright-core/src/server/webkit/protocol.d.ts b/packages/playwright-core/src/server/webkit/protocol.d.ts index 8e024b7042..a4f451e538 100644 --- a/packages/playwright-core/src/server/webkit/protocol.d.ts +++ b/packages/playwright-core/src/server/webkit/protocol.d.ts @@ -7888,6 +7888,10 @@ the top of the viewport and Y increases as it proceeds towards the bottom of the * Property symbol object, if the property is a symbol. */ symbol?: Runtime.RemoteObject; + /** + * True if the property is a private field. + */ + isPrivate?: boolean; /** * True if the property value came from a native getter. */ diff --git a/tests/library/browsercontext-pages.spec.ts b/tests/library/browsercontext-pages.spec.ts index 6a50c35447..b7011885f1 100644 --- a/tests/library/browsercontext-pages.spec.ts +++ b/tests/library/browsercontext-pages.spec.ts @@ -17,6 +17,7 @@ import { browserTest as it, expect } from '../config/browserTest'; import { attachFrame, chromiumVersionLessThan } from '../config/utils'; +import os from 'os'; it('should not be visible in context.pages', async ({ contextFactory }) => { const context = await contextFactory(); @@ -94,8 +95,13 @@ it('should click the button with offset with page scale', async ({ browser, serv const round = x => Math.round(x + 0.01); let expected = { x: 28, y: 18 }; // 20;10 + 8px of border in each direction if (browserName === 'webkit') { - // WebKit rounds down during css -> dip -> css conversion. - expected = { x: 26, y: 17 }; + // WebKit for macOS 12 has different expectations starting r1829. + if (parseInt(os.release(), 10) < 21) { + // WebKit rounds down during css -> dip -> css conversion. + expected = { x: 26, y: 17 }; + } else { + expected = { x: 29, y: 19 }; + } } else if (browserName === 'chromium' && headless) { // Headless Chromium rounds down during css -> dip -> css conversion. expected = { x: 27, y: 18 }; diff --git a/tests/library/download.spec.ts b/tests/library/download.spec.ts index d6193f3031..4f6d18575f 100644 --- a/tests/library/download.spec.ts +++ b/tests/library/download.spec.ts @@ -705,9 +705,8 @@ it('should convert navigation to a resource with unsupported mime type into down await page.close(); }); -it('should download links with data url', async ({ page, isWindows, browserName }) => { +it('should download links with data url', async ({ page }) => { it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/21892' }); - it.fixme(browserName === 'webkit' && isWindows); await page.setContent('Download!'); const donwloadPromise = page.waitForEvent('download'); await page.getByText('Download').click(); diff --git a/tests/library/video.spec.ts b/tests/library/video.spec.ts index 260d07463e..90fbcc79ec 100644 --- a/tests/library/video.spec.ts +++ b/tests/library/video.spec.ts @@ -674,9 +674,10 @@ it.describe('screencast', () => { expect(files.length).toBe(1); }); - it('should capture full viewport', async ({ browserType, browserName, headless, isWindows, trace }, testInfo) => { + it('should capture full viewport', async ({ browserType, browserName, headless, isWindows, isLinux }, testInfo) => { it.fixme(browserName === 'chromium' && !headless, 'The square is not on the video'); it.fixme(browserName === 'firefox' && isWindows, 'https://github.com/microsoft/playwright/issues/14405'); + it.fixme(browserName === 'webkit' && isLinux && !headless, 'https://github.com/microsoft/playwright/issues/22411'); const size = { width: 600, height: 400 }; const browser = await browserType.launch(); @@ -708,9 +709,10 @@ it.describe('screencast', () => { expectAll(pixels, almostRed); }); - it('should capture full viewport on hidpi', async ({ browserType, browserName, headless, isWindows, trace }, testInfo) => { + it('should capture full viewport on hidpi', async ({ browserType, browserName, headless, isWindows, isLinux }, testInfo) => { it.fixme(browserName === 'chromium' && !headless, 'The square is not on the video'); it.fixme(browserName === 'firefox' && isWindows, 'https://github.com/microsoft/playwright/issues/14405'); + it.fixme(browserName === 'webkit' && isLinux && !headless, 'https://github.com/microsoft/playwright/issues/22411'); const size = { width: 600, height: 400 }; const browser = await browserType.launch();