Skip to content
This repository was archived by the owner on Dec 11, 2019. It is now read-only.

Allow for a per-locale default search engine (value comes from config) #14713

Merged
merged 1 commit into from
Jul 31, 2018
Merged

Allow for a per-locale default search engine (value comes from config) #14713

merged 1 commit into from
Jul 31, 2018

Conversation

bsclifton
Copy link
Member

@bsclifton bsclifton commented Jul 11, 2018

Fixes #14647

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed. (Ask a Brave employee to help if you cannot access this document.)

Test Plan:

  1. Grab source code
  2. Either Delete or move out of the way your brave-development profile directory
  3. Uncomment these two lines: https://github.com/bsclifton/browser-laptop/blob/bfdba0e5ec440f3f31bf9c87aec12557a0861173/js/constants/config.js#L49-L50
  4. If you're not in the US, set your locale as English / US (note: this may not be trivial on macOS if you're using an Apple account; locale seems to be tied to iTunes region. I could be wrong)
  5. Launch browser
  6. Your default search engine should be GitHub (visit about:preferences#search)
  7. Delete the brave-development profile directory
  8. Set your locale as Spanish / Mexico
  9. Launch browser
  10. Your default search engine should be YouTube (visit about:preferences#search)

Automated test plan:

npm run unittest -- --grep="setDefaultSearchEngine"

Reviewer Checklist:

  • Request a security/privacy review as needed if one was not already requested.

Tests

  • Adequate test coverage exists to prevent regressions
  • Tests should be independent and work correctly when run individually or as a suite ref
  • New files have MPL2 license header

Copy link
Member

@diracdeltas diracdeltas left a comment

Choose a reason for hiding this comment

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

seems to work

@bsclifton bsclifton merged commit 5c46b3b into brave:master Jul 31, 2018
@bsclifton bsclifton deleted the search-engine-by-region-config branch July 31, 2018 18:07
bsclifton added a commit that referenced this pull request Jul 31, 2018
Allow for a per-locale default search engine (value comes from config)
bsclifton added a commit that referenced this pull request Jul 31, 2018
Allow for a per-locale default search engine (value comes from config)
@bsclifton
Copy link
Member Author

master 5c46b3b
0.24.x a59631a
0.23.x 33d5246

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants