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

Unified Diff: base/memory/memory_pressure_monitor_win_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 | « ash/test/shelf_view_test_api.cc ('k') | base/message_loop/message_loop_task_runner_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/memory/memory_pressure_monitor_win_unittest.cc
diff --git a/base/memory/memory_pressure_monitor_win_unittest.cc b/base/memory/memory_pressure_monitor_win_unittest.cc
index 0461e7dcdea3398ecbbbb9d5f39a07c96507292f..1002a017872a65b480537dfd69a2b71f05fffa24 100644
--- a/base/memory/memory_pressure_monitor_win_unittest.cc
+++ b/base/memory/memory_pressure_monitor_win_unittest.cc
@@ -7,6 +7,7 @@
#include "base/macros.h"
#include "base/memory/memory_pressure_listener.h"
#include "base/message_loop/message_loop.h"
+#include "base/run_loop.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -209,7 +210,7 @@ TEST_F(WinMemoryPressureMonitorTest, CheckMemoryPressure) {
// events.
monitor.SetNone();
monitor.CheckMemoryPressure();
- message_loop_.RunUntilIdle();
+ RunLoop().RunUntilIdle();
EXPECT_EQ(MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE,
monitor.GetCurrentPressureLevel());
@@ -219,7 +220,7 @@ TEST_F(WinMemoryPressureMonitorTest, CheckMemoryPressure) {
MEMORY_PRESSURE_LEVEL_MODERATE));
monitor.SetModerate();
monitor.CheckMemoryPressure();
- message_loop_.RunUntilIdle();
+ RunLoop().RunUntilIdle();
EXPECT_EQ(MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE,
monitor.GetCurrentPressureLevel());
testing::Mock::VerifyAndClearExpectations(&monitor);
@@ -232,7 +233,7 @@ TEST_F(WinMemoryPressureMonitorTest, CheckMemoryPressure) {
MEMORY_PRESSURE_LEVEL_MODERATE));
}
monitor.CheckMemoryPressure();
- message_loop_.RunUntilIdle();
+ RunLoop().RunUntilIdle();
EXPECT_EQ(MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE,
monitor.GetCurrentPressureLevel());
testing::Mock::VerifyAndClearExpectations(&monitor);
@@ -244,7 +245,7 @@ TEST_F(WinMemoryPressureMonitorTest, CheckMemoryPressure) {
MEMORY_PRESSURE_LEVEL_CRITICAL));
monitor.SetCritical();
monitor.CheckMemoryPressure();
- message_loop_.RunUntilIdle();
+ RunLoop().RunUntilIdle();
EXPECT_EQ(MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL,
monitor.GetCurrentPressureLevel());
testing::Mock::VerifyAndClearExpectations(&monitor);
@@ -254,7 +255,7 @@ TEST_F(WinMemoryPressureMonitorTest, CheckMemoryPressure) {
OnMemoryPressure(MemoryPressureListener::
MEMORY_PRESSURE_LEVEL_CRITICAL));
monitor.CheckMemoryPressure();
- message_loop_.RunUntilIdle();
+ RunLoop().RunUntilIdle();
EXPECT_EQ(MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL,
monitor.GetCurrentPressureLevel());
testing::Mock::VerifyAndClearExpectations(&monitor);
@@ -266,7 +267,7 @@ TEST_F(WinMemoryPressureMonitorTest, CheckMemoryPressure) {
MEMORY_PRESSURE_LEVEL_MODERATE));
monitor.SetModerate();
monitor.CheckMemoryPressure();
- message_loop_.RunUntilIdle();
+ RunLoop().RunUntilIdle();
EXPECT_EQ(MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE,
monitor.GetCurrentPressureLevel());
testing::Mock::VerifyAndClearExpectations(&monitor);
@@ -279,7 +280,7 @@ TEST_F(WinMemoryPressureMonitorTest, CheckMemoryPressure) {
MEMORY_PRESSURE_LEVEL_MODERATE));
}
monitor.CheckMemoryPressure();
- message_loop_.RunUntilIdle();
+ RunLoop().RunUntilIdle();
EXPECT_EQ(MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE,
monitor.GetCurrentPressureLevel());
testing::Mock::VerifyAndClearExpectations(&monitor);
@@ -288,7 +289,7 @@ TEST_F(WinMemoryPressureMonitorTest, CheckMemoryPressure) {
// Going down to no pressure should not produce an notification.
monitor.SetNone();
monitor.CheckMemoryPressure();
- message_loop_.RunUntilIdle();
+ RunLoop().RunUntilIdle();
EXPECT_EQ(MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE,
monitor.GetCurrentPressureLevel());
testing::Mock::VerifyAndClearExpectations(&monitor);
« no previous file with comments | « ash/test/shelf_view_test_api.cc ('k') | base/message_loop/message_loop_task_runner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698