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

Unified Diff: content/browser/memory/memory_coordinator_impl_browsertest.cc

Issue 2590773002: Add a public interface for content::MemoryCoordinator (Closed)
Patch Set: rebase Created 4 years 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: content/browser/memory/memory_coordinator_impl_browsertest.cc
diff --git a/content/browser/memory/memory_coordinator_impl_browsertest.cc b/content/browser/memory/memory_coordinator_impl_browsertest.cc
index 3b664ee9f99d616dea4339db7eb7a650cdaa2ec4..9403f8ef7e183ca72a50004936462404022a0696 100644
--- a/content/browser/memory/memory_coordinator_impl_browsertest.cc
+++ b/content/browser/memory/memory_coordinator_impl_browsertest.cc
@@ -64,6 +64,15 @@ IN_PROC_BROWSER_TEST_F(MemoryCoordinatorImplBrowserTest, CanSuspendRenderer) {
EXPECT_FALSE(memory_coordinator->CanSuspendRenderer(render_process_id));
}
+IN_PROC_BROWSER_TEST_F(MemoryCoordinatorImplBrowserTest, GetStateForProcess) {
+ GURL url = GetTestUrl("", "simple_page.html");
+ NavigateToURL(shell(), url);
+ auto* memory_coordinator = MemoryCoordinator::GetInstance();
+ base::ProcessHandle handle = base::GetCurrentProcessHandle();
+ EXPECT_NE(base::MemoryState::UNKNOWN,
+ memory_coordinator->GetStateForProcess(handle));
+}
+
#endif // !defined(OS_MACOSX)
} // namespace content
« no previous file with comments | « content/browser/memory/memory_coordinator_impl.cc ('k') | content/browser/memory/memory_coordinator_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698