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

Unified Diff: ios/chrome/browser/web/chrome_web_client_unittest.mm

Issue 2967273002: [Payments] Add an entry for Payment Request to chrome://flags on iOS (Closed)
Patch Set: deps fix Created 3 years, 5 months 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
« no previous file with comments | « ios/chrome/browser/web/chrome_web_client.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/browser/web/chrome_web_client_unittest.mm
diff --git a/ios/chrome/browser/web/chrome_web_client_unittest.mm b/ios/chrome/browser/web/chrome_web_client_unittest.mm
index c271de672045c7294ada933a2134cf58a47826d0..6c29a61dfd036ce68890f463ff3e8594cd887c32 100644
--- a/ios/chrome/browser/web/chrome_web_client_unittest.mm
+++ b/ios/chrome/browser/web/chrome_web_client_unittest.mm
@@ -12,8 +12,8 @@
#include "base/memory/ptr_util.h"
#include "base/strings/string_split.h"
#include "base/strings/sys_string_conversions.h"
-#include "ios/chrome/browser/chrome_switches.h"
-#include "ios/chrome/browser/experimental_flags.h"
+#include "base/test/scoped_feature_list.h"
+#include "components/payments/core/features.h"
#include "ios/web/public/test/fakes/test_browser_state.h"
#import "ios/web/public/test/js_test_util.h"
#include "ios/web/public/test/scoped_testing_web_client.h"
@@ -101,8 +101,8 @@ TEST_F(ChromeWebClientTest, WKWebViewEarlyPageScriptPaymentRequest) {
EXPECT_NSEQ(@"undefined", web::ExecuteJavaScript(
web_view, @"typeof window.PaymentRequest"));
- base::CommandLine::ForCurrentProcess()->AppendSwitchASCII(
- switches::kEnablePaymentRequest, std::string());
+ base::test::ScopedFeatureList feature_list;
+ feature_list.InitAndEnableFeature(payments::features::kWebPayments);
script = web_client.Get()->GetEarlyPageScript(&browser_state);
web::ExecuteJavaScript(web_view, script);
EXPECT_NSEQ(@"function", web::ExecuteJavaScript(
« no previous file with comments | « ios/chrome/browser/web/chrome_web_client.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698