| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "components/memory_pressure/memory_pressure_monitor.h" | 5 #include "components/memory_pressure/memory_pressure_monitor.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/task_runner.h" | |
| 11 #include "base/test/simple_test_tick_clock.h" | 10 #include "base/test/simple_test_tick_clock.h" |
| 12 #include "base/tracked_objects.h" | 11 #include "base/tracked_objects.h" |
| 13 #include "components/memory_pressure/memory_pressure_stats_collector.h" | 12 #include "components/memory_pressure/memory_pressure_stats_collector.h" |
| 14 #include "components/memory_pressure/test_memory_pressure_calculator.h" | 13 #include "components/memory_pressure/test_memory_pressure_calculator.h" |
| 15 #include "testing/gmock/include/gmock/gmock.h" | 14 #include "testing/gmock/include/gmock/gmock.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 17 | 16 |
| 18 namespace memory_pressure { | 17 namespace memory_pressure { |
| 19 | 18 |
| 20 namespace { | 19 namespace { |
| (...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 381 ExpectDispatchCritical(); | 380 ExpectDispatchCritical(); |
| 382 monitor_->OnMemoryPressureChanged(MEMORY_PRESSURE_LEVEL_CRITICAL); | 381 monitor_->OnMemoryPressureChanged(MEMORY_PRESSURE_LEVEL_CRITICAL); |
| 383 VerifyAndClearExpectations(); | 382 VerifyAndClearExpectations(); |
| 384 ExpectCritical(); | 383 ExpectCritical(); |
| 385 EXPECT_EQ(2u, monitor_->scheduled_checks().size()); | 384 EXPECT_EQ(2u, monitor_->scheduled_checks().size()); |
| 386 } | 385 } |
| 387 | 386 |
| 388 #endif // !MEMORY_PRESSURE_IS_POLLING | 387 #endif // !MEMORY_PRESSURE_IS_POLLING |
| 389 | 388 |
| 390 } // namespace memory_pressure | 389 } // namespace memory_pressure |
| OLD | NEW |