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

Unified Diff: content/child/resource_dispatcher_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/child/resource_dispatcher_unittest.cc
diff --git a/content/child/resource_dispatcher_unittest.cc b/content/child/resource_dispatcher_unittest.cc
index 1587ad1ef7970640ea23a4a18dfc2c184cd28787..02ae8fde6e4af1e534b0a1fcc07d42bd1f83a06d 100644
--- a/content/child/resource_dispatcher_unittest.cc
+++ b/content/child/resource_dispatcher_unittest.cc
@@ -13,13 +13,13 @@
#include <utility>
#include <vector>
-#include "base/feature_list.h"
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/memory/shared_memory.h"
#include "base/message_loop/message_loop.h"
#include "base/process/process_handle.h"
#include "base/run_loop.h"
+#include "base/test/scoped_feature_list.h"
#include "content/child/request_extra_data.h"
#include "content/common/appcache_interfaces.h"
#include "content/common/resource_messages.h"
@@ -379,11 +379,10 @@ TEST_F(ResourceDispatcherTest, RoundTrip) {
// A simple request with an inline data response.
TEST_F(ResourceDispatcherTest, ResponseWithInlinedData) {
- auto feature_list = base::MakeUnique<base::FeatureList>();
- feature_list->InitializeFromCommandLine(
- features::kOptimizeLoadingIPCForSmallResources.name, std::string());
- base::FeatureList::ClearInstanceForTesting();
- base::FeatureList::SetInstance(std::move(feature_list));
+ base::test::ScopedFeatureList scoped_feature_list;
+ scoped_feature_list.InitAndEnableFeature(
+ features::kOptimizeLoadingIPCForSmallResources);
+
std::unique_ptr<ResourceRequest> request(CreateResourceRequest(false));
TestRequestPeer::Context peer_context;
StartAsync(std::move(request), NULL, &peer_context);
« no previous file with comments | « content/browser/memory/memory_coordinator_impl_unittest.cc ('k') | media/blink/webmediaplayer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698