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

Unified Diff: blimp/engine/feature/geolocation/engine_geolocation_feature_unittest.cc

Issue 2328453003: Makes use of EngineGeolocationFeature weak_ptr threadsafe. (Closed)
Patch Set: Get rid of ui/gl/BUILD.gn change Created 4 years, 3 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: blimp/engine/feature/geolocation/engine_geolocation_feature_unittest.cc
diff --git a/blimp/engine/feature/geolocation/engine_geolocation_feature_unittest.cc b/blimp/engine/feature/geolocation/engine_geolocation_feature_unittest.cc
index 80305eeb3fd3f794bfa696956a4cef81d119bb2f..ab95ad659ca5c2f2236fd958b8d8a18d58c26a07 100644
--- a/blimp/engine/feature/geolocation/engine_geolocation_feature_unittest.cc
+++ b/blimp/engine/feature/geolocation/engine_geolocation_feature_unittest.cc
@@ -110,6 +110,7 @@ class EngineGeolocationFeatureTest : public testing::Test {
out_processor_ = new MockBlimpMessageProcessor();
feature_.set_outgoing_message_processor(base::WrapUnique(out_processor_));
location_provider_->SetUpdateCallback(mock_callback_);
+ base::RunLoop().RunUntilIdle();
}
void OnLocationUpdate(const device::LocationProvider* provider,
@@ -178,6 +179,7 @@ TEST_F(EngineGeolocationFeatureTest, UpdateRequestLevel) {
location_provider_->StartProvider(true);
location_provider_->StartProvider(false);
location_provider_->StopProvider();
+ base::RunLoop().RunUntilIdle();
}
TEST_F(EngineGeolocationFeatureTest, UnexpectedMessageReceived) {
@@ -200,15 +202,10 @@ TEST_F(EngineGeolocationFeatureTest,
EXPECT_CALL(*out_processor_,
MockableProcessMessage(EqualsRequestRefresh(), _))
.Times(1);
- EXPECT_CALL(*out_processor_,
- MockableProcessMessage(
- EqualsUpdatedRequestLevel(
- GeolocationSetInterestLevelMessage::NO_INTEREST),
- _))
- .Times(1);
location_provider_->StartProvider(true);
location_provider_->OnPermissionGranted();
+ base::RunLoop().RunUntilIdle();
}
} // namespace engine

Powered by Google App Engine
This is Rietveld 408576698