-
Notifications
You must be signed in to change notification settings - Fork 816
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
Browser test fixes #23657
base: master
Are you sure you want to change the base?
Browser test fixes #23657
Conversation
} | ||
|
||
void SetUpOnMainThread() override { | ||
mock_cert_verifier_.mock_cert_verifier()->set_default_result(net::OK); | ||
host_resolver()->AddRule("*:*", "127.0.0.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.
This was removed but not added back - does it need to be added above under SetUpOnMainThread
?
brave::RegisterPathProvider(); | ||
|
||
// Reuse upstream test files in content. | ||
content::RegisterPathProvider(); |
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.
was this weird behavior (registering our path provider... then content path provider) needed because paths were registered so many times? Really curious why that was added 🤔
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.
all of the path registration stuff was a mess. It's fixed now
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.
Building and running tests to try it out - but went over ever change, left some comments.
Changes LGTM. Super nice cleanup in chromium_src/chrome/app/chrome_main_delegate.cc
! 😄
Also nice to have the override simplification in chromium_src/chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
Probably already known - but I get a ton of crashes when running |
224c009
to
047ca37
Compare
@@ -71,11 +71,6 @@ class BlobUrlBrowserTestBase : public EphemeralStorageBrowserTest { | |||
}; | |||
using FramesWithRegisteredBlobs = std::vector<RenderFrameHostBlobData>; | |||
|
|||
void SetUpOnMainThread() override { | |||
EphemeralStorageBrowserTest::SetUpOnMainThread(); | |||
ASSERT_TRUE(embedded_test_server()->Start()); |
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 don't follow why this is moved
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 had to resolve several issues across tests that subclass EphemeralStorageBrowserTest
so I moved it there to simplify things.
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 don't recall the exact problem now, but I think maybe it needed be called before https://github.com/brave/brave-core/pull/23657/files/7091e291ca6d99689b310ff5aac503373442412b#diff-ad1b5bc543791a83f0e762f32a01e88544b826f9ecdad47ce2b8a49461cf7a7bR192
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.
Brave Ads LGTM
bf7b339
to
42ef212
Compare
[puLL-Merge] - brave/brave-core@23657 Here is my review of the PR changes: DescriptionThis PR makes several changes related to how Brave registers custom path providers and sets up embedded test servers for browser tests. The main changes are:
The motivation seems to be simplifying the path provider registration and browser test setup code. ChangesChanges
Let me know if you have any other questions! |
Resolves brave/brave-browser#38325
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
wikinpm run presubmit
wiki,npm run gn_check
,npm run tslint
git rebase master
(if needed)Reviewer Checklist:
gn
After-merge Checklist:
changes has landed on
Test Plan: