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

Unified Diff: base/mac/memory_pressure_monitor_unittest.cc

Issue 1149223002: Avoid basename conflict from memory_pressure_monitor.cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: includes Created 5 years, 7 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 | « base/mac/memory_pressure_monitor.cc ('k') | base/memory/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/mac/memory_pressure_monitor_unittest.cc
diff --git a/base/mac/memory_pressure_monitor_unittest.cc b/base/mac/memory_pressure_monitor_unittest.cc
deleted file mode 100644
index acb366609efe43a6fe892a920f230175b680af63..0000000000000000000000000000000000000000
--- a/base/mac/memory_pressure_monitor_unittest.cc
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "base/mac/memory_pressure_monitor.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-namespace base {
-namespace mac {
-
-class TestMemoryPressureMonitor : public MemoryPressureMonitor {
- public:
- using MemoryPressureMonitor::MemoryPressureLevelForMacMemoryPressure;
-
- TestMemoryPressureMonitor() { }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TestMemoryPressureMonitor);
-};
-
-TEST(MacMemoryPressureMonitorTest, MemoryPressureFromMacMemoryPressure) {
- EXPECT_EQ(MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE,
- TestMemoryPressureMonitor::
- MemoryPressureLevelForMacMemoryPressure(
- DISPATCH_MEMORYPRESSURE_NORMAL));
- EXPECT_EQ(MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE,
- TestMemoryPressureMonitor::
- MemoryPressureLevelForMacMemoryPressure(
- DISPATCH_MEMORYPRESSURE_WARN));
- EXPECT_EQ(MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL,
- TestMemoryPressureMonitor::
- MemoryPressureLevelForMacMemoryPressure(
- DISPATCH_MEMORYPRESSURE_CRITICAL));
- EXPECT_EQ(MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE,
- TestMemoryPressureMonitor::
- MemoryPressureLevelForMacMemoryPressure(0));
- EXPECT_EQ(MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE,
- TestMemoryPressureMonitor::
- MemoryPressureLevelForMacMemoryPressure(3));
- EXPECT_EQ(MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE,
- TestMemoryPressureMonitor::
- MemoryPressureLevelForMacMemoryPressure(5));
- EXPECT_EQ(MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE,
- TestMemoryPressureMonitor::
- MemoryPressureLevelForMacMemoryPressure(-1));
-}
-
-TEST(MacMemoryPressureMonitorTest, CurrentMemoryPressure) {
- TestMemoryPressureMonitor monitor;
- MemoryPressureListener::MemoryPressureLevel memory_pressure =
- monitor.GetCurrentPressureLevel();
- EXPECT_TRUE(memory_pressure ==
- MemoryPressureListener::MEMORY_PRESSURE_LEVEL_NONE ||
- memory_pressure ==
- MemoryPressureListener::MEMORY_PRESSURE_LEVEL_MODERATE ||
- memory_pressure ==
- MemoryPressureListener::MEMORY_PRESSURE_LEVEL_CRITICAL);
-}
-
-} // namespace mac
-} // namespace base
« no previous file with comments | « base/mac/memory_pressure_monitor.cc ('k') | base/memory/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698