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

Side by Side Diff: components/domain_reliability/monitor_unittest.cc

Issue 656033008: Domain Reliability: Reenable AddBakedInConfigs test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove obsolete comment Created 6 years, 2 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
« no previous file with comments | « components/domain_reliability/bake_in_configs.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/domain_reliability/monitor.h" 5 #include "components/domain_reliability/monitor.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 BeaconVector beacons; 250 BeaconVector beacons;
251 context_->GetQueuedBeaconsForTesting(&beacons); 251 context_->GetQueuedBeaconsForTesting(&beacons);
252 EXPECT_EQ(1u, beacons.size()); 252 EXPECT_EQ(1u, beacons.size());
253 EXPECT_TRUE(beacons[0].server_ip.empty()); 253 EXPECT_TRUE(beacons[0].server_ip.empty());
254 254
255 EXPECT_TRUE(CheckRequestCounts(kAlwaysReportIndex, 1u, 0u)); 255 EXPECT_TRUE(CheckRequestCounts(kAlwaysReportIndex, 1u, 0u));
256 } 256 }
257 257
258 // Will fail when baked-in configs expire, as a reminder to update them. 258 // Will fail when baked-in configs expire, as a reminder to update them.
259 // (Contact ttuttle@chromium.org if this starts failing.) 259 // (Contact ttuttle@chromium.org if this starts failing.)
260 // Disabled due to expiration of redirector.gvt1.com. https://crbug.com/423590 260 TEST_F(DomainReliabilityMonitorTest, AddBakedInConfigs) {
261 TEST_F(DomainReliabilityMonitorTest, DISABLED_AddBakedInConfigs) {
262 // AddBakedInConfigs DCHECKs that the baked-in configs parse correctly, so 261 // AddBakedInConfigs DCHECKs that the baked-in configs parse correctly, so
263 // this unittest will fail if someone tries to add an invalid config to the 262 // this unittest will fail if someone tries to add an invalid config to the
264 // source tree. 263 // source tree.
265 monitor_.AddBakedInConfigs(); 264 monitor_.AddBakedInConfigs();
266 265
267 // Count the number of baked-in configs. 266 // Count the number of baked-in configs.
268 size_t num_baked_in_configs = 0; 267 size_t num_baked_in_configs = 0;
269 for (const char* const* p = kBakedInJsonConfigs; *p; ++p) 268 for (const char* const* p = kBakedInJsonConfigs; *p; ++p)
270 ++num_baked_in_configs; 269 ++num_baked_in_configs;
271 270
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 request.url = GURL("http://test.wildcard/always_report"); 382 request.url = GURL("http://test.wildcard/always_report");
384 OnRequestLegComplete(request); 383 OnRequestLegComplete(request);
385 384
386 EXPECT_TRUE(CheckRequestCounts(context1, kAlwaysReportIndex, 1u, 0u)); 385 EXPECT_TRUE(CheckRequestCounts(context1, kAlwaysReportIndex, 1u, 0u));
387 EXPECT_TRUE(CheckRequestCounts(context2, kAlwaysReportIndex, 0u, 0u)); 386 EXPECT_TRUE(CheckRequestCounts(context2, kAlwaysReportIndex, 0u, 0u));
388 } 387 }
389 388
390 } // namespace 389 } // namespace
391 390
392 } // namespace domain_reliability 391 } // namespace domain_reliability
OLDNEW
« no previous file with comments | « components/domain_reliability/bake_in_configs.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698