mirror of
https://github.com/microsoft/playwright.git
synced 2024-12-14 05:37:20 +03:00
fix(chromium): make locale overrides work (#1108)
This commit is contained in:
parent
3afaeef557
commit
4f69930fbe
@ -112,6 +112,8 @@ export class CRPage implements PageDelegate {
|
||||
promises.push(this._client.send('Emulation.setScriptExecutionDisabled', { value: true }));
|
||||
if (options.userAgent || options.locale)
|
||||
promises.push(this._client.send('Emulation.setUserAgentOverride', { userAgent: options.userAgent || '', acceptLanguage: options.locale }));
|
||||
if (options.locale)
|
||||
promises.push(this._client.send('Emulation.setLocaleOverride', { locale: options.locale }));
|
||||
if (options.timezoneId)
|
||||
promises.push(emulateTimezone(this._client, options.timezoneId));
|
||||
if (options.geolocation)
|
||||
|
@ -253,7 +253,7 @@ module.exports.describe = function({testRunner, expect, playwright, headless, FF
|
||||
});
|
||||
});
|
||||
|
||||
describe.skip(CHROMIUM || FFOX)('BrowserContext({locale})', function() {
|
||||
describe.skip(FFOX)('BrowserContext({locale})', function() {
|
||||
it('should affect accept-language header', async({browser, server}) => {
|
||||
const context = await browser.newContext({ locale: 'fr-CH' });
|
||||
const page = await context.newPage();
|
||||
|
Loading…
Reference in New Issue
Block a user