Skip to content

Commit

Permalink
feat(webkit): roll to r2062 (#32147)
Browse files Browse the repository at this point in the history
  • Loading branch information
playwrightmachine committed Aug 19, 2024
1 parent c87ca05 commit 18694f6
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion packages/playwright-core/browsers.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
{
"name": "webkit",
"revision": "2061",
"revision": "2062",
"installByDefault": true,
"revisionOverrides": {
"mac10.14": "1446",
Expand Down
7 changes: 5 additions & 2 deletions tests/library/browsercontext-viewport-mobile.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* limitations under the License.
*/

import os from 'os';
import { browserTest as it, expect } from '../config/browserTest';

it.describe('mobile viewport', () => {
Expand Down Expand Up @@ -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();
Expand All @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion tests/library/browsercontext-viewport.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
6 changes: 4 additions & 2 deletions tests/library/modernizr.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion tests/page/page-goto.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
1 change: 1 addition & 0 deletions tests/page/page-screenshot.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 18694f6

Please sign in to comment.