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

Explicitly set the default view for shield settings #4860

Merged
merged 2 commits into from
Mar 10, 2020

Conversation

bsclifton
Copy link
Member

@bsclifton bsclifton commented Mar 5, 2020

Defaults to:

  • advanced for existing users
  • simple for new users

Changing the default was not "locking in" the setting. This change
locks in that default.

Fixes brave/brave-browser#8533

Submitter Checklist:

Test Plan:

See brave/brave-browser#8533

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

After-merge Checklist:

  • The associated issue milestone is set to the smallest version that the
    changes has landed on.
  • All relevant documentation has been updated.

@bsclifton bsclifton added this to the 1.7.x - Nightly milestone Mar 5, 2020
@bsclifton bsclifton self-assigned this Mar 5, 2020
kShieldsAdvancedViewEnabled));
// verify that pref was set (and is not default)
const PrefService::Preference* pref =
Copy link
Member Author

Choose a reason for hiding this comment

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

updated test to verify value IS SET 👍

@bsclifton bsclifton added CI/skip-android Do not run CI builds for Android CI/skip-ios Do not run CI builds for iOS CI/skip-linux CI/skip-macos-x64 Do not run CI builds for macOS x64 labels Mar 5, 2020
@bsclifton
Copy link
Member Author

CI passed on all platforms, Windows ran into an issue during init. Will restart

@karenkliu
Copy link

@bsclifton Thanks for the hustle!! :)

Defaults to:
- advanced for existing users
- simple for new users

Changing the default was not "locking in" the setting. This change
locks in that default.

Fixes brave/brave-browser#8533
@bsclifton bsclifton removed CI/skip-android Do not run CI builds for Android CI/skip-ios Do not run CI builds for iOS CI/skip-linux CI/skip-macos-x64 Do not run CI builds for macOS x64 labels Mar 10, 2020
browser/profiles/brave_profile_impl.cc Outdated Show resolved Hide resolved
EXPECT_TRUE(
browser()->profile()->GetPrefs()->GetBoolean(
kShieldsAdvancedViewEnabled));
// verify that pref was set (and is not default)
Copy link
Member

@simonhong simonhong Mar 10, 2020

Choose a reason for hiding this comment

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

I think this test is redundant with above one? what is the purpose of this test?
Each browser tests uses fresh profile.
I assume you want spanning browser test? (https://www.chromium.org/developers/testing/browser-tests)

Copy link
Member Author

@bsclifton bsclifton Mar 10, 2020

Choose a reason for hiding this comment

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

Goal for this test is to have a non-first-run profile and verify that value does get set and that it's what we expect (advanced) 😄

Versus the one above, which is having an empty first-run profile and then verifying it gets simple view

Copy link
Member

Choose a reason for hiding this comment

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

Oh, I didn't know profile that used for this test is non-first-run profile :)
I thought all browser tests uses fresh test profile.

Copy link
Member

@simonhong simonhong left a comment

Choose a reason for hiding this comment

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

++

@bsclifton
Copy link
Member Author

CI looks good! Only had lint/deps failures which are being addressed in Master too. Good to merge 🎉

@bsclifton bsclifton merged commit aefeb53 into master Mar 10, 2020
@bsclifton bsclifton deleted the bsc-fix-default-shields branch March 10, 2020 16:57
bsclifton added a commit that referenced this pull request Oct 13, 2020
This was intended to lock in advanced view for existing users and has
done its job :) It's now obsolete

Fixes brave/brave-browser#12104

This contains a manual revert of #3154 and #4860
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.

Shields should show Simple view by default for new users + browser profiles
3 participants