diff --git a/packages/playwright-core/src/server/webkit/wkPage.ts b/packages/playwright-core/src/server/webkit/wkPage.ts index 0bd82ed338..13096075f7 100644 --- a/packages/playwright-core/src/server/webkit/wkPage.ts +++ b/packages/playwright-core/src/server/webkit/wkPage.ts @@ -16,7 +16,6 @@ */ import path from 'path'; -import os from 'os'; import { PNG, jpegjs } from '../../utilsBundle'; import { splitErrorMessage } from '../../utils/stackTrace'; import { assert, createGuid, debugAssert, headersArrayToObject } from '../../utils'; @@ -715,12 +714,7 @@ export class WKPage implements PageDelegate { ]; if (options.isMobile) { const angle = viewportSize.width > viewportSize.height ? 90 : 0; - // Special handling for macOS 12. - const useLegacySetOrientationOverrideMethod = os.platform() === 'darwin' && parseInt(os.release().split('.')[0], 10) <= 21; - if (useLegacySetOrientationOverrideMethod) - promises.push(this._session.send('Page.setOrientationOverride' as any, { angle })); - else - promises.push(this._pageProxySession.send('Emulation.setOrientationOverride', { angle })); + promises.push(this._pageProxySession.send('Emulation.setOrientationOverride', { angle })); } await Promise.all(promises); } diff --git a/tests/library/browsercontext-viewport.spec.ts b/tests/library/browsercontext-viewport.spec.ts index 356e330079..09fade8d91 100644 --- a/tests/library/browsercontext-viewport.spec.ts +++ b/tests/library/browsercontext-viewport.spec.ts @@ -177,10 +177,9 @@ browserTest('should be able to get correct orientation angle on non-mobile devic await context.close(); }); -it('should set window.screen.orientation.type for mobile devices', async ({ contextFactory, browserName, server, isMac, macVersion }) => { +it('should set window.screen.orientation.type for mobile devices', async ({ contextFactory, browserName, server }) => { it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/31151' }); it.skip(browserName === 'firefox', 'Firefox does not support mobile emulation'); - it.skip(browserName === 'webkit' && isMac && macVersion <= 12, 'WebKit on macOS 12 is frozen and does not support orientation.type override'); const context = await contextFactory(devices['iPhone 14']); const page = await context.newPage(); await page.goto(server.PREFIX + '/index.html'); diff --git a/tests/library/browsertype-connect.spec.ts b/tests/library/browsertype-connect.spec.ts index 77efb65e9b..367c0eabfc 100644 --- a/tests/library/browsertype-connect.spec.ts +++ b/tests/library/browsertype-connect.spec.ts @@ -680,9 +680,8 @@ for (const kind of ['launchServer', 'run-server'] as const) { expect(await response.json()).toEqual({ 'foo': 'bar' }); }); - test('should upload large file', async ({ connect, startRemoteServer, server, browserName, isMac, macVersion, mode }, testInfo) => { + test('should upload large file', async ({ connect, startRemoteServer, server, mode }, testInfo) => { test.skip(mode.startsWith('service'), 'Take it easy on service'); - test.skip(browserName === 'webkit' && isMac && macVersion < 11, 'WebKit for macOS 10.15 is frozen and does not have corresponding protocol features.'); test.slow(); const remoteServer = await startRemoteServer(kind); const browser = await connect(remoteServer.wsEndpoint()); diff --git a/tests/library/capabilities.spec.ts b/tests/library/capabilities.spec.ts index 72eb73724c..76b25f0518 100644 --- a/tests/library/capabilities.spec.ts +++ b/tests/library/capabilities.spec.ts @@ -19,8 +19,7 @@ import url from 'url'; import { contextTest as it, expect } from '../config/browserTest'; import { hostPlatform } from '../../packages/playwright-core/src/utils/hostPlatform'; -it('SharedArrayBuffer should work @smoke', async function({ contextFactory, httpsServer, isMac, macVersion, browserName }) { - it.skip(browserName === 'webkit' && isMac && macVersion <= 12, 'WebKit on macOS 12 is frozen and does not support SharedArrayBuffer'); +it('SharedArrayBuffer should work @smoke', async function({ contextFactory, httpsServer }) { const context = await contextFactory({ ignoreHTTPSErrors: true }); const page = await context.newPage(); httpsServer.setRoute('/sharedarraybuffer', (req, res) => { @@ -234,9 +233,8 @@ it('make sure that XMLHttpRequest upload events are emitted correctly', async ({ expect(events).toEqual(['loadstart', 'progress', 'load', 'loadend']); }); -it('loading in HTMLImageElement.prototype', async ({ page, server, browserName, isMac, macVersion }) => { +it('loading in HTMLImageElement.prototype', async ({ page, server }) => { it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/22738' }); - it.skip(browserName === 'webkit' && isMac && macVersion < 12, 'macOS 11 is frozen'); await page.goto(server.EMPTY_PAGE); const defined = await page.evaluate(() => 'loading' in HTMLImageElement.prototype); expect(defined).toBeTruthy(); @@ -251,7 +249,7 @@ it('window.GestureEvent in WebKit', async ({ page, server, browserName }) => { expect(type).toBe(browserName === 'webkit' ? 'function' : 'undefined'); }); -it('requestFullscreen', async ({ page, server, browserName, headless, isLinux }) => { +it('requestFullscreen', async ({ page, server }) => { it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/22832' }); await page.goto(server.EMPTY_PAGE); await page.evaluate(() => { @@ -268,7 +266,7 @@ it('requestFullscreen', async ({ page, server, browserName, headless, isLinux }) expect(await page.evaluate(() => !!document.fullscreenElement)).toBeFalsy(); }); -it('should send no Content-Length header for GET requests with a Content-Type', async ({ page, server, browserName }) => { +it('should send no Content-Length header for GET requests with a Content-Type', async ({ page, server }) => { it.info().annotations.push({ type: 'issue', description: 'https://github.com/microsoft/playwright/issues/22569' }); await page.goto(server.EMPTY_PAGE); const [request] = await Promise.all([ diff --git a/tests/page/locator-misc-2.spec.ts b/tests/page/locator-misc-2.spec.ts index 4eaf5972a0..b32913faba 100644 --- a/tests/page/locator-misc-2.spec.ts +++ b/tests/page/locator-misc-2.spec.ts @@ -42,9 +42,8 @@ it('should scroll into view', async ({ page, server, isAndroid }) => { } }); -it('should scroll zero-sized element into view', async ({ page, isAndroid, isElectron, browserName, isMac, macVersion }) => { +it('should scroll zero-sized element into view', async ({ page, isAndroid, isElectron }) => { it.fixme(isAndroid || isElectron); - it.skip(browserName === 'webkit' && isMac && macVersion < 11, 'WebKit for macOS 10.15 is frozen.'); await page.setContent(`