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

Unified Diff: chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc

Issue 25127002: Use production Wallet service URL by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 3 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 | « chrome/browser/about_flags.cc ('k') | components/autofill/content/browser/wallet/wallet_service_url.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
diff --git a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
index 375ec49a379fca3add8718e86b6c899ddbfb22a2..3fc38dc561ad42eb70b9ffdf8f92915c80078c96 100644
--- a/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
+++ b/chrome/browser/ui/autofill/autofill_dialog_controller_unittest.cc
@@ -1770,9 +1770,6 @@ TEST_F(AutofillDialogControllerTest, WalletServerSideValidationUnrecoverable) {
// Test Wallet banners are show in the right situations. These banners promote
// saving details into Wallet (i.e. "[x] Save details to Wallet").
TEST_F(AutofillDialogControllerTest, WalletBanners) {
- CommandLine* command_line = CommandLine::ForCurrentProcess();
- command_line->AppendSwitch(switches::kWalletServiceUseProd);
-
// Simulate non-signed-in case.
SetUpControllerWithFormData(DefaultFormData());
GoogleServiceAuthError error(GoogleServiceAuthError::NONE);
@@ -2140,13 +2137,23 @@ TEST_F(AutofillDialogControllerTest, NotProdNotification) {
wallet::GetTestWalletItems(wallet::AMEX_DISALLOWED));
CommandLine* command_line = CommandLine::ForCurrentProcess();
- ASSERT_FALSE(command_line->HasSwitch(switches::kWalletServiceUseProd));
- EXPECT_FALSE(
- NotificationsOfType(DialogNotification::DEVELOPER_WARNING).empty());
+ ASSERT_EQ(
+ "",
+ command_line->GetSwitchValueASCII(switches::kWalletServiceUseSandbox));
+
+#if defined(OS_MACOSX)
+ // Default on Mac is to use sandbox (which shows a warning).
+ EXPECT_EQ(1U,
+ NotificationsOfType(DialogNotification::DEVELOPER_WARNING).size());
+#else
+ // Default everywhere else is to use prod (no warning).
+ EXPECT_EQ(0U,
+ NotificationsOfType(DialogNotification::DEVELOPER_WARNING).size());
+#endif
- command_line->AppendSwitch(switches::kWalletServiceUseProd);
- EXPECT_TRUE(
- NotificationsOfType(DialogNotification::DEVELOPER_WARNING).empty());
+ command_line->AppendSwitchASCII(switches::kWalletServiceUseSandbox, "1");
+ EXPECT_EQ(1U,
+ NotificationsOfType(DialogNotification::DEVELOPER_WARNING).size());
}
// Ensure Wallet instruments marked expired by the server are shown as invalid.
« no previous file with comments | « chrome/browser/about_flags.cc ('k') | components/autofill/content/browser/wallet/wallet_service_url.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698