diff --git a/package.json b/package.json index cd1d33a27c8ee..c2329811a43f1 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "main": "index.js", "playwright": { "chromium_revision": "762211", - "firefox_revision": "1086", + "firefox_revision": "1087", "webkit_revision": "1211" }, "scripts": { diff --git a/test/emulation.spec.js b/test/emulation.spec.js index 990c0d6fd3b1e..c0f7feaf6a170 100644 --- a/test/emulation.spec.js +++ b/test/emulation.spec.js @@ -453,6 +453,28 @@ describe('BrowserContext({locale})', function() { ]); await context.close(); }); + it('should be isolated between contexts', async({browser, server}) => { + const context1 = await browser.newContext({ locale: 'en-US' }); + const promises = []; + // By default firefox limits number of child web processes to 8. + for (let i = 0; i< 8; i++) + promises.push(context1.newPage()); + await Promise.all(promises); + + const context2 = await browser.newContext({ locale: 'ru-RU' }); + const page2 = await context2.newPage(); + + const localeNumber = () => (1000000.50).toLocaleString(); + const numbers = await Promise.all(context1.pages().map(page => page.evaluate(localeNumber))); + + numbers.forEach(value => expect(value).toBe('1,000,000.5')); + expect(await page2.evaluate(localeNumber)).toBe('1 000 000,5'); + + await Promise.all([ + context1.close(), + context2.close() + ]); + }); }); describe('focus', function() {