OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |