diff --git a/browsers.json b/browsers.json index df9b52ca6b..7a748a472e 100644 --- a/browsers.json +++ b/browsers.json @@ -18,7 +18,7 @@ }, { "name": "webkit", - "revision": "1486", + "revision": "1488", "installByDefault": true, "revisionOverrides": { "mac10.14": "1444" diff --git a/tests/browsercontext-locale.spec.ts b/tests/browsercontext-locale.spec.ts index db13548dc0..b4b1a223ef 100644 --- a/tests/browsercontext-locale.spec.ts +++ b/tests/browsercontext-locale.spec.ts @@ -52,12 +52,14 @@ it('should format number', async ({browser, server}) => { } }); -it('should format date', async ({browser, server}) => { +it('should format date', async ({browser, server, browserName}) => { { const context = await browser.newContext({ locale: 'en-US', timezoneId: 'America/Los_Angeles' }); const page = await context.newPage(); await page.goto(server.EMPTY_PAGE); - const formatted = 'Sat Nov 19 2016 10:12:34 GMT-0800 (Pacific Standard Time)'; + const formatted = browserName === 'webkit' ? + 'Sat Nov 19 2016 10:12:34 GMT-0800' : + 'Sat Nov 19 2016 10:12:34 GMT-0800 (Pacific Standard Time)'; expect(await page.evaluate(() => new Date(1479579154987).toString())).toBe(formatted); await context.close(); } @@ -65,8 +67,10 @@ it('should format date', async ({browser, server}) => { const context = await browser.newContext({ locale: 'de-DE', timezoneId: 'Europe/Berlin' }); const page = await context.newPage(); await page.goto(server.EMPTY_PAGE); - expect(await page.evaluate(() => new Date(1479579154987).toString())).toBe( - 'Sat Nov 19 2016 19:12:34 GMT+0100 (Mitteleuropäische Normalzeit)'); + const formatted = browserName === 'webkit' ? + 'Sat Nov 19 2016 19:12:34 GMT+0100' : + 'Sat Nov 19 2016 19:12:34 GMT+0100 (Mitteleuropäische Normalzeit)'; + expect(await page.evaluate(() => new Date(1479579154987).toString())).toBe(formatted); await context.close(); } }); diff --git a/tests/browsercontext-timezone-id.spec.ts b/tests/browsercontext-timezone-id.spec.ts index 9ed8953f9f..e279b8f138 100644 --- a/tests/browsercontext-timezone-id.spec.ts +++ b/tests/browsercontext-timezone-id.spec.ts @@ -17,30 +17,38 @@ import { browserTest as it, expect } from './config/browserTest'; -it('should work', async ({ browser }) => { +it('should work', async ({ browser, browserName }) => { const func = () => new Date(1479579154987).toString(); { const context = await browser.newContext({ locale: 'en-US', timezoneId: 'America/Jamaica' }); const page = await context.newPage(); - expect(await page.evaluate(func)).toBe('Sat Nov 19 2016 13:12:34 GMT-0500 (Eastern Standard Time)'); + expect(await page.evaluate(func)).toBe(browserName === 'webkit' ? + 'Sat Nov 19 2016 13:12:34 GMT-0500' : + 'Sat Nov 19 2016 13:12:34 GMT-0500 (Eastern Standard Time)'); await context.close(); } { const context = await browser.newContext({ locale: 'en-US', timezoneId: 'Pacific/Honolulu' }); const page = await context.newPage(); - expect(await page.evaluate(func)).toBe('Sat Nov 19 2016 08:12:34 GMT-1000 (Hawaii-Aleutian Standard Time)'); + expect(await page.evaluate(func)).toBe(browserName === 'webkit' ? + 'Sat Nov 19 2016 08:12:34 GMT-1000' : + 'Sat Nov 19 2016 08:12:34 GMT-1000 (Hawaii-Aleutian Standard Time)'); await context.close(); } { const context = await browser.newContext({ locale: 'en-US', timezoneId: 'America/Buenos_Aires' }); const page = await context.newPage(); - expect(await page.evaluate(func)).toBe('Sat Nov 19 2016 15:12:34 GMT-0300 (Argentina Standard Time)'); + expect(await page.evaluate(func)).toBe(browserName === 'webkit' ? + 'Sat Nov 19 2016 15:12:34 GMT-0300' : + 'Sat Nov 19 2016 15:12:34 GMT-0300 (Argentina Standard Time)'); await context.close(); } { const context = await browser.newContext({ locale: 'en-US', timezoneId: 'Europe/Berlin' }); const page = await context.newPage(); - expect(await page.evaluate(func)).toBe('Sat Nov 19 2016 19:12:34 GMT+0100 (Central European Standard Time)'); + expect(await page.evaluate(func)).toBe(browserName === 'webkit' ? + 'Sat Nov 19 2016 19:12:34 GMT+0100' : + 'Sat Nov 19 2016 19:12:34 GMT+0100 (Central European Standard Time)'); await context.close(); } }); diff --git a/tests/defaultbrowsercontext-2.spec.ts b/tests/defaultbrowsercontext-2.spec.ts index 4c32746a69..8f63dfe1c5 100644 --- a/tests/defaultbrowsercontext-2.spec.ts +++ b/tests/defaultbrowsercontext-2.spec.ts @@ -44,9 +44,11 @@ it('should support reducedMotion option', async ({launchPersistent}) => { expect(await page.evaluate(() => matchMedia('(prefers-reduced-motion: no-preference)').matches)).toBe(false); }); -it('should support timezoneId option', async ({launchPersistent}) => { +it('should support timezoneId option', async ({launchPersistent, browserName}) => { const {page} = await launchPersistent({locale: 'en-US', timezoneId: 'America/Jamaica'}); - expect(await page.evaluate(() => new Date(1479579154987).toString())).toBe('Sat Nov 19 2016 13:12:34 GMT-0500 (Eastern Standard Time)'); + expect(await page.evaluate(() => new Date(1479579154987).toString())).toBe(browserName === 'webkit' ? + 'Sat Nov 19 2016 13:12:34 GMT-0500' : + 'Sat Nov 19 2016 13:12:34 GMT-0500 (Eastern Standard Time)'); }); it('should support locale option', async ({launchPersistent}) => {