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

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

Issue 2484613002: Migrate more tests to ScopedFeatureList. (Closed)
Patch Set: rebase Created 4 years, 1 month 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_unittest.cc
diff --git a/content/browser/memory/memory_coordinator_impl_unittest.cc b/content/browser/memory/memory_coordinator_impl_unittest.cc
index 9a63c0ef773b308a7e32dc04fe5a012f80a42d63..787636dbb43f1a07855af9db52140745e9ef683d 100644
--- a/content/browser/memory/memory_coordinator_impl_unittest.cc
+++ b/content/browser/memory/memory_coordinator_impl_unittest.cc
@@ -6,7 +6,9 @@
#include "base/memory/memory_coordinator_proxy.h"
#include "base/run_loop.h"
+#include "base/test/scoped_feature_list.h"
#include "content/browser/memory/memory_monitor.h"
+#include "content/public/common/content_features.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace content {
@@ -51,7 +53,7 @@ class MockMemoryMonitor : public MemoryMonitor {
class MemoryCoordinatorImplTest : public testing::Test {
public:
void SetUp() override {
- MemoryCoordinator::EnableFeaturesForTesting();
+ scoped_feature_list_.InitAndEnableFeature(features::kMemoryCoordinator);
coordinator_.reset(new MemoryCoordinatorImpl(
message_loop_.task_runner(), base::WrapUnique(new MockMemoryMonitor)));
@@ -73,6 +75,7 @@ class MemoryCoordinatorImplTest : public testing::Test {
protected:
std::unique_ptr<MemoryCoordinatorImpl> coordinator_;
base::MessageLoop message_loop_;
+ base::test::ScopedFeatureList scoped_feature_list_;
};
TEST_F(MemoryCoordinatorImplTest, CalculateNextState) {
« no previous file with comments | « content/browser/memory/memory_coordinator_browsertest.cc ('k') | content/child/resource_dispatcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698