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

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/incident_reporting_service_unittest.cc

Issue 2692843002: Fail tests fast if overriding the Windows registry fails. (Closed)
Patch Set: sync to position 450085 Created 3 years, 10 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/safe_browsing/incident_reporting/incident_reporting_ser vice.h" 5 #include "chrome/browser/safe_browsing/incident_reporting/incident_reporting_ser vice.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <map> 9 #include <map>
10 #include <string> 10 #include <string>
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 download_finder_created_(), 205 download_finder_created_(),
206 download_finder_destroyed_(), 206 download_finder_destroyed_(),
207 uploader_destroyed_(), 207 uploader_destroyed_(),
208 delayed_analysis_ran_() {} 208 delayed_analysis_ran_() {}
209 209
210 void SetUp() override { 210 void SetUp() override {
211 testing::Test::SetUp(); 211 testing::Test::SetUp();
212 #if defined(OS_WIN) 212 #if defined(OS_WIN)
213 // Redirect HKCU so that the platform state store used by the test doesn't 213 // Redirect HKCU so that the platform state store used by the test doesn't
214 // collide with existing Chrome installs or other tests running in parallel. 214 // collide with existing Chrome installs or other tests running in parallel.
215 registry_override_manager_.OverrideRegistry(HKEY_CURRENT_USER); 215 ASSERT_NO_FATAL_FAILURE(
216 registry_override_manager_.OverrideRegistry(HKEY_CURRENT_USER));
216 #endif 217 #endif
217 ASSERT_TRUE(profile_manager_.SetUp()); 218 ASSERT_TRUE(profile_manager_.SetUp());
218 } 219 }
219 220
220 void SetFieldTrialAndCreateService(bool enabled) { 221 void SetFieldTrialAndCreateService(bool enabled) {
221 field_trial_list_.reset( 222 field_trial_list_.reset(
222 new base::FieldTrialList( 223 new base::FieldTrialList(
223 base::MakeUnique<base::MockEntropyProvider>())); 224 base::MakeUnique<base::MockEntropyProvider>()));
224 field_trial_ = base::FieldTrialList::CreateFieldTrial( 225 field_trial_ = base::FieldTrialList::CreateFieldTrial(
225 "SafeBrowsingIncidentReportingService", 226 "SafeBrowsingIncidentReportingService",
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 1492
1492 // Ensure that no report processing remains. 1493 // Ensure that no report processing remains.
1493 ASSERT_FALSE(instance_->IsProcessingReport()); 1494 ASSERT_FALSE(instance_->IsProcessingReport());
1494 } 1495 }
1495 1496
1496 // Parallel uploads 1497 // Parallel uploads
1497 // Shutdown during processing 1498 // Shutdown during processing
1498 // environment colection taking longer than incident delay timer 1499 // environment colection taking longer than incident delay timer
1499 // environment colection taking longer than incident delay timer, and then 1500 // environment colection taking longer than incident delay timer, and then
1500 // another incident arriving 1501 // another incident arriving
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698