Index: content/browser/memory/memory_coordinator_browsertest.cc |
diff --git a/content/browser/memory/memory_coordinator_browsertest.cc b/content/browser/memory/memory_coordinator_browsertest.cc |
index 1011966f3d0ccfdb5de982f13b073cb0b90e1035..03c3f4ad38070f1c53b604f4bd1541c96509bd38 100644 |
--- a/content/browser/memory/memory_coordinator_browsertest.cc |
+++ b/content/browser/memory/memory_coordinator_browsertest.cc |
@@ -2,35 +2,43 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "components/memory_coordinator/browser/memory_coordinator.h" |
-#include "components/memory_coordinator/common/memory_coordinator_features.h" |
+#include "content/browser/memory/memory_coordinator.h" |
#include "content/browser/browser_main_loop.h" |
+#include "content/public/common/content_features.h" |
#include "content/public/test/content_browser_test.h" |
#include "content/public/test/content_browser_test_utils.h" |
namespace content { |
+namespace { |
+ |
+void EnableForTesting() { |
+ base::FeatureList::ClearInstanceForTesting(); |
+ std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList); |
+ feature_list->InitializeFromCommandLine(features::kMemoryCoordinator.name, |
+ ""); |
+ base::FeatureList::SetInstance(std::move(feature_list)); |
+} |
+ |
+} // namespace |
+ |
class MemoryCoordinatorTest : public ContentBrowserTest { |
public: |
MemoryCoordinatorTest() {} |
void SetUp() override { |
- memory_coordinator::EnableForTesting(); |
+ EnableForTesting(); |
ContentBrowserTest::SetUp(); |
} |
- protected: |
- memory_coordinator::MemoryCoordinator* memory_coordinator() { |
- return memory_coordinator::MemoryCoordinator::GetInstance(); |
- } |
- |
+ private: |
DISALLOW_COPY_AND_ASSIGN(MemoryCoordinatorTest); |
}; |
IN_PROC_BROWSER_TEST_F(MemoryCoordinatorTest, HandleAdded) { |
GURL url = GetTestUrl("", "simple_page.html"); |
NavigateToURL(shell(), url); |
- EXPECT_EQ(1u, memory_coordinator()->NumChildrenForTesting()); |
+ EXPECT_EQ(1u, MemoryCoordinator::GetInstance()->NumChildrenForTesting()); |
} |
} // namespace content |