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

Unified Diff: chrome/browser/memory/oom_priority_manager_chromeos_unittest.cc

Issue 1188823002: [MemoryPressure] Move chrome/browser/chromeos/* to chrome/browser/memory/*. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed sky@ comments. Created 5 years, 6 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
Index: chrome/browser/memory/oom_priority_manager_chromeos_unittest.cc
diff --git a/chrome/browser/chromeos/memory/oom_priority_manager_unittest.cc b/chrome/browser/memory/oom_priority_manager_chromeos_unittest.cc
similarity index 88%
rename from chrome/browser/chromeos/memory/oom_priority_manager_unittest.cc
rename to chrome/browser/memory/oom_priority_manager_chromeos_unittest.cc
index 9280b9f7bbee5438a1b054ad5d874d19d2fb08c8..58a48bdc705fb35a58ac2b66be28b4d0c022b147 100644
--- a/chrome/browser/chromeos/memory/oom_priority_manager_unittest.cc
+++ b/chrome/browser/memory/oom_priority_manager_chromeos_unittest.cc
@@ -8,12 +8,12 @@
#include "base/logging.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
-#include "chrome/browser/chromeos/memory/oom_priority_manager.h"
+#include "chrome/browser/memory/oom_priority_manager.h"
#include "chrome/common/url_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
-namespace chromeos {
+namespace memory {
typedef testing::Test OomPriorityManagerTest;
@@ -34,7 +34,7 @@ enum TestIndicies {
// Tests the sorting comparator so that we know it's producing the
// desired order.
TEST_F(OomPriorityManagerTest, Comparator) {
- chromeos::OomPriorityManager::TabStatsList test_list;
+ OomPriorityManager::TabStatsList test_list;
const base::TimeTicks now = base::TimeTicks::Now();
// Add kSelected last to verify we are sorting the array.
@@ -114,8 +114,7 @@ TEST_F(OomPriorityManagerTest, Comparator) {
test_list.push_back(stats);
}
- std::sort(test_list.begin(),
- test_list.end(),
+ std::sort(test_list.begin(), test_list.end(),
OomPriorityManager::CompareTabStats);
int index = 0;
@@ -142,18 +141,18 @@ TEST_F(OomPriorityManagerTest, Comparator) {
}
TEST_F(OomPriorityManagerTest, IsReloadableUI) {
- EXPECT_TRUE(OomPriorityManager::IsReloadableUI(
- GURL(chrome::kChromeUIDownloadsURL)));
- EXPECT_TRUE(OomPriorityManager::IsReloadableUI(
- GURL(chrome::kChromeUIHistoryURL)));
- EXPECT_TRUE(OomPriorityManager::IsReloadableUI(
- GURL(chrome::kChromeUINewTabURL)));
- EXPECT_TRUE(OomPriorityManager::IsReloadableUI(
- GURL(chrome::kChromeUISettingsURL)));
+ EXPECT_TRUE(
+ OomPriorityManager::IsReloadableUI(GURL(chrome::kChromeUIDownloadsURL)));
+ EXPECT_TRUE(
+ OomPriorityManager::IsReloadableUI(GURL(chrome::kChromeUIHistoryURL)));
+ EXPECT_TRUE(
+ OomPriorityManager::IsReloadableUI(GURL(chrome::kChromeUINewTabURL)));
+ EXPECT_TRUE(
+ OomPriorityManager::IsReloadableUI(GURL(chrome::kChromeUISettingsURL)));
// Debugging URLs are not included.
- EXPECT_FALSE(OomPriorityManager::IsReloadableUI(
- GURL(chrome::kChromeUIDiscardsURL)));
+ EXPECT_FALSE(
+ OomPriorityManager::IsReloadableUI(GURL(chrome::kChromeUIDiscardsURL)));
EXPECT_FALSE(OomPriorityManager::IsReloadableUI(
GURL(chrome::kChromeUINetInternalsURL)));
@@ -168,8 +167,7 @@ TEST_F(OomPriorityManagerTest, GetProcessHandles) {
// Empty stats list gives empty |process_id_pairs| list.
OomPriorityManager::TabStatsList empty_list;
- process_id_pairs =
- OomPriorityManager::GetChildProcessInfos(empty_list);
+ process_id_pairs = OomPriorityManager::GetChildProcessInfos(empty_list);
EXPECT_EQ(0u, process_id_pairs.size());
// Two tabs in two different processes generates two
@@ -193,8 +191,7 @@ TEST_F(OomPriorityManagerTest, GetProcessHandles) {
stats.child_process_host_id = 100;
stats.renderer_handle = 0;
zero_handle_list.push_back(stats);
- process_id_pairs =
- OomPriorityManager::GetChildProcessInfos(zero_handle_list);
+ process_id_pairs = OomPriorityManager::GetChildProcessInfos(zero_handle_list);
EXPECT_EQ(0u, process_id_pairs.size());
// Two tabs in the same process generates one handle out. When a duplicate
@@ -218,4 +215,4 @@ TEST_F(OomPriorityManagerTest, GetProcessHandles) {
EXPECT_EQ(201, process_id_pairs[1].second);
}
-} // namespace chromeos
+} // namespace memory
« no previous file with comments | « chrome/browser/memory/oom_priority_manager_chromeos.cc ('k') | chrome/browser/memory/system_memory_stats_recorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698