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

Unified Diff: content/browser/loader/async_revalidation_manager_browsertest.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/loader/async_revalidation_manager_browsertest.cc
diff --git a/content/browser/loader/async_revalidation_manager_browsertest.cc b/content/browser/loader/async_revalidation_manager_browsertest.cc
index f02e6fca2946408e4b7264c10097a89aaf74fad7..a22a76421a9390c6b4e6588f47a47a6c269c207b 100644
--- a/content/browser/loader/async_revalidation_manager_browsertest.cc
+++ b/content/browser/loader/async_revalidation_manager_browsertest.cc
@@ -8,14 +8,15 @@
#include "base/bind.h"
#include "base/bind_helpers.h"
-#include "base/feature_list.h"
#include "base/macros.h"
#include "base/run_loop.h"
#include "base/strings/string16.h"
#include "base/strings/string_piece.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
+#include "base/test/scoped_feature_list.h"
#include "content/public/common/browser_side_navigation_policy.h"
+#include "content/public/common/content_features.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
@@ -43,11 +44,7 @@ class AsyncRevalidationManagerBrowserTest : public ContentBrowserTest {
~AsyncRevalidationManagerBrowserTest() override {}
void SetUp() override {
- base::FeatureList::ClearInstanceForTesting();
- std::unique_ptr<base::FeatureList> feature_list(new base::FeatureList);
- feature_list->InitializeFromCommandLine(
- "StaleWhileRevalidate2", std::string());
- base::FeatureList::SetInstance(std::move(feature_list));
+ scoped_feature_list_.InitAndEnableFeature(features::kStaleWhileRevalidate);
ASSERT_TRUE(embedded_test_server()->InitializeAndListen());
ContentBrowserTest::SetUp();
@@ -151,6 +148,7 @@ class AsyncRevalidationManagerBrowserTest : public ContentBrowserTest {
base::RunLoop run_loop_;
int requests_counted_ = 0;
+ base::test::ScopedFeatureList scoped_feature_list_;
DISALLOW_COPY_AND_ASSIGN(AsyncRevalidationManagerBrowserTest);
};
« no previous file with comments | « content/browser/loader/async_resource_handler_unittest.cc ('k') | content/browser/loader/reload_cache_control_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698