Index: device/geolocation/geolocation_provider_impl_unittest.cc |
diff --git a/content/browser/geolocation/geolocation_provider_impl_unittest.cc b/device/geolocation/geolocation_provider_impl_unittest.cc |
similarity index 91% |
rename from content/browser/geolocation/geolocation_provider_impl_unittest.cc |
rename to device/geolocation/geolocation_provider_impl_unittest.cc |
index 62506f9688be36aeffcedc9a655eeba3b1f4caf9..ded7d2b0c9d3fb775c805198d9d1a5e449c759e8 100644 |
--- a/content/browser/geolocation/geolocation_provider_impl_unittest.cc |
+++ b/device/geolocation/geolocation_provider_impl_unittest.cc |
@@ -2,7 +2,7 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "content/browser/geolocation/geolocation_provider_impl.h" |
+#include "device/geolocation/geolocation_provider_impl.h" |
#include <memory> |
@@ -16,10 +16,8 @@ |
#include "base/single_thread_task_runner.h" |
#include "base/strings/string16.h" |
#include "base/time/time.h" |
-#include "content/browser/geolocation/mock_location_arbitrator.h" |
-#include "content/public/browser/access_token_store.h" |
-#include "content/public/browser/browser_thread.h" |
-#include "content/public/test/test_browser_thread.h" |
+#include "device/geolocation/access_token_store.h" |
+#include "device/geolocation/mock_location_arbitrator.h" |
#include "testing/gmock/include/gmock/gmock.h" |
#include "testing/gtest/include/gtest/gtest.h" |
@@ -28,7 +26,7 @@ using testing::Matcher; |
using testing::MatcherInterface; |
using testing::MatchResultListener; |
-namespace content { |
+namespace device { |
class LocationProviderForTestArbitrator : public GeolocationProviderImpl { |
public: |
@@ -122,7 +120,6 @@ class GeolocationProviderTest : public testing::Test { |
protected: |
GeolocationProviderTest() |
: message_loop_(), |
- ui_thread_(BrowserThread::UI, &message_loop_), |
provider_(new LocationProviderForTestArbitrator) { |
} |
@@ -138,8 +135,7 @@ class GeolocationProviderTest : public testing::Test { |
// Called on provider thread. |
void GetProvidersStarted(bool* started); |
- base::MessageLoop message_loop_; |
- TestBrowserThread ui_thread_; |
+ base::MessageLoopForUI message_loop_; |
std::unique_ptr<LocationProviderForTestArbitrator> provider_; |
}; |
@@ -183,7 +179,7 @@ TEST_F(GeolocationProviderTest, StartStop) { |
EXPECT_FALSE(provider()->IsRunning()); |
GeolocationProviderImpl::LocationUpdateCallback callback = |
base::Bind(&DummyFunction); |
- std::unique_ptr<content::GeolocationProvider::Subscription> subscription = |
+ std::unique_ptr<GeolocationProvider::Subscription> subscription = |
provider()->AddLocationUpdateCallback(callback, false); |
EXPECT_TRUE(provider()->IsRunning()); |
EXPECT_TRUE(ProvidersStarted()); |
@@ -206,7 +202,7 @@ TEST_F(GeolocationProviderTest, StalePositionNotSent) { |
&MockGeolocationObserver::OnLocationUpdate, |
base::Unretained(&first_observer)); |
EXPECT_CALL(first_observer, OnLocationUpdate(GeopositionEq(first_position))); |
- std::unique_ptr<content::GeolocationProvider::Subscription> subscription = |
+ std::unique_ptr<GeolocationProvider::Subscription> subscription = |
provider()->AddLocationUpdateCallback(first_callback, false); |
SendMockLocation(first_position); |
base::RunLoop().Run(); |
@@ -227,7 +223,7 @@ TEST_F(GeolocationProviderTest, StalePositionNotSent) { |
GeolocationProviderImpl::LocationUpdateCallback second_callback = base::Bind( |
&MockGeolocationObserver::OnLocationUpdate, |
base::Unretained(&second_observer)); |
- std::unique_ptr<content::GeolocationProvider::Subscription> subscription2 = |
+ std::unique_ptr<GeolocationProvider::Subscription> subscription2 = |
provider()->AddLocationUpdateCallback(second_callback, false); |
base::RunLoop().RunUntilIdle(); |
@@ -252,11 +248,11 @@ TEST_F(GeolocationProviderTest, OverrideLocationForTesting) { |
GeolocationProviderImpl::LocationUpdateCallback callback = base::Bind( |
&MockGeolocationObserver::OnLocationUpdate, |
base::Unretained(&mock_observer)); |
- std::unique_ptr<content::GeolocationProvider::Subscription> subscription = |
+ std::unique_ptr<GeolocationProvider::Subscription> subscription = |
provider()->AddLocationUpdateCallback(callback, false); |
subscription.reset(); |
// Wait for the providers to be stopped now that all clients are gone. |
EXPECT_FALSE(ProvidersStarted()); |
} |
-} // namespace content |
+} // namespace device |