-
Notifications
You must be signed in to change notification settings - Fork 878
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
Add bubble for enabling cookie consent blocking #14148
Conversation
A Storybook has been deployed to preview UI for the latest push |
77c45d8
to
cd6f91d
Compare
A Storybook has been deployed to preview UI for the latest push |
cd6f91d
to
9dcd1e0
Compare
A Storybook has been deployed to preview UI for the latest push |
9dcd1e0
to
2c3b83f
Compare
2c3b83f
to
b7784e4
Compare
A Storybook has been deployed to preview UI for the latest push |
b7784e4
to
a1e3f5d
Compare
A Storybook has been deployed to preview UI for the latest push |
a1e3f5d
to
181aa07
Compare
A Storybook has been deployed to preview UI for the latest push |
181aa07
to
871d505
Compare
A Storybook has been deployed to preview UI for the latest push |
871d505
to
282e058
Compare
A Storybook has been deployed to preview UI for the latest push |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed changes specifically under components/brave_shields/browser
. Those changes look good to me 👍
(leaving the reviewer checklist boxes for the next reviewer since I haven't covered the entire PR)
A Storybook has been deployed to preview UI for the latest push |
components/brave_shields/resources/cookie_list_opt_in/components/main-panel/index.tsx
Outdated
Show resolved
Hide resolved
7808c3d
to
ff3aa6e
Compare
A Storybook has been deployed to preview UI for the latest push |
browser/ui/views/brave_shields/cookie_list_opt_in_browsertest.cc
Outdated
Show resolved
Hide resolved
ff3aa6e
to
ca4158c
Compare
}); | ||
|
||
// Only one browser window should be showing the bubble on restore. | ||
EXPECT_EQ(count, 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also check that it's the active window/tab?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and also check that there are 2 windows. Is there any potential race here? Do we need to wait for session restore to finish before checking?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a check for 2 windows and added a restore wait. Since all browser windows are reported as inactive in browser tests (on MacOS anyway), and I can't find a way to force activation before the tab is loaded, there's no good way to test the active requirement that I'm currently aware of.
}; | ||
|
||
IN_PROC_BROWSER_TEST_F(CookieListOptInFirstRunBrowserTest, FirstRun) { | ||
EXPECT_FALSE(GetBubbleWebContents()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we also wait for session restore, ensure the active tab has finished loading and kAdBlockCookieListOptInShown
is false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to wait for restore and added check for kAdBlockCookieListOptInShown
. Browser tests automatically wait for the first tab to finish loading (see here).
A Storybook has been deployed to preview UI for the latest push |
ca4158c
to
628ac2c
Compare
A Storybook has been deployed to preview UI for the latest push |
628ac2c
to
26eb2c6
Compare
A Storybook has been deployed to preview UI for the latest push |
Resolves brave/brave-browser#10433
Overview:
components/brave_shields/resources/cookie_list_opt_in
, along with supporting Mojo types and UI classes.BrowserUserData
helper has been added that is responsible for:WebUIBubbleManager
for the bubble.Submitter Checklist:
QA/Yes
orQA/No
;release-notes/include
orrelease-notes/exclude
;OS/...
) to the associated issuenpm run test -- brave_browser_tests
,npm run test -- brave_unit_tests
,npm run lint
,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan:
New profiles
brave://adblock
.Clicking the X
Closing the bubble