| OLD | NEW |
| 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/memory/singleton.h" | 5 #include "base/memory/singleton.h" |
| 6 #include "base/synchronization/waitable_event.h" | 6 #include "base/synchronization/waitable_event.h" |
| 7 #include "content/browser/geolocation/arbitrator_dependency_factories_for_test.h
" | 7 #include "content/browser/geolocation/arbitrator_dependency_factories_for_test.h
" |
| 8 #include "content/browser/geolocation/fake_access_token_store.h" | 8 #include "content/browser/geolocation/fake_access_token_store.h" |
| 9 #include "content/browser/geolocation/geolocation_provider.h" | 9 #include "content/browser/geolocation/geolocation_provider.h" |
| 10 #include "content/browser/geolocation/location_arbitrator.h" | 10 #include "content/browser/geolocation/location_arbitrator.h" |
| 11 #include "content/browser/geolocation/mock_location_provider.h" | 11 #include "content/browser/geolocation/mock_location_provider.h" |
| 12 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 using content::AccessTokenStore; | 15 using content::AccessTokenStore; |
| 16 using content::FakeAccessTokenStore; | 16 using content::FakeAccessTokenStore; |
| 17 using content::Geoposition; |
| 17 using testing::_; | 18 using testing::_; |
| 18 using testing::DoAll; | 19 using testing::DoAll; |
| 19 using testing::DoDefault; | 20 using testing::DoDefault; |
| 20 using testing::Invoke; | 21 using testing::Invoke; |
| 21 using testing::InvokeWithoutArgs; | 22 using testing::InvokeWithoutArgs; |
| 22 | 23 |
| 23 namespace { | 24 namespace { |
| 24 | 25 |
| 25 class GeolocationProviderTest : public testing::Test { | 26 class GeolocationProviderTest : public testing::Test { |
| 26 protected: | 27 protected: |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 testing::Field( | 207 testing::Field( |
| 207 &Geoposition::error_code, | 208 &Geoposition::error_code, |
| 208 testing::Eq(Geoposition::ERROR_CODE_POSITION_UNAVAILABLE)))); | 209 testing::Eq(Geoposition::ERROR_CODE_POSITION_UNAVAILABLE)))); |
| 209 provider_->AddObserver(&mock_observer, GeolocationObserverOptions()); | 210 provider_->AddObserver(&mock_observer, GeolocationObserverOptions()); |
| 210 provider_->RemoveObserver(&mock_observer); | 211 provider_->RemoveObserver(&mock_observer); |
| 211 | 212 |
| 212 GeolocationArbitrator::SetDependencyFactoryForTest(NULL); | 213 GeolocationArbitrator::SetDependencyFactoryForTest(NULL); |
| 213 } | 214 } |
| 214 | 215 |
| 215 } // namespace | 216 } // namespace |
| OLD | NEW |