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

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

Issue 2192683003: Revert of Reland: Geolocation: move from content/browser to device/ (patchset #2 id:20001 of https:… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2810
Patch Set: Created 4 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
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 "device/geolocation/location_arbitrator_impl.h" 5 #include "content/browser/geolocation/location_arbitrator_impl.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
11 #include "device/geolocation/fake_access_token_store.h" 11 #include "content/browser/geolocation/fake_access_token_store.h"
12 #include "device/geolocation/geolocation_delegate.h" 12 #include "content/browser/geolocation/mock_location_provider.h"
13 #include "device/geolocation/geoposition.h" 13 #include "content/public/browser/geolocation_delegate.h"
14 #include "device/geolocation/mock_location_provider.h" 14 #include "content/public/common/geoposition.h"
15 #include "content/test/test_content_browser_client.h"
15 #include "testing/gmock/include/gmock/gmock.h" 16 #include "testing/gmock/include/gmock/gmock.h"
16 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
17 18
18 using ::testing::NiceMock; 19 using ::testing::NiceMock;
19 20
20 namespace device { 21 namespace content {
21 22
22 class MockLocationObserver { 23 class MockLocationObserver {
23 public: 24 public:
24 // Need a vtable for GMock. 25 // Need a vtable for GMock.
25 virtual ~MockLocationObserver() {} 26 virtual ~MockLocationObserver() {}
26 void InvalidateLastPosition() { 27 void InvalidateLastPosition() {
27 last_position_.latitude = 100; 28 last_position_.latitude = 100;
28 last_position_.error_code = Geoposition::ERROR_CODE_NONE; 29 last_position_.error_code = Geoposition::ERROR_CODE_NONE;
29 ASSERT_FALSE(last_position_.Validate()); 30 ASSERT_FALSE(last_position_.Validate());
30 } 31 }
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 access_token_store_->NotifyDelegateTokensLoaded(); 433 access_token_store_->NotifyDelegateTokensLoaded();
433 434
434 // Advance the time a short while to simulate successive calls. 435 // Advance the time a short while to simulate successive calls.
435 AdvanceTimeNow(base::TimeDelta::FromMilliseconds(5)); 436 AdvanceTimeNow(base::TimeDelta::FromMilliseconds(5));
436 437
437 // Update with a less accurate position to verify 240956. 438 // Update with a less accurate position to verify 240956.
438 SetPositionFix(cell(), 3, 139, 150); 439 SetPositionFix(cell(), 3, 139, 150);
439 CheckLastPositionInfo(3, 139, 150); 440 CheckLastPositionInfo(3, 139, 150);
440 } 441 }
441 442
442 } // namespace device 443 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/geolocation/location_arbitrator_impl.cc ('k') | content/browser/geolocation/location_provider_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698