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

Unified Diff: device/geolocation/geolocation_provider_impl_unittest.cc

Issue 2161223003: Adds GeolocationFeature for Blimp Geolocation project. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@engine_feature_prep
Patch Set: Addresses kmarshall's #82 comments. 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 side-by-side diff with in-line comments
Download patch
Index: device/geolocation/geolocation_provider_impl_unittest.cc
diff --git a/device/geolocation/geolocation_provider_impl_unittest.cc b/device/geolocation/geolocation_provider_impl_unittest.cc
index e84bc74c4d3b07418127502985c534a25af747d6..f32a7aba0ffe69ceab4609e9bfd61ee80aa28a8f 100644
--- a/device/geolocation/geolocation_provider_impl_unittest.cc
+++ b/device/geolocation/geolocation_provider_impl_unittest.cc
@@ -18,7 +18,7 @@
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "device/geolocation/access_token_store.h"
-#include "device/geolocation/mock_location_provider.h"
+#include "device/geolocation/fake_location_provider.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -97,7 +97,7 @@ void DummyFunction(const Geoposition& position) {}
class GeolocationProviderTest : public testing::Test {
protected:
- GeolocationProviderTest() : arbitrator_(new MockLocationProvider) {
+ GeolocationProviderTest() : arbitrator_(new FakeLocationProvider) {
provider()->SetArbitratorForTesting(base::WrapUnique(arbitrator_));
}
@@ -107,7 +107,7 @@ class GeolocationProviderTest : public testing::Test {
return GeolocationProviderImpl::GetInstance();
}
- MockLocationProvider* arbitrator() { return arbitrator_; }
+ FakeLocationProvider* arbitrator() { return arbitrator_; }
// Called on test thread.
bool ProvidersStarted();
@@ -125,7 +125,7 @@ class GeolocationProviderTest : public testing::Test {
base::MessageLoopForUI message_loop_;
// Owned by the GeolocationProviderImpl class.
- MockLocationProvider* arbitrator_;
+ FakeLocationProvider* arbitrator_;
DISALLOW_COPY_AND_ASSIGN(GeolocationProviderTest);
};
@@ -145,7 +145,7 @@ bool GeolocationProviderTest::ProvidersStarted() {
void GeolocationProviderTest::GetProvidersStarted(bool* started) {
DCHECK(provider()->task_runner()->BelongsToCurrentThread());
- *started = arbitrator()->IsProviderStarted();
+ *started = arbitrator()->get_state() != FakeLocationProvider::STOPPED;
Wez 2016/08/20 01:42:11 You've defined get_state() as returning a bool, no
CJ 2016/08/22 17:56:40 Done.
}
void GeolocationProviderTest::SendMockLocation(const Geoposition& position) {

Powered by Google App Engine
This is Rietveld 408576698