Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Issue 2605403002: Fix flaky CertificateReportingService browser tests. (Closed)

Created:
3 years, 11 months ago by meacer
Modified:
3 years, 11 months ago
Reviewers:
Jialiu Lin, estark
CC:
chromium-reviews, grt+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix flaky CertificateReportingService browser tests. CertificateReportingService browser tests wait for the IO thread after sending a report or resetting the service. This doesn't seem reliable and the tests occasionally fail. A better approach is to: - For reports, wait for requests to be destroyed (CertificateReportingService unit test already does this). - For service resets, wait for a callback to be called. This CL does these: It removes WaitForIOThread calls from the browser test and replaces them with the above. It also refactors the following: - RequestObserver is shared between browser and unit tests. - NetworkDelegate is no longer used in the unit tests. RequestObserver is used instead. - All tests now expect no URL requests to remain during tear down. - The code to check expected reports is now shared. BUG=677560 Review-Url: https://codereview.chromium.org/2605403002 Cr-Commit-Position: refs/heads/master@{#442008} Committed: https://chromium.googlesource.com/chromium/src/+/ba3bd9c5fe080d75f8d451709dc42372b9083daa

Patch Set 1 #

Patch Set 2 : Clean up #

Patch Set 3 : Style #

Total comments: 2

Patch Set 4 : Fix build #

Patch Set 5 : Fix broken tests #

Total comments: 15

Patch Set 6 : estark comments #

Messages

Total messages: 29 (18 generated)
meacer
jialiul, estark: Can you please take a look? Thanks.
3 years, 11 months ago (2017-01-04 00:15:05 UTC) #5
Jialiu Lin
Seems some bots are not happy. LGTM in general. https://codereview.chromium.org/2605403002/diff/40001/chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc File chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc (right): https://codereview.chromium.org/2605403002/diff/40001/chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc#newcode195 chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc:195: ...
3 years, 11 months ago (2017-01-04 01:10:37 UTC) #8
meacer
https://codereview.chromium.org/2605403002/diff/40001/chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc File chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc (right): https://codereview.chromium.org/2605403002/diff/40001/chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc#newcode195 chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc:195: unsigned int num_expected_failed_report_ = -1; On 2017/01/04 01:10:37, Jialiu ...
3 years, 11 months ago (2017-01-04 01:49:21 UTC) #10
Jialiu Lin
On 2017/01/04 01:49:21, Mustafa Emre Acer wrote: > https://codereview.chromium.org/2605403002/diff/40001/chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc > File chrome/browser/safe_browsing/certificate_reporting_service_browsertest.cc > (right): > ...
3 years, 11 months ago (2017-01-04 01:52:52 UTC) #12
meacer
On 2017/01/04 01:52:52, Jialiu Lin wrote: > On 2017/01/04 01:49:21, Mustafa Emre Acer wrote: > ...
3 years, 11 months ago (2017-01-04 18:45:38 UTC) #17
Jialiu Lin
On 2017/01/04 18:45:38, Mustafa Emre Acer wrote: > On 2017/01/04 01:52:52, Jialiu Lin wrote: > ...
3 years, 11 months ago (2017-01-04 18:48:11 UTC) #18
estark
https://codereview.chromium.org/2605403002/diff/80001/chrome/browser/safe_browsing/certificate_reporting_service.h File chrome/browser/safe_browsing/certificate_reporting_service.h (right): https://codereview.chromium.org/2605403002/diff/80001/chrome/browser/safe_browsing/certificate_reporting_service.h#newcode156 chrome/browser/safe_browsing/certificate_reporting_service.h:156: const base::Callback<void()>& reset_callback); Instead of passing this to the ...
3 years, 11 months ago (2017-01-05 16:42:29 UTC) #21
meacer
https://codereview.chromium.org/2605403002/diff/80001/chrome/browser/safe_browsing/certificate_reporting_service.h File chrome/browser/safe_browsing/certificate_reporting_service.h (right): https://codereview.chromium.org/2605403002/diff/80001/chrome/browser/safe_browsing/certificate_reporting_service.h#newcode156 chrome/browser/safe_browsing/certificate_reporting_service.h:156: const base::Callback<void()>& reset_callback); On 2017/01/05 16:42:28, estark (slow thru ...
3 years, 11 months ago (2017-01-05 20:15:46 UTC) #22
estark
lgtm https://codereview.chromium.org/2605403002/diff/80001/chrome/browser/safe_browsing/certificate_reporting_service.h File chrome/browser/safe_browsing/certificate_reporting_service.h (right): https://codereview.chromium.org/2605403002/diff/80001/chrome/browser/safe_browsing/certificate_reporting_service.h#newcode156 chrome/browser/safe_browsing/certificate_reporting_service.h:156: const base::Callback<void()>& reset_callback); On 2017/01/05 20:15:46, Mustafa Emre ...
3 years, 11 months ago (2017-01-06 15:41:30 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2605403002/100001
3 years, 11 months ago (2017-01-06 18:28:20 UTC) #26
commit-bot: I haz the power
3 years, 11 months ago (2017-01-06 19:31:00 UTC) #29
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/ba3bd9c5fe080d75f8d451709dc4...

Powered by Google App Engine
This is Rietveld 408576698