Commit 9a9c9a9a authored by Eugene But's avatar Eugene But Committed by Commit Bot

Enabled NewPassKitDownload feature by default.

Disabled this feature for unit test which tests old code.

Bug: 787943
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet;master.tryserver.chromium.mac:ios-simulator-full-configs
Change-Id: I2aba8bcca42197bc18b390181099ba664f171646
Reviewed-on: https://chromium-review.googlesource.com/828284Reviewed-by: default avatarGregory Chatzinoff <gchatz@chromium.org>
Commit-Queue: Eugene But <eugenebut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524440}
parent 48fdf633
...@@ -11,7 +11,7 @@ const base::Feature kSlimNavigationManager{"SlimNavigationManager", ...@@ -11,7 +11,7 @@ const base::Feature kSlimNavigationManager{"SlimNavigationManager",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
const base::Feature kNewPassKitDownload{"NewPassKitDownload", const base::Feature kNewPassKitDownload{"NewPassKitDownload",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_ENABLED_BY_DEFAULT};
const base::Feature kNewFileDownload{"NewFileDownload", const base::Feature kNewFileDownload{"NewFileDownload",
base::FEATURE_DISABLED_BY_DEFAULT}; base::FEATURE_DISABLED_BY_DEFAULT};
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
#include <memory> #include <memory>
#include "base/test/scoped_feature_list.h"
#include "ios/web/public/features.h"
#include "ios/web/public/test/web_test.h" #include "ios/web/public/test/web_test.h"
#include "net/base/net_errors.h" #include "net/base/net_errors.h"
#include "net/http/http_response_headers.h" #include "net/http/http_response_headers.h"
...@@ -39,6 +41,7 @@ class CRWPassKitDownloaderTest : public WebTest { ...@@ -39,6 +41,7 @@ class CRWPassKitDownloaderTest : public WebTest {
protected: protected:
void SetUp() override { void SetUp() override {
WebTest::SetUp(); WebTest::SetUp();
feature_list_.InitAndDisableFeature(web::features::kNewPassKitDownload);
completion_handler_success_ = false; completion_handler_success_ = false;
fetcher_factory_.reset(new net::TestURLFetcherFactory()); fetcher_factory_.reset(new net::TestURLFetcherFactory());
downloader_ = [[CRWPassKitDownloader alloc] downloader_ = [[CRWPassKitDownloader alloc]
...@@ -76,6 +79,8 @@ class CRWPassKitDownloaderTest : public WebTest { ...@@ -76,6 +79,8 @@ class CRWPassKitDownloaderTest : public WebTest {
// set from the completion handler based on whether actual data is equal to // set from the completion handler based on whether actual data is equal to
// expected data. // expected data.
bool completion_handler_success_; bool completion_handler_success_;
base::test::ScopedFeatureList feature_list_;
}; };
// Tests case where CRWPassKitDownloader successfully downloads data. // Tests case where CRWPassKitDownloader successfully downloads data.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment