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

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

Issue 2579233002: Merge MemoryCoordinator and MemoryCoordinatorImpl into one class (Closed)
Patch Set: addressed comments 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_browsertest.cc b/content/browser/memory/memory_coordinator_impl_browsertest.cc
similarity index 74%
rename from content/browser/memory/memory_coordinator_browsertest.cc
rename to content/browser/memory/memory_coordinator_impl_browsertest.cc
index 4926d7c463a3f8c4165305c88238c3da25c4e8bb..3397158d2f681308adc6b4cdf3c366e33b4ac5da 100644
--- a/content/browser/memory/memory_coordinator_browsertest.cc
+++ b/content/browser/memory/memory_coordinator_impl_browsertest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/browser/memory/memory_coordinator.h"
+#include "content/browser/memory/memory_coordinator_impl.h"
#include "base/test/scoped_feature_list.h"
#include "content/browser/browser_main_loop.h"
@@ -25,9 +25,9 @@ class TestMemoryCoordinatorDelegate : public MemoryCoordinatorDelegate {
DISALLOW_COPY_AND_ASSIGN(TestMemoryCoordinatorDelegate);
};
-class MemoryCoordinatorTest : public ContentBrowserTest {
+class MemoryCoordinatorImplBrowserTest : public ContentBrowserTest {
public:
- MemoryCoordinatorTest() {}
+ MemoryCoordinatorImplBrowserTest() {}
void SetUp() override {
scoped_feature_list_.InitAndEnableFeature(features::kMemoryCoordinator);
@@ -37,23 +37,24 @@ class MemoryCoordinatorTest : public ContentBrowserTest {
private:
base::test::ScopedFeatureList scoped_feature_list_;
- DISALLOW_COPY_AND_ASSIGN(MemoryCoordinatorTest);
+ DISALLOW_COPY_AND_ASSIGN(MemoryCoordinatorImplBrowserTest);
};
// TODO(bashi): Enable these tests on macos when MemoryMonitorMac is
// implemented.
#if !defined(OS_MACOSX)
-IN_PROC_BROWSER_TEST_F(MemoryCoordinatorTest, HandleAdded) {
+IN_PROC_BROWSER_TEST_F(MemoryCoordinatorImplBrowserTest, HandleAdded) {
GURL url = GetTestUrl("", "simple_page.html");
NavigateToURL(shell(), url);
- EXPECT_EQ(1u, MemoryCoordinator::GetInstance()->children().size());
+ size_t num_children = MemoryCoordinatorImpl::GetInstance()->children().size();
+ EXPECT_EQ(1u, num_children);
}
-IN_PROC_BROWSER_TEST_F(MemoryCoordinatorTest, CanSuspendRenderer) {
+IN_PROC_BROWSER_TEST_F(MemoryCoordinatorImplBrowserTest, CanSuspendRenderer) {
GURL url = GetTestUrl("", "simple_page.html");
NavigateToURL(shell(), url);
- auto* memory_coordinator = MemoryCoordinator::GetInstance();
+ auto* memory_coordinator = MemoryCoordinatorImpl::GetInstance();
memory_coordinator->SetDelegateForTesting(
base::MakeUnique<TestMemoryCoordinatorDelegate>());
EXPECT_EQ(1u, memory_coordinator->children().size());
« 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