Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lang): emulate language on firefox #1453

Merged
merged 1 commit into from
Mar 21, 2020

Conversation

pavelfeldman
Copy link
Member

No description provided.

@pavelfeldman pavelfeldman force-pushed the fe_lang2 branch 2 times, most recently from 6776ea5 to 2b4155b Compare March 21, 2020 00:08
@@ -308,7 +308,7 @@ module.exports.describe = function({testRunner, expect, playwright, headless, FF
expect(await page.evaluate(() => navigator.language)).toBe('fr-CH');
await context.close();
});
it('should format number', async({browser, server}) => {
it.fail(FFOX)('should format number', async({browser, server}) => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why doesn't this work?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to patch builtins w/ locale data.

if (this._options.locale) {
if (!this._options.extraHTTPHeaders)
this._options.extraHTTPHeaders = {};
this._options.extraHTTPHeaders['Accept-Language'] = this._options.locale;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should leave options.extraHTTPHeaders as is and instead update FFBrowserContext.setExtraHTTPHeaders.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@pavelfeldman pavelfeldman merged commit e210e56 into microsoft:master Mar 21, 2020
@pavelfeldman pavelfeldman deleted the fe_lang2 branch April 17, 2020 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants