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

default browser check should run only on release build #4959

Merged
merged 1 commit into from
Oct 19, 2016

Conversation

darkdh
Copy link
Member

@darkdh darkdh commented Oct 19, 2016

  • 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).

fix #4958

Auditors: @bridiver, @bbondy

Test Plan:

  1. Make sure there is no session data
  2. npm run start/test should not popup the check default browser modal
    and overrides brave as default browser.
  3. BRAVE_IS_DEFAULT_BROWSER=true npm run start/test should not popup the check default browser modal
    and overrides brave as default browser.
  4. BRAVE_IS_DEFAULT_BROWSER=false npm run start/test should popup the check default browser modal
    and overrides brave not be default browser.

@darkdh darkdh added this to the 0.12.6dev milestone Oct 19, 2016
getSetting(settings.CHECK_DEFAULT_ON_STARTUP)
getSetting(settings.CHECK_DEFAULT_ON_STARTUP) &&
process.env.NODE_ENV !== 'development' &&
process.env.NODE_ENV !== 'test'
Copy link
Collaborator

Choose a reason for hiding this comment

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

this looks good, but I think you probably want to add an option to override this check so we can test this without triggering it on every test. Maybe something like process.env.BRAVE_FORCE_CHECK_DEFAULT_ON_STARTUP which would run it regardless of the NODE_ENV or other settings

Copy link
Member

Choose a reason for hiding this comment

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

+1 on @bridiver's recommendation 😄

BRAVE_IS_DEFAULT_BROWSER for test purpose

fix brave#4958

Auditors: @bridiver, @bbondy

Test Plan:
1. Make sure there is no session data
2. npm run start/test should not popup the check default browser modal
and overrides brave as default browser.
3. BRAVE_IS_DEFAULT_BROWSER=true npm run start/test should not popup the check default browser modal
and overrides brave as default browser.
4. BRAVE_IS_DEFAULT_BROWSER=false npm run start/test should popup the check default browser modal
and overrides brave not be default browser.
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.

default browser check should run only on release build
4 participants