| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/geolocation_provider.h" | |
| 6 | |
| 7 #include "base/singleton.h" | 5 #include "base/singleton.h" |
| 8 #include "chrome/browser/geolocation/arbitrator_dependency_factories_for_test.h" | 6 #include "content/browser/geolocation/arbitrator_dependency_factories_for_test.h
" |
| 9 #include "chrome/browser/geolocation/fake_access_token_store.h" | 7 #include "content/browser/geolocation/fake_access_token_store.h" |
| 10 #include "chrome/browser/geolocation/location_arbitrator.h" | 8 #include "content/browser/geolocation/geolocation_provider.h" |
| 11 #include "chrome/browser/geolocation/mock_location_provider.h" | 9 #include "content/browser/geolocation/location_arbitrator.h" |
| 10 #include "content/browser/geolocation/mock_location_provider.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 13 | 12 |
| 14 namespace { | 13 namespace { |
| 15 | 14 |
| 16 class GeolocationProviderTest : public testing::Test { | 15 class GeolocationProviderTest : public testing::Test { |
| 17 protected: | 16 protected: |
| 18 GeolocationProviderTest() | 17 GeolocationProviderTest() |
| 19 : provider_(new GeolocationProvider), | 18 : provider_(new GeolocationProvider), |
| 20 dependency_factory_( | 19 dependency_factory_( |
| 21 new GeolocationArbitratorDependencyFactoryWithLocationProvider( | 20 new GeolocationArbitratorDependencyFactoryWithLocationProvider( |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 provider_->RemoveObserver(&null_observer); | 142 provider_->RemoveObserver(&null_observer); |
| 144 message_loop_.Run(); | 143 message_loop_.Run(); |
| 145 EXPECT_EQ(MockLocationProvider::instance_->state_, | 144 EXPECT_EQ(MockLocationProvider::instance_->state_, |
| 146 MockLocationProvider::STOPPED); | 145 MockLocationProvider::STOPPED); |
| 147 EXPECT_TRUE(provider_->IsRunning()); | 146 EXPECT_TRUE(provider_->IsRunning()); |
| 148 | 147 |
| 149 GeolocationArbitrator::SetDependencyFactoryForTest(NULL); | 148 GeolocationArbitrator::SetDependencyFactoryForTest(NULL); |
| 150 } | 149 } |
| 151 | 150 |
| 152 } // namespace | 151 } // namespace |
| OLD | NEW |