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

Unified Diff: chrome/browser/safe_browsing/certificate_reporting_service_test_utils.h

Issue 2503243003: Wire up CertificateReportingService to handle report uploads (Closed)
Patch Set: Rebase onto crrev/2543523002 Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/safe_browsing/certificate_reporting_service_test_utils.h
diff --git a/chrome/browser/safe_browsing/certificate_reporting_service_test_utils.h b/chrome/browser/safe_browsing/certificate_reporting_service_test_utils.h
index 627de9b75cbfb29aeb1e3f0099d6b72b5680dee3..a1a524ae85512148b61bd5d72c6f09c4552443b4 100644
--- a/chrome/browser/safe_browsing/certificate_reporting_service_test_utils.h
+++ b/chrome/browser/safe_browsing/certificate_reporting_service_test_utils.h
@@ -144,6 +144,19 @@ class CertReportJobInterceptor : public net::URLRequestInterceptor {
class CertificateReportingServiceTestBase {
public:
+ enum ObservedReportEvent {
+ // No event should be observed. This can happen when hanging report requests
+ // are allowed to complete.
+ EXPECT_NONE,
+ // Indicates that the send attempt is completed.
+ EXPECT_SEND_ATTEMPT_COMPLETED,
+ // Indicates that the send attempt is cancelled (e.g. extended reporting was
+ // not opted in).
+ EXPECT_SEND_ATTEMPT_CANCELLED,
+ // Expect the service to be reset.
+ EXPECT_SERVICE_RESET,
+ };
+
CertificateReportingServiceTestBase();
virtual ~CertificateReportingServiceTestBase();
@@ -155,6 +168,11 @@ class CertificateReportingServiceTestBase {
// calling this method.
void ResumeDelayedRequest();
+ void CheckExpectedResults(const ReportEventObserver& observer,
+ ObservedReportEvent expected_observed_event,
+ const std::set<int>& expected_successful_report_ids,
+ const std::set<int>& expected_failed_report_ids);
+
protected:
void SetUpInterceptor();

Powered by Google App Engine
This is Rietveld 408576698