| 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/context.h" | 5 #include "components/domain_reliability/context.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 "\"request_age_ms\":300250,\"request_elapsed_ms\":250," | 169 "\"request_age_ms\":300250,\"request_elapsed_ms\":250," |
| 170 "\"resource\":\"always_report\",\"server_ip\":\"127.0.0.1\"," | 170 "\"resource\":\"always_report\",\"server_ip\":\"127.0.0.1\"," |
| 171 "\"status\":\"ok\"}]," | 171 "\"status\":\"ok\"}]," |
| 172 "\"reporter\":\"test-reporter\"," | 172 "\"reporter\":\"test-reporter\"," |
| 173 "\"resources\":[{\"failed_requests\":0,\"name\":\"always_report\"," | 173 "\"resources\":[{\"failed_requests\":0,\"name\":\"always_report\"," |
| 174 "\"successful_requests\":1}]}"; | 174 "\"successful_requests\":1}]}"; |
| 175 | 175 |
| 176 time_.Advance(max_delay()); | 176 time_.Advance(max_delay()); |
| 177 EXPECT_TRUE(upload_pending()); | 177 EXPECT_TRUE(upload_pending()); |
| 178 EXPECT_EQ(kExpectedReport, upload_report()); | 178 EXPECT_EQ(kExpectedReport, upload_report()); |
| 179 EXPECT_EQ(GURL("https://example/upload"), upload_url()); | 179 EXPECT_EQ(GURL("https://exampleuploader/upload"), upload_url()); |
| 180 CallUploadCallback(true); | 180 CallUploadCallback(true); |
| 181 | 181 |
| 182 EXPECT_TRUE(CheckNoBeacons()); | 182 EXPECT_TRUE(CheckNoBeacons()); |
| 183 EXPECT_TRUE(CheckCounts(0, 0, 0)); | 183 EXPECT_TRUE(CheckCounts(0, 0, 0)); |
| 184 EXPECT_TRUE(CheckCounts(1, 0, 0)); | 184 EXPECT_TRUE(CheckCounts(1, 0, 0)); |
| 185 } | 185 } |
| 186 | 186 |
| 187 } // namespace | 187 } // namespace |
| 188 } // namespace domain_reliability | 188 } // namespace domain_reliability |
| OLD | NEW |