| 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/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; |
| 16 using content::FakeAccessTokenStore; |
| 15 using testing::_; | 17 using testing::_; |
| 16 using testing::DoAll; | 18 using testing::DoAll; |
| 17 using testing::DoDefault; | 19 using testing::DoDefault; |
| 18 using testing::Invoke; | 20 using testing::Invoke; |
| 19 using testing::InvokeWithoutArgs; | 21 using testing::InvokeWithoutArgs; |
| 20 | 22 |
| 21 namespace { | 23 namespace { |
| 22 | 24 |
| 23 class GeolocationProviderTest : public testing::Test { | 25 class GeolocationProviderTest : public testing::Test { |
| 24 protected: | 26 protected: |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 provider_->RemoveObserver(&null_observer); | 173 provider_->RemoveObserver(&null_observer); |
| 172 // Wait for the providers to be stopped. | 174 // Wait for the providers to be stopped. |
| 173 event.Wait(); | 175 event.Wait(); |
| 174 event.Reset(); | 176 event.Reset(); |
| 175 EXPECT_TRUE(provider_->IsRunning()); | 177 EXPECT_TRUE(provider_->IsRunning()); |
| 176 | 178 |
| 177 GeolocationArbitrator::SetDependencyFactoryForTest(NULL); | 179 GeolocationArbitrator::SetDependencyFactoryForTest(NULL); |
| 178 } | 180 } |
| 179 | 181 |
| 180 } // namespace | 182 } // namespace |
| OLD | NEW |