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 @@
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "components/previews/previews_ui_service.h"
#include "testing/gtest/include/gtest/gtest.h"
......@@ -71,7 +72,7 @@ TEST_F(PreviewsIODataTest, TestInitialization) {
new TestPreviewsIOData(loop_.task_runner(), loop_.task_runner())));
set_ui_service(
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
// initialized.
EXPECT_TRUE(io_data()->initialized());
......
......@@ -9,6 +9,7 @@
#include "base/memory/ptr_util.h"
#include "base/memory/ref_counted.h"
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
#include "components/previews/previews_io_data.h"
#include "testing/gtest/include/gtest/gtest.h"
......@@ -74,7 +75,7 @@ TEST_F(PreviewsUIServiceTest, TestInitialization) {
new PreviewsIOData(loop_.task_runner(), loop_.task_runner())));
set_ui_service(base::WrapUnique(
new TestPreviewsUIService(io_data(), loop_.task_runner())));
loop_.RunUntilIdle();
base::RunLoop().RunUntilIdle();
// After the outstanding posted tasks have run, SetIOData should have been
// called for |ui_service_|.
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