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

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

Issue 2941123004: Remove MemoryCoordinator::CanSuspendRenderer() (Closed)
Patch Set: Fix tests Created 3 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: 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 9403f8ef7e183ca72a50004936462404022a0696..fe00ec1f5887751d5f859162f53a67297f0ad078 100644
--- a/content/browser/memory/memory_coordinator_impl_browsertest.cc
+++ b/content/browser/memory/memory_coordinator_impl_browsertest.cc
@@ -13,19 +13,6 @@
namespace content {
-class TestMemoryCoordinatorDelegate : public MemoryCoordinatorDelegate {
- public:
- TestMemoryCoordinatorDelegate() {}
- ~TestMemoryCoordinatorDelegate() override {}
-
- bool CanSuspendBackgroundedRenderer(int render_process_id) override {
- return true;
- }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(TestMemoryCoordinatorDelegate);
-};
-
class MemoryCoordinatorImplBrowserTest : public ContentBrowserTest {
public:
MemoryCoordinatorImplBrowserTest() {}
@@ -52,18 +39,6 @@ IN_PROC_BROWSER_TEST_F(MemoryCoordinatorImplBrowserTest, HandleAdded) {
EXPECT_EQ(1u, num_children);
}
-IN_PROC_BROWSER_TEST_F(MemoryCoordinatorImplBrowserTest, CanSuspendRenderer) {
- GURL url = GetTestUrl("", "simple_page.html");
- NavigateToURL(shell(), url);
- auto* memory_coordinator = MemoryCoordinatorImpl::GetInstance();
- memory_coordinator->SetDelegateForTesting(
- base::MakeUnique<TestMemoryCoordinatorDelegate>());
- EXPECT_EQ(1u, memory_coordinator->children().size());
- int render_process_id = memory_coordinator->children().begin()->first;
- // Foreground tab cannot be suspended.
- EXPECT_FALSE(memory_coordinator->CanSuspendRenderer(render_process_id));
-}
-
IN_PROC_BROWSER_TEST_F(MemoryCoordinatorImplBrowserTest, GetStateForProcess) {
GURL url = GetTestUrl("", "simple_page.html");
NavigateToURL(shell(), url);
« 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