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

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

Issue 6591034: Move core pieces of geolocation from chrome to content.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix Linux build Created 9 years, 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "chrome/browser/geolocation/network_location_provider.h"
6
7 #include "base/json/json_reader.h" 5 #include "base/json/json_reader.h"
8 #include "base/scoped_ptr.h" 6 #include "base/scoped_ptr.h"
9 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
10 #include "base/values.h" 8 #include "base/values.h"
11 #include "chrome/browser/geolocation/fake_access_token_store.h"
12 #include "chrome/common/net/test_url_fetcher_factory.h" 9 #include "chrome/common/net/test_url_fetcher_factory.h"
10 #include "content/browser/geolocation/fake_access_token_store.h"
11 #include "content/browser/geolocation/network_location_provider.h"
13 #include "net/url_request/url_request_status.h" 12 #include "net/url_request/url_request_status.h"
14 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
15 14
16 namespace { 15 namespace {
17 16
18 // Constants used in multiple tests. 17 // Constants used in multiple tests.
19 const char kTestServerUrl[] = "https://www.geolocation.test/service"; 18 const char kTestServerUrl[] = "https://www.geolocation.test/service";
20 const char kTestHost[] = "myclienthost.test"; 19 const char kTestHost[] = "myclienthost.test";
21 const char kTestHostUrl[] = "http://myclienthost.test/some/path"; 20 const char kTestHostUrl[] = "http://myclienthost.test/some/path";
22 // Using #define so we can easily paste this into various other strings. 21 // Using #define so we can easily paste this into various other strings.
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 const int evicted = i - kCacheSize; 771 const int evicted = i - kCacheSize;
773 EXPECT_FALSE(cache.FindPosition(CreateReferenceRouterData(2), 772 EXPECT_FALSE(cache.FindPosition(CreateReferenceRouterData(2),
774 CreateReferenceWifiScanData(evicted))); 773 CreateReferenceWifiScanData(evicted)));
775 EXPECT_TRUE(cache.FindPosition(CreateReferenceRouterData(2), 774 EXPECT_TRUE(cache.FindPosition(CreateReferenceRouterData(2),
776 CreateReferenceWifiScanData(evicted + 1))); 775 CreateReferenceWifiScanData(evicted + 1)));
777 } 776 }
778 } 777 }
779 } 778 }
780 779
781 } // namespace 780 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698