Chromium Code Reviews| 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 25de9cc961d3d469cea442b5eddf968f61021c4e..1794481332c62955724aae73933c8bd53b52700a 100644 |
| --- a/blimp/engine/feature/geolocation/engine_geolocation_feature_unittest.cc |
| +++ b/blimp/engine/feature/geolocation/engine_geolocation_feature_unittest.cc |
| @@ -9,6 +9,8 @@ |
| #include <utility> |
| #include "base/memory/ptr_util.h" |
| +#include "base/message_loop/message_loop.h" |
| +#include "base/run_loop.h" |
| #include "blimp/common/create_blimp_message.h" |
| #include "blimp/common/proto/blimp_message.pb.h" |
| #include "blimp/common/proto/geolocation.pb.h" |
| @@ -41,6 +43,7 @@ void SendMockLocationMessage(BlimpMessageProcessor* processor) { |
| net::TestCompletionCallback cb; |
| processor->ProcessMessage(std::move(message), cb.callback()); |
| EXPECT_EQ(net::OK, cb.WaitForResult()); |
| + base::RunLoop().RunUntilIdle(); |
| } |
| void SendMockErrorMessage(BlimpMessageProcessor* processor, |
| @@ -57,6 +60,7 @@ void SendMockErrorMessage(BlimpMessageProcessor* processor, |
| net::TestCompletionCallback cb; |
| processor->ProcessMessage(std::move(message), cb.callback()); |
| EXPECT_EQ(net::OK, cb.WaitForResult()); |
| + base::RunLoop().RunUntilIdle(); |
| } |
| void SendMalformedMessage(BlimpMessageProcessor* processor) { |
| @@ -117,6 +121,9 @@ class EngineGeolocationFeatureTest : public testing::Test { |
| // This is a raw pointer to a class that is owned by the GeolocationFeature. |
| MockBlimpMessageProcessor* out_processor_; |
| + // Runs tasks posted during the processing of incoming messages. |
|
Wez
2016/09/01 02:45:43
nit: "Used to run tasks..."
It's really the RunLo
CJ
2016/09/01 18:17:05
Done.
|
| + base::MessageLoop message_loop_; |
| + |
| EngineGeolocationFeature feature_; |
| std::unique_ptr<device::LocationProvider> location_provider_; |
| device::LocationProvider::LocationProviderUpdateCallback mock_callback_; |