-
Notifications
You must be signed in to change notification settings - Fork 905
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
Don't check main frame requests through shields network delegate helper #8402
Conversation
"domAutomationController.send(clickLink('" + cross_url.spec() + "'));"; | ||
bool success = false; | ||
EXPECT_TRUE( | ||
ExecuteScriptAndExtractBool(web_contents(), clickLink.c_str(), &success)); |
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.
maybe rewrite this with EvalJs?
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.
good call, updated
// helper. | ||
const std::string location = | ||
EvalJs(web_contents(), "window.location.href").ExtractString(); | ||
ASSERT_STRNE("chrome-error://chromewebdata/", location.c_str()); |
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.
no need for c_str
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.
I think we do need it, when I remove it I get this:
../../third_party/googletest/src/googletest/include/gtest/gtest.h:1669:28: note: candidate function not viable: no known conversion from 'const std::string' (aka 'const basic_string<char>') to 'const char *' for 4th argument
GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,
^
../../third_party/googletest/src/googletest/include/gtest/gtest.h:1694:28: note: candidate function not viable: no known conversion from 'const char [30]' to 'const wchar_t *' for 3rd argument
GTEST_API_ AssertionResult CmpHelperSTRNE(const char* s1_expression,
7d51927
to
a49f954
Compare
Verification PASSED on
Test Cases from #8402 (comment):
Visited https://1-1ads.com and ensured that Brave brings up a "Suspicious site ahead" interstitial with a "Proceed" button as per the following: Test Cases from brave/brave-browser#15047 (comment): Ensured that selecting the |
Resolves brave/brave-browser#15047
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:
Visit https://shivankaul.com and click on the LinkedIn icon. The navigation to LinkedIn should not be blocked, both when
#brave-domain-block
is enabled and disabled under brave://flags.Also, ensure that when
#brave-domain-block
is enabled under brave://flags, visiting https://1-1ads.com brings up a "Suspicious site ahead" interstitial with a "Proceed" button.