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

Unified Diff: content/browser/download/download_browsertest.cc

Issue 1538933002: Enable download resumption by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Forgot ChromeOS Created 5 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/download/download_browsertest.cc
diff --git a/content/browser/download/download_browsertest.cc b/content/browser/download/download_browsertest.cc
index 73a21c408207a271a21ceab8136128c8b34484cc..c763b87fb7ff0423b5f767ed074330a28b08199e 100644
--- a/content/browser/download/download_browsertest.cc
+++ b/content/browser/download/download_browsertest.cc
@@ -8,7 +8,7 @@
#include <vector>
#include "base/callback_helpers.h"
-#include "base/command_line.h"
+#include "base/feature_list.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
@@ -26,7 +26,7 @@
#include "content/browser/download/download_resource_handler.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/power_save_blocker.h"
-#include "content/public/common/content_switches.h"
+#include "content/public/common/content_features.h"
#include "content/public/common/webplugininfo.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test.h"
@@ -709,8 +709,12 @@ class DownloadResumptionContentTest
public ::testing::WithParamInterface<DownloadResumptionTestType> {
public:
void SetUpOnMainThread() override {
- base::CommandLine::ForCurrentProcess()->AppendSwitch(
- switches::kEnableDownloadResumption);
+ base::FeatureList::ClearInstanceForTesting();
+ scoped_ptr<base::FeatureList> feature_list(new base::FeatureList);
+ feature_list->InitializeFromCommandLine(
+ features::kDownloadResumption.name, std::string());
+ base::FeatureList::SetInstance(std::move(feature_list));
+
DownloadContentTest::SetUpOnMainThread();
if (GetParam() == DownloadResumptionTestType::RESUME_WITHOUT_RENDERER)
« no previous file with comments | « chrome/browser/extensions/api/downloads/downloads_api_browsertest.cc ('k') | content/browser/download/download_item_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698