| Index: chrome/browser/ui/webui/local_discovery/local_discovery_ui_browsertest.cc
|
| diff --git a/chrome/browser/ui/webui/local_discovery/local_discovery_ui_browsertest.cc b/chrome/browser/ui/webui/local_discovery/local_discovery_ui_browsertest.cc
|
| index f5a37a17779f88e5ac8a38d223904805fe232054..2abb0cc27753c32cea6c6ddae54bd3f2b01a2904 100644
|
| --- a/chrome/browser/ui/webui/local_discovery/local_discovery_ui_browsertest.cc
|
| +++ b/chrome/browser/ui/webui/local_discovery/local_discovery_ui_browsertest.cc
|
| @@ -13,6 +13,7 @@
|
| #include "base/location.h"
|
| #include "base/macros.h"
|
| #include "base/message_loop/message_loop.h"
|
| +#include "base/run_loop.h"
|
| #include "base/single_thread_task_runner.h"
|
| #include "base/threading/thread_task_runner_handle.h"
|
| #include "build/build_config.h"
|
| @@ -305,7 +306,7 @@ class TestMessageLoopCondition {
|
| void Wait() {
|
| while (!signaled_) {
|
| waiting_ = true;
|
| - base::MessageLoop::current()->Run();
|
| + base::RunLoop().Run();
|
| waiting_ = false;
|
| }
|
| signaled_ = false;
|
| @@ -456,7 +457,7 @@ class LocalDiscoveryUITest : public WebUIBrowserTest {
|
| base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
|
| FROM_HERE, callback.callback(), time_period);
|
|
|
| - base::MessageLoop::current()->Run();
|
| + base::RunLoop().Run();
|
| callback.Cancel();
|
| }
|
|
|
| @@ -502,7 +503,7 @@ IN_PROC_BROWSER_TEST_F(LocalDiscoveryUITest, AddRowTest) {
|
| test_service_discovery_client()->SimulateReceive(
|
| kAnnouncePacket, sizeof(kAnnouncePacket));
|
|
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
|
|
| EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("checkOneDevice"));
|
|
|
| @@ -525,7 +526,7 @@ IN_PROC_BROWSER_TEST_F(LocalDiscoveryUITest, RegisterTest) {
|
| test_service_discovery_client()->SimulateReceive(
|
| kAnnouncePacket, sizeof(kAnnouncePacket));
|
|
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
|
|
| EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("checkOneDevice"));
|
|
|
| @@ -578,7 +579,7 @@ IN_PROC_BROWSER_TEST_F(LocalDiscoveryUITest, RegisterTest) {
|
| test_service_discovery_client()->SimulateReceive(
|
| kAnnouncePacketRegistered, sizeof(kAnnouncePacketRegistered));
|
|
|
| - base::MessageLoop::current()->RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
|
|
| EXPECT_TRUE(WebUIBrowserTest::RunJavascriptTest("expectRegisterDone"));
|
| }
|
|
|