Skip to content

Commit

Permalink
fix(chromium): make locale overrides work (#1108)
Browse files Browse the repository at this point in the history
  • Loading branch information
yury-s authored Feb 26, 2020
1 parent 3afaeef commit 4f69930
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/chromium/crPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion test/emulation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 4f69930

Please sign in to comment.