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

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

Issue 404363003: Domain Reliability: Add wildcard domain support. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests, finally Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | components/domain_reliability/monitor.h » ('j') | 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/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
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
OLDNEW
« no previous file with comments | « no previous file | components/domain_reliability/monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698