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

Cleanup brave shields tests and get rid of dead code. #3645

Merged
merged 5 commits into from
Oct 20, 2019

Conversation

iefremov
Copy link
Contributor

@iefremov iefremov commented Oct 9, 2019

Submitter Checklist:

brave/brave-browser#6313

Test Plan:

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.

@iefremov iefremov force-pushed the ie_bye_url_request branch 2 times, most recently from 88d81f0 to 2f1a273 Compare October 10, 2019 11:09
@iefremov iefremov changed the title WIP: Cleanup brave shields tests and get rid of dead code. Cleanup brave shields tests and get rid of dead code. Oct 10, 2019
@iefremov
Copy link
Contributor Author

Please review! Can be easier to review per-commit

@bsclifton
Copy link
Member

@iefremov can you give this a rebase?

Also - given that it's removing code, do you think it's critical for 0.70.x? (where Chromium 78 will land)

@iefremov
Copy link
Contributor Author

@iefremov can you give this a rebase?

Also - given that it's removing code, do you think it's critical for 0.70.x? (where Chromium 78 will land)

@bsclifton Yeah, I don't think it's crucial for release branches, this is just a cleanup

@iefremov iefremov force-pushed the ie_bye_url_request branch 2 times, most recently from da8d49e to ad7a139 Compare October 14, 2019 11:01
@iefremov
Copy link
Contributor Author

@bsclifton rebased

@iefremov
Copy link
Contributor Author

@yrliou @fmarier @jumde PTAL

@jumde jumde self-requested a review October 15, 2019 19:31
@jumde
Copy link
Contributor

jumde commented Oct 15, 2019

@iefremov - BraveSiteHacksNetworkDelegateHelperTest.QueryStringUntouched is failing

@jumde
Copy link
Contributor

jumde commented Oct 15, 2019

@iefremov - BraveSiteHacksNetworkDelegateHelperTest.QueryStringUntouched is failing

Looks like referrer_policy is not being set correctly. May be it needs to be set to CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE by default: https://cs.chromium.org/chromium/src/net/url_request/url_request.cc?l=565

@iefremov
Copy link
Contributor Author

iefremov commented Oct 16, 2019

@jumde Can't see the failure - passes locally and there are two failures on CI (BraveRewardsBrowserTest.RecurringAndPartialAutoContribution and network audit)

@jumde
Copy link
Contributor

jumde commented Oct 17, 2019

@jumde Can't see the failure - passes locally and there are two failures on CI (BraveRewardsBrowserTest.RecurringAndPartialAutoContribution and network audit)

I see this crash on Debug:

[9753:18179:1016/165853.222279:1468800861779372:ERROR:kill_posix.cc(84)] Unable to terminate process group 9829: No such process (3)
[ RUN      ] BraveSiteHacksNetworkDelegateHelperTest.QueryStringFiltered
[9829:775:1016/165852.794779:1468800434285169:FATAL:referrer.cc(184)] Check failed: false.
0   libbase.dylib                       0x00000001352cdf5f base::debug::CollectStackTrace(void**, unsigned long) + 31
1   libbase.dylib                       0x0000000134f7742b base::debug::StackTrace::StackTrace(unsigned long) + 75
2   libbase.dylib                       0x0000000134f774ad base::debug::StackTrace::StackTrace(unsigned long) + 29
3   libbase.dylib                       0x0000000134f77488 base::debug::StackTrace::StackTrace() + 40
4   libbase.dylib                       0x0000000134fc1573 logging::LogMessage::~LogMessage() + 131
5   libbase.dylib                       0x0000000134fc02d5 logging::LogMessage::~LogMessage() + 21
6   libcontent.dylib                    0x0000000141a1d50d content::Referrer::NetReferrerPolicyToBlinkReferrerPolicy(net::URLRequest::ReferrerPolicy) + 285
7   brave_unit_tests                    0x000000010a8a6481 brave::(anonymous namespace)::ApplyPotentialReferrerBlock(std::__1::shared_ptr<brave::BraveRequestInfo>) + 353
8   brave_unit_tests                    0x000000010a8a62a0 brave::OnBeforeURLRequest_SiteHacksWork(base::RepeatingCallback<void ()> const&, std::__1::shared_ptr<brave::BraveRequestInfo>) + 48
9   brave_unit_tests                    0x00000001077086fc BraveSiteHacksNetworkDelegateHelperTest_QueryStringFiltered_Test::TestBody() + 924
10  brave_unit_tests                    0x0000000107c561d4 void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) + 132
11  brave_unit_tests                    0x0000000107c3a0f2 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) + 114
12  brave_unit_tests                    0x0000000107c3a033 testing::Test::Run() + 195

@iefremov
Copy link
Contributor Author

I see this crash on Debug:

Oh, yess, we didn't initialize the enum properly. Fixed!

@iefremov
Copy link
Contributor Author

Fortunately it happens only in tests

Copy link
Contributor

@jumde jumde left a comment

Choose a reason for hiding this comment

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

lgtm

@iefremov iefremov force-pushed the ie_bye_url_request branch 2 times, most recently from 83e2c78 to 78350f8 Compare October 18, 2019 09:58
@iefremov iefremov merged commit 029b47e into master Oct 20, 2019
@iefremov iefremov deleted the ie_bye_url_request branch October 20, 2019 21:42
@bsclifton bsclifton added this to the 1.2.x - Dev milestone Dec 3, 2019
mkarolin pushed a commit that referenced this pull request Dec 3, 2019
Cleanup brave shields tests and get rid of dead code.
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.

3 participants