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); |