Chromium Code Reviews| Index: components/exo/gamepad_unittest.cc |
| diff --git a/components/exo/gamepad_unittest.cc b/components/exo/gamepad_unittest.cc |
| index 34a7e165bd818587e15d054ae9ff1a129252887f..7d17bfd34dd877bcaf64b76fa3987a6d0e1f5fa1 100644 |
| --- a/components/exo/gamepad_unittest.cc |
| +++ b/components/exo/gamepad_unittest.cc |
| @@ -62,6 +62,7 @@ class GamepadTest : public test::ExoTestBase { |
| // Process tasks until polling is shut down. |
| polling_task_runner_->RunPendingTasks(); |
| polling_task_runner_ = nullptr; |
| + base::RunLoop().RunUntilIdle(); |
|
reveman
2016/12/07 00:46:57
why is this needed?
Alex Z.
2016/12/07 20:09:35
Good catch. It is not. It is some leftover from de
|
| } |
| void SetDataAndPostToDelegate(const blink::WebGamepads& new_data) { |
| @@ -70,6 +71,7 @@ class GamepadTest : public test::ExoTestBase { |
| // Run one polling cycle, which will post a task to the origin task runner. |
| polling_task_runner_->RunPendingTasks(); |
| // Run origin task runner to invoke delegate. |
| + |
| base::RunLoop().RunUntilIdle(); |
| } |
| @@ -116,6 +118,7 @@ TEST_F(GamepadTest, OnStateChange) { |
| SetDataAndPostToDelegate(all_disconnected); |
| DestroyGamepad(&delegate); |
| + RunAllPendingInMessageLoop(); |
|
reveman
2016/12/07 00:46:57
and this?
Alex Z.
2016/12/07 20:09:36
Same as above.
|
| } |
| TEST_F(GamepadTest, OnAxis) { |