Commit fb7015f9 authored by fdoray's avatar fdoray Committed by Commit bot

Remove calls to deprecated MessageLoop methods in components/previews/.

This CL removes calls to MessageLoop::RunUntilIdle from
components/previews/.

BUG=616447

Review-Url: https://codereview.chromium.org/2348503002
Cr-Commit-Position: refs/heads/master@{#418921}
parent 71b2e117
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h" #include "base/single_thread_task_runner.h"
#include "components/previews/previews_ui_service.h" #include "components/previews/previews_ui_service.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
...@@ -71,7 +72,7 @@ TEST_F(PreviewsIODataTest, TestInitialization) { ...@@ -71,7 +72,7 @@ TEST_F(PreviewsIODataTest, TestInitialization) {
new TestPreviewsIOData(loop_.task_runner(), loop_.task_runner()))); new TestPreviewsIOData(loop_.task_runner(), loop_.task_runner())));
set_ui_service( set_ui_service(
base::WrapUnique(new PreviewsUIService(io_data(), loop_.task_runner()))); base::WrapUnique(new PreviewsUIService(io_data(), loop_.task_runner())));
loop_.RunUntilIdle(); base::RunLoop().RunUntilIdle();
// After the outstanding posted tasks have run, |io_data_| should be fully // After the outstanding posted tasks have run, |io_data_| should be fully
// initialized. // initialized.
EXPECT_TRUE(io_data()->initialized()); EXPECT_TRUE(io_data()->initialized());
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "base/memory/ptr_util.h" #include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h" #include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h" #include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h" #include "base/single_thread_task_runner.h"
#include "components/previews/previews_io_data.h" #include "components/previews/previews_io_data.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
...@@ -74,7 +75,7 @@ TEST_F(PreviewsUIServiceTest, TestInitialization) { ...@@ -74,7 +75,7 @@ TEST_F(PreviewsUIServiceTest, TestInitialization) {
new PreviewsIOData(loop_.task_runner(), loop_.task_runner()))); new PreviewsIOData(loop_.task_runner(), loop_.task_runner())));
set_ui_service(base::WrapUnique( set_ui_service(base::WrapUnique(
new TestPreviewsUIService(io_data(), loop_.task_runner()))); new TestPreviewsUIService(io_data(), loop_.task_runner())));
loop_.RunUntilIdle(); base::RunLoop().RunUntilIdle();
// After the outstanding posted tasks have run, SetIOData should have been // After the outstanding posted tasks have run, SetIOData should have been
// called for |ui_service_|. // called for |ui_service_|.
EXPECT_TRUE(ui_service()->io_data_set()); EXPECT_TRUE(ui_service()->io_data_set());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment