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

Unified Diff: chrome/browser/chromeos/memory/oom_priority_manager_browsertest.cc

Issue 12221159: Add out of memory stats for graphics memory, discards per minute (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 10 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 | « chrome/browser/chromeos/memory/oom_priority_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/memory/oom_priority_manager_browsertest.cc
diff --git a/chrome/browser/chromeos/memory/oom_priority_manager_browsertest.cc b/chrome/browser/chromeos/memory/oom_priority_manager_browsertest.cc
index 1bb925ef0e23a154521a21eb5a5aa81f498611e9..59f7bb65ef7ecf0e8f87509dfddd7df3b5af2493 100644
--- a/chrome/browser/chromeos/memory/oom_priority_manager_browsertest.cc
+++ b/chrome/browser/chromeos/memory/oom_priority_manager_browsertest.cc
@@ -24,6 +24,10 @@ typedef InProcessBrowserTest OomPriorityManagerTest;
IN_PROC_BROWSER_TEST_F(OomPriorityManagerTest, OomPriorityManagerBasics) {
using content::WindowedNotificationObserver;
+ chromeos::OomPriorityManager* oom_priority_manager =
+ g_browser_process->oom_priority_manager();
+ EXPECT_FALSE(oom_priority_manager->recent_tab_discard());
+
// Get three tabs open.
WindowedNotificationObserver load1(
content::NOTIFICATION_NAV_ENTRY_COMMITTED,
@@ -83,6 +87,7 @@ IN_PROC_BROWSER_TEST_F(OomPriorityManagerTest, OomPriorityManagerBasics) {
EXPECT_TRUE(browser()->tab_strip_model()->IsTabDiscarded(0));
EXPECT_FALSE(browser()->tab_strip_model()->IsTabDiscarded(1));
EXPECT_FALSE(browser()->tab_strip_model()->IsTabDiscarded(2));
+ EXPECT_TRUE(oom_priority_manager->recent_tab_discard());
// Run discard again, make sure it kills the second tab.
EXPECT_TRUE(g_browser_process->oom_priority_manager()->DiscardTab());
« no previous file with comments | « chrome/browser/chromeos/memory/oom_priority_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698