Chromium Code Reviews| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 229 OnRequestLegComplete(request); | 229 OnRequestLegComplete(request); |
| 230 | 230 |
| 231 EXPECT_EQ(1u, CountPendingBeacons(kAlwaysReportIndex)); | 231 EXPECT_EQ(1u, CountPendingBeacons(kAlwaysReportIndex)); |
| 232 EXPECT_TRUE(CheckRequestCounts(kAlwaysReportIndex, 1u, 0u)); | 232 EXPECT_TRUE(CheckRequestCounts(kAlwaysReportIndex, 1u, 0u)); |
| 233 | 233 |
| 234 BeaconVector beacons; | 234 BeaconVector beacons; |
| 235 context_->GetQueuedDataForTesting(kAlwaysReportIndex, &beacons, NULL, NULL); | 235 context_->GetQueuedDataForTesting(kAlwaysReportIndex, &beacons, NULL, NULL); |
| 236 EXPECT_TRUE(beacons[0].server_ip.empty()); | 236 EXPECT_TRUE(beacons[0].server_ip.empty()); |
| 237 } | 237 } |
| 238 | 238 |
| 239 // Disabled; does not handle when baked in configs expire. | 239 // Will fail when baked-in configs expire, as a reminder to update them. |
|
davidben
2014/07/16 21:03:19
Maybe add your username so that, if it fails, peop
Deprecated (see juliatuttle)
2014/07/16 21:39:23
Done.
| |
| 240 TEST_F(DomainReliabilityMonitorTest, DISABLED_AddBakedInConfigs) { | 240 TEST_F(DomainReliabilityMonitorTest, AddBakedInConfigs) { |
| 241 // AddBakedInConfigs DCHECKs that the baked-in configs parse correctly, so | 241 // AddBakedInConfigs DCHECKs that the baked-in configs parse correctly, so |
| 242 // this unittest will fail if someone tries to add an invalid config to the | 242 // this unittest will fail if someone tries to add an invalid config to the |
| 243 // source tree. | 243 // source tree. |
| 244 monitor_.AddBakedInConfigs(); | 244 monitor_.AddBakedInConfigs(); |
| 245 | 245 |
| 246 // Count the number of baked-in configs. | 246 // Count the number of baked-in configs. |
| 247 size_t num_baked_in_configs = 0; | 247 size_t num_baked_in_configs = 0; |
| 248 for (const char* const* p = kBakedInJsonConfigs; *p; ++p) | 248 for (const char* const* p = kBakedInJsonConfigs; *p; ++p) |
| 249 ++num_baked_in_configs; | 249 ++num_baked_in_configs; |
| 250 | 250 |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 300 EXPECT_TRUE(CheckRequestCounts(kAlwaysReportIndex, 1u, 0u)); | 300 EXPECT_TRUE(CheckRequestCounts(kAlwaysReportIndex, 1u, 0u)); |
| 301 | 301 |
| 302 BeaconVector beacons; | 302 BeaconVector beacons; |
| 303 context_->GetQueuedDataForTesting(kAlwaysReportIndex, &beacons, NULL, NULL); | 303 context_->GetQueuedDataForTesting(kAlwaysReportIndex, &beacons, NULL, NULL); |
| 304 EXPECT_EQ(net::OK, beacons[0].chrome_error); | 304 EXPECT_EQ(net::OK, beacons[0].chrome_error); |
| 305 } | 305 } |
| 306 | 306 |
| 307 } // namespace | 307 } // namespace |
| 308 | 308 |
| 309 } // namespace domain_reliability | 309 } // namespace domain_reliability |
| OLD | NEW |