Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 2211473003: Remove calls to deprecated MessageLoop methods on Windows and Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/indexed_db/indexed_db_unittest.cc ('k') | content/browser/tracing/etw_tracing_agent_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
index 2ccddb24be0181e797ce68c28eed90738c45ed3b..0da99fbab737c560a75ea2eaf40735879c553bfa 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
@@ -512,8 +512,9 @@ class RenderWidgetHostViewAuraTest : public testing::Test {
browser_context_.reset();
aura_test_helper_->TearDown();
- message_loop_.DeleteSoon(FROM_HERE, browser_context_.release());
- message_loop_.RunUntilIdle();
+ message_loop_.task_runner()->DeleteSoon(FROM_HERE,
+ browser_context_.release());
+ base::RunLoop().RunUntilIdle();
ImageTransportFactory::Terminate();
}
@@ -2459,21 +2460,21 @@ TEST_F(RenderWidgetHostViewAuraTest, DiscardDelegatedFramesWithMemoryPressure) {
// If we hide one, it should not get evicted.
views[0]->Hide();
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(views[0]->HasFrameData());
// Using a lesser memory pressure event however, should evict.
SimulateMemoryPressure(
base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE);
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_FALSE(views[0]->HasFrameData());
// Check the same for a higher pressure event.
views[1]->Hide();
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_TRUE(views[1]->HasFrameData());
SimulateMemoryPressure(
base::MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL);
- message_loop_.RunUntilIdle();
+ base::RunLoop().RunUntilIdle();
EXPECT_FALSE(views[1]->HasFrameData());
for (size_t i = 0; i < renderer_count; ++i) {
@@ -3320,7 +3321,7 @@ TEST_F(RenderWidgetHostViewAuraOverscrollTest,
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(),
base::TimeDelta::FromMilliseconds(15));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
EXPECT_EQ(OVERSCROLL_NONE, overscroll_mode());
EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->current_mode());
@@ -3427,7 +3428,7 @@ TEST_F(RenderWidgetHostViewAuraOverscrollTest, OverscrollWithTouchEvents) {
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(),
base::TimeDelta::FromMilliseconds(10));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
EXPECT_EQ(1U, sink_->message_count());
EXPECT_EQ(OVERSCROLL_NONE, overscroll_mode());
EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->current_mode());
@@ -3473,7 +3474,7 @@ TEST_F(RenderWidgetHostViewAuraOverscrollTest,
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(),
base::TimeDelta::FromMilliseconds(10));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
EXPECT_EQ(OVERSCROLL_NONE, overscroll_mode());
EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->current_mode());
EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->completed_mode());
@@ -3508,7 +3509,7 @@ TEST_F(RenderWidgetHostViewAuraOverscrollTest,
base::ThreadTaskRunnerHandle::Get()->PostDelayedTask(
FROM_HERE, base::MessageLoop::QuitWhenIdleClosure(),
base::TimeDelta::FromMilliseconds(10));
- base::MessageLoop::current()->Run();
+ base::RunLoop().Run();
EXPECT_EQ(OVERSCROLL_NONE, overscroll_mode());
EXPECT_EQ(OVERSCROLL_NONE, overscroll_delegate()->current_mode());
EXPECT_EQ(OVERSCROLL_EAST, overscroll_delegate()->completed_mode());
« no previous file with comments | « content/browser/indexed_db/indexed_db_unittest.cc ('k') | content/browser/tracing/etw_tracing_agent_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698