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

Side by Side Diff: content/browser/geolocation/network_location_provider_unittest.cc

Issue 252323006: Renamed namespaces in src/content. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Tue 04/29/2014 19:25:43.09 Created 6 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/json/json_reader.h" 5 #include "base/json/json_reader.h"
6 #include "base/json/json_writer.h" 6 #include "base/json/json_writer.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 << "Actual dictionary " << PrettyJson(actual) 227 << "Actual dictionary " << PrettyJson(actual)
228 << " is missing field " << field; 228 << " is missing field " << field;
229 if (!expected_value->Equals(actual_value)) 229 if (!expected_value->Equals(actual_value))
230 return testing::AssertionFailure() 230 return testing::AssertionFailure()
231 << "Field " << field << " mismatch: " << PrettyJson(*expected_value) 231 << "Field " << field << " mismatch: " << PrettyJson(*expected_value)
232 << " != " << PrettyJson(*actual_value); 232 << " != " << PrettyJson(*actual_value);
233 return testing::AssertionSuccess(); 233 return testing::AssertionSuccess();
234 } 234 }
235 235
236 static GURL UrlWithoutQuery(const GURL& url) { 236 static GURL UrlWithoutQuery(const GURL& url) {
237 url_canon::Replacements<char> replacements; 237 url::Replacements<char> replacements;
238 replacements.ClearQuery(); 238 replacements.ClearQuery();
239 return url.ReplaceComponents(replacements); 239 return url.ReplaceComponents(replacements);
240 } 240 }
241 241
242 testing::AssertionResult IsTestServerUrl(const GURL& request_url) { 242 testing::AssertionResult IsTestServerUrl(const GURL& request_url) {
243 const GURL a(UrlWithoutQuery(test_server_url_)); 243 const GURL a(UrlWithoutQuery(test_server_url_));
244 const GURL b(UrlWithoutQuery(request_url)); 244 const GURL b(UrlWithoutQuery(request_url));
245 if (a == b) 245 if (a == b)
246 return testing::AssertionSuccess(); 246 return testing::AssertionSuccess();
247 return testing::AssertionFailure() << a << " != " << b; 247 return testing::AssertionFailure() << a << " != " << b;
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 EXPECT_TRUE(cache.FindPosition(CreateReferenceWifiScanData(1))); 556 EXPECT_TRUE(cache.FindPosition(CreateReferenceWifiScanData(1)));
557 } else { 557 } else {
558 const int evicted = i - kCacheSize; 558 const int evicted = i - kCacheSize;
559 EXPECT_FALSE(cache.FindPosition(CreateReferenceWifiScanData(evicted))); 559 EXPECT_FALSE(cache.FindPosition(CreateReferenceWifiScanData(evicted)));
560 EXPECT_TRUE(cache.FindPosition(CreateReferenceWifiScanData(evicted + 1))); 560 EXPECT_TRUE(cache.FindPosition(CreateReferenceWifiScanData(evicted + 1)));
561 } 561 }
562 } 562 }
563 } 563 }
564 564
565 } // namespace content 565 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/frame_host/navigation_controller_impl.cc ('k') | content/browser/histogram_internals_request_job.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698