OLD | NEW |
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 "base/json/json_reader.h" | 5 #include "base/json/json_reader.h" |
6 #include "base/memory/scoped_ptr.h" | 6 #include "base/memory/scoped_ptr.h" |
7 #include "base/stringprintf.h" | 7 #include "base/stringprintf.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/common/net/test_url_fetcher_factory.h" | |
11 #include "content/browser/geolocation/fake_access_token_store.h" | 10 #include "content/browser/geolocation/fake_access_token_store.h" |
12 #include "content/browser/geolocation/network_location_provider.h" | 11 #include "content/browser/geolocation/network_location_provider.h" |
| 12 #include "content/common/test_url_fetcher_factory.h" |
13 #include "net/url_request/url_request_status.h" | 13 #include "net/url_request/url_request_status.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 namespace { | 16 namespace { |
17 | 17 |
18 // Constants used in multiple tests. | 18 // Constants used in multiple tests. |
19 const char kTestServerUrl[] = "https://www.geolocation.test/service"; | 19 const char kTestServerUrl[] = "https://www.geolocation.test/service"; |
20 const char kTestHost[] = "myclienthost.test"; | 20 const char kTestHost[] = "myclienthost.test"; |
21 const char kTestHostUrl[] = "http://myclienthost.test/some/path"; | 21 const char kTestHostUrl[] = "http://myclienthost.test/some/path"; |
22 // Using #define so we can easily paste this into various other strings. | 22 // Using #define so we can easily paste this into various other strings. |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
773 const int evicted = i - kCacheSize; | 773 const int evicted = i - kCacheSize; |
774 EXPECT_FALSE(cache.FindPosition(CreateReferenceRouterData(2), | 774 EXPECT_FALSE(cache.FindPosition(CreateReferenceRouterData(2), |
775 CreateReferenceWifiScanData(evicted))); | 775 CreateReferenceWifiScanData(evicted))); |
776 EXPECT_TRUE(cache.FindPosition(CreateReferenceRouterData(2), | 776 EXPECT_TRUE(cache.FindPosition(CreateReferenceRouterData(2), |
777 CreateReferenceWifiScanData(evicted + 1))); | 777 CreateReferenceWifiScanData(evicted + 1))); |
778 } | 778 } |
779 } | 779 } |
780 } | 780 } |
781 | 781 |
782 } // namespace | 782 } // namespace |
OLD | NEW |