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

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

Issue 8997008: Move AccessTokenStore to Content API, now that it is a pure-virtual class. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge to head (pure merge). Created 9 years 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "content/browser/geolocation/arbitrator_dependency_factory.h" 6 #include "content/browser/geolocation/arbitrator_dependency_factory.h"
7 #include "content/browser/geolocation/fake_access_token_store.h" 7 #include "content/browser/geolocation/fake_access_token_store.h"
8 #include "content/browser/geolocation/geolocation_observer.h" 8 #include "content/browser/geolocation/geolocation_observer.h"
9 #include "content/browser/geolocation/location_arbitrator.h" 9 #include "content/browser/geolocation/location_arbitrator.h"
10 #include "content/browser/geolocation/location_provider.h" 10 #include "content/browser/geolocation/location_provider.h"
11 #include "content/browser/geolocation/mock_location_provider.h" 11 #include "content/browser/geolocation/mock_location_provider.h"
12 #include "content/common/geoposition.h" 12 #include "content/common/geoposition.h"
13 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
14 14
15 using content::AccessTokenStore;
16 using content::FakeAccessTokenStore;
17
15 namespace { 18 namespace {
16 19
17 class MockLocationObserver : public GeolocationObserver { 20 class MockLocationObserver : public GeolocationObserver {
18 public: 21 public:
19 void InvalidateLastPosition() { 22 void InvalidateLastPosition() {
20 last_position_.latitude = 100; 23 last_position_.latitude = 100;
21 last_position_.error_code = Geoposition::ERROR_CODE_NONE; 24 last_position_.error_code = Geoposition::ERROR_CODE_NONE;
22 ASSERT_FALSE(last_position_.IsInitialized()); 25 ASSERT_FALSE(last_position_.IsInitialized());
23 } 26 }
24 // Delegate 27 // Delegate
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 CheckLastPositionInfo(3.5657104, 139.690341, 300); 283 CheckLastPositionInfo(3.5657104, 139.690341, 300);
281 284
282 // 2 minutes later 285 // 2 minutes later
283 AdvanceTimeNow(base::TimeDelta::FromMinutes(2)); 286 AdvanceTimeNow(base::TimeDelta::FromMinutes(2));
284 // Arrive in station. Cell moves but GPS is stale. Switch to fresher cell. 287 // Arrive in station. Cell moves but GPS is stale. Switch to fresher cell.
285 SetPositionFix(cell(), 3.5658700, 139.069979, 1000); 288 SetPositionFix(cell(), 3.5658700, 139.069979, 1000);
286 CheckLastPositionInfo(3.5658700, 139.069979, 1000); 289 CheckLastPositionInfo(3.5658700, 139.069979, 1000);
287 } 290 }
288 291
289 } // namespace 292 } // namespace
OLDNEW
« no previous file with comments | « content/browser/geolocation/location_arbitrator.cc ('k') | content/browser/geolocation/location_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698