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

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: rebase; don't print all json file names 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
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 // Disabled due to expiration of redirector.gvt1.com. https://crbug.com/423590
davidben 2014/10/20 20:51:31 Nit: I'm guessing this comment should be removed.
Deprecated (see juliatuttle) 2014/10/20 21:07:47 Done.
261 TEST_F(DomainReliabilityMonitorTest, DISABLED_AddBakedInConfigs) { 261 TEST_F(DomainReliabilityMonitorTest, AddBakedInConfigs) {
262 // AddBakedInConfigs DCHECKs that the baked-in configs parse correctly, so 262 // 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 263 // this unittest will fail if someone tries to add an invalid config to the
264 // source tree. 264 // source tree.
265 monitor_.AddBakedInConfigs(); 265 monitor_.AddBakedInConfigs();
266 266
267 // Count the number of baked-in configs. 267 // Count the number of baked-in configs.
268 size_t num_baked_in_configs = 0; 268 size_t num_baked_in_configs = 0;
269 for (const char* const* p = kBakedInJsonConfigs; *p; ++p) 269 for (const char* const* p = kBakedInJsonConfigs; *p; ++p)
270 ++num_baked_in_configs; 270 ++num_baked_in_configs;
271 271
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 request.url = GURL("http://test.wildcard/always_report"); 383 request.url = GURL("http://test.wildcard/always_report");
384 OnRequestLegComplete(request); 384 OnRequestLegComplete(request);
385 385
386 EXPECT_TRUE(CheckRequestCounts(context1, kAlwaysReportIndex, 1u, 0u)); 386 EXPECT_TRUE(CheckRequestCounts(context1, kAlwaysReportIndex, 1u, 0u));
387 EXPECT_TRUE(CheckRequestCounts(context2, kAlwaysReportIndex, 0u, 0u)); 387 EXPECT_TRUE(CheckRequestCounts(context2, kAlwaysReportIndex, 0u, 0u));
388 } 388 }
389 389
390 } // namespace 390 } // namespace
391 391
392 } // namespace domain_reliability 392 } // namespace domain_reliability
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698