From 18694f684341580d13eb3942ea7f26c60ed1f4ba Mon Sep 17 00:00:00 2001 From: Playwright Service <89237858+playwrightmachine@users.noreply.github.com> Date: Mon, 19 Aug 2024 10:29:23 -0700 Subject: [PATCH] feat(webkit): roll to r2062 (#32147) --- packages/playwright-core/browsers.json | 2 +- tests/library/browsercontext-viewport-mobile.spec.ts | 7 +++++-- tests/library/browsercontext-viewport.spec.ts | 3 ++- tests/library/modernizr.spec.ts | 6 ++++-- tests/page/page-goto.spec.ts | 3 ++- tests/page/page-screenshot.spec.ts | 1 + 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/playwright-core/browsers.json b/packages/playwright-core/browsers.json index d0b427f41b8ae..dd9fd6058878c 100644 --- a/packages/playwright-core/browsers.json +++ b/packages/playwright-core/browsers.json @@ -27,7 +27,7 @@ }, { "name": "webkit", - "revision": "2061", + "revision": "2062", "installByDefault": true, "revisionOverrides": { "mac10.14": "1446", diff --git a/tests/library/browsercontext-viewport-mobile.spec.ts b/tests/library/browsercontext-viewport-mobile.spec.ts index 8160d5601e314..1f897f60fa9b9 100644 --- a/tests/library/browsercontext-viewport-mobile.spec.ts +++ b/tests/library/browsercontext-viewport-mobile.spec.ts @@ -15,6 +15,7 @@ * limitations under the License. */ +import os from 'os'; import { browserTest as it, expect } from '../config/browserTest'; it.describe('mobile viewport', () => { @@ -54,7 +55,8 @@ it.describe('mobile viewport', () => { } }); - it('should be detectable by Modernizr', async ({ playwright, browser, server }) => { + it('should be detectable by Modernizr', async ({ playwright, browser, server, browserName, platform }) => { + it.skip(browserName === 'webkit' && platform === 'darwin' && parseInt(os.release(), 10) === 22, 'detect-touch.html uses Modernizr which uses WebGL. WebGL is not available in macOS-13 - https://bugs.webkit.org/show_bug.cgi?id=278277'); const iPhone = playwright.devices['iPhone 6']; const context = await browser.newContext({ ...iPhone }); const page = await context.newPage(); @@ -63,7 +65,8 @@ it.describe('mobile viewport', () => { await context.close(); }); - it('should detect touch when applying viewport with touches', async ({ browser, server }) => { + it('should detect touch when applying viewport with touches', async ({ browser, server, browserName, platform }) => { + it.skip(browserName === 'webkit' && platform === 'darwin' && parseInt(os.release(), 10) === 22, 'Modernizr uses WebGL. WebGL is not available in macOS-13 - https://bugs.webkit.org/show_bug.cgi?id=278277'); const context = await browser.newContext({ viewport: { width: 800, height: 600 }, hasTouch: true }); const page = await context.newPage(); await page.goto(server.EMPTY_PAGE); diff --git a/tests/library/browsercontext-viewport.spec.ts b/tests/library/browsercontext-viewport.spec.ts index 360cc5815df9d..4ba1e2f52d448 100644 --- a/tests/library/browsercontext-viewport.spec.ts +++ b/tests/library/browsercontext-viewport.spec.ts @@ -93,7 +93,8 @@ it('should emulate availWidth and availHeight', async ({ page }) => { expect(await page.evaluate(() => window.screen.availHeight)).toBe(600); }); -it('should not have touch by default', async ({ page, server }) => { +it('should not have touch by default', async ({ page, server, browserName, platform }) => { + it.skip(browserName === 'webkit' && platform === 'darwin' && parseInt(os.release(), 10) === 22, 'detect-touch.html uses Modernizr which uses WebGL. WebGL is not available in macOS-13 - https://bugs.webkit.org/show_bug.cgi?id=278277'); await page.goto(server.PREFIX + '/mobile.html'); expect(await page.evaluate(() => 'ontouchstart' in window)).toBe(false); await page.goto(server.PREFIX + '/detect-touch.html'); diff --git a/tests/library/modernizr.spec.ts b/tests/library/modernizr.spec.ts index 5f0e165c65922..327a3c4169556 100644 --- a/tests/library/modernizr.spec.ts +++ b/tests/library/modernizr.spec.ts @@ -32,7 +32,8 @@ async function checkFeatures(name: string, context: any, server: any) { it('safari-14-1', async ({ browser, browserName, platform, server, headless, isMac }) => { it.skip(browserName !== 'webkit'); - it.skip(browserName === 'webkit' && parseInt(os.release(), 10) < 20, 'WebKit for macOS 10.15 is frozen.'); + it.skip(browserName === 'webkit' && platform === 'darwin', 'WebKit for macOS 10.15 is frozen.'); + it.skip(browserName === 'webkit' && platform === 'darwin' && parseInt(os.release(), 10) === 22, 'Modernizr uses WebGL which is not available in macOS-13 - https://bugs.webkit.org/show_bug.cgi?id=278277'); const context = await browser.newContext({ deviceScaleFactor: 2 }); @@ -81,7 +82,8 @@ it('safari-14-1', async ({ browser, browserName, platform, server, headless, isM it('mobile-safari-14-1', async ({ playwright, browser, browserName, platform, isMac, server, headless }) => { it.skip(browserName !== 'webkit'); - it.skip(browserName === 'webkit' && parseInt(os.release(), 10) < 20, 'WebKit for macOS 10.15 is frozen.'); + it.skip(browserName === 'webkit' && platform === 'darwin' && parseInt(os.release(), 10) < 20, 'WebKit for macOS 10.15 is frozen.'); + it.skip(browserName === 'webkit' && platform === 'darwin' && parseInt(os.release(), 10) === 22, 'Modernizr uses WebGL which is not available in macOS-13 - https://bugs.webkit.org/show_bug.cgi?id=278277'); const iPhone = playwright.devices['iPhone 12']; const context = await browser.newContext(iPhone); const { actual, expected } = await checkFeatures('mobile-safari-14-1', context, server); diff --git a/tests/page/page-goto.spec.ts b/tests/page/page-goto.spec.ts index a613a7e036fba..79107c0d215b8 100644 --- a/tests/page/page-goto.spec.ts +++ b/tests/page/page-goto.spec.ts @@ -181,7 +181,8 @@ it('should work with Cross-Origin-Opener-Policy after redirect', async ({ page, it('should properly cancel Cross-Origin-Opener-Policy navigation', { annotation: { type: 'issue', description: 'https://github.com/microsoft/playwright/issues/32107' }, -}, async ({ page, server }) => { +}, async ({ page, server, browserName, isLinux }) => { + it.fixme(browserName === 'webkit' && isLinux, 'Started failing after https://commits.webkit.org/281488@main'); server.setRoute('/empty.html', (req, res) => { res.setHeader('Cross-Origin-Opener-Policy', 'same-origin'); res.end(); diff --git a/tests/page/page-screenshot.spec.ts b/tests/page/page-screenshot.spec.ts index 7f374ac59be73..8d0e68e12df37 100644 --- a/tests/page/page-screenshot.spec.ts +++ b/tests/page/page-screenshot.spec.ts @@ -323,6 +323,7 @@ it.describe('page screenshot', () => { it('should work for webgl', async ({ page, server, browserName, platform }) => { it.fixme(browserName === 'firefox'); it.fixme(browserName === 'chromium' && platform === 'darwin' && os.arch() === 'arm64', 'SwiftShader is not available on macOS-arm64 - https://github.com/microsoft/playwright/issues/28216'); + it.skip(browserName === 'webkit' && platform === 'darwin' && parseInt(os.release(), 10) === 22, 'WebGL is not available in macOS-13 - https://bugs.webkit.org/show_bug.cgi?id=278277'); await page.setViewportSize({ width: 640, height: 480 }); await page.goto(server.PREFIX + '/screenshots/webgl.html');