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

Side by Side Diff: components/autofill/content/browser/wallet/wallet_service_url_unittest.cc

Issue 545303002: Remove obsolete Wallet endpoint. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « components/autofill/content/browser/wallet/wallet_service_url.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "components/autofill/content/browser/wallet/wallet_service_url.h" 6 #include "components/autofill/content/browser/wallet/wallet_service_url.h"
7 #include "components/autofill/core/common/autofill_switches.h" 7 #include "components/autofill/core/common/autofill_switches.h"
8 #include "content/public/common/content_switches.h" 8 #include "content/public/common/content_switches.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "url/gurl.h" 10 #include "url/gurl.h"
(...skipping 16 matching lines...) Expand all
27 EXPECT_EQ("https://wallet-web.sandbox.google.com/manage/w/1/settings/" 27 EXPECT_EQ("https://wallet-web.sandbox.google.com/manage/w/1/settings/"
28 "addresses", 28 "addresses",
29 GetManageAddressesUrl(1).spec()); 29 GetManageAddressesUrl(1).spec());
30 EXPECT_EQ("https://wallet-web.sandbox.google.com/online/v2/u/1/wallet/" 30 EXPECT_EQ("https://wallet-web.sandbox.google.com/online/v2/u/1/wallet/"
31 "autocheckout/v1/acceptLegalDocument", 31 "autocheckout/v1/acceptLegalDocument",
32 GetAcceptLegalDocumentsUrl(1).spec()); 32 GetAcceptLegalDocumentsUrl(1).spec());
33 EXPECT_EQ("https://wallet-web.sandbox.google.com/online-secure/v2/u/2/" 33 EXPECT_EQ("https://wallet-web.sandbox.google.com/online-secure/v2/u/2/"
34 "autocheckout/v1/authenticateInstrument?s7e=cvn", 34 "autocheckout/v1/authenticateInstrument?s7e=cvn",
35 GetAuthenticateInstrumentUrl(2).spec()); 35 GetAuthenticateInstrumentUrl(2).spec());
36 EXPECT_EQ("https://wallet-web.sandbox.google.com/online/v2/u/1/wallet/" 36 EXPECT_EQ("https://wallet-web.sandbox.google.com/online/v2/u/1/wallet/"
37 "autocheckout/v1/reportStatus",
38 GetSendStatusUrl(1).spec());
39 EXPECT_EQ("https://wallet-web.sandbox.google.com/online/v2/u/1/wallet/"
40 "autocheckout/v1/saveToWallet", 37 "autocheckout/v1/saveToWallet",
41 GetSaveToWalletNoEscrowUrl(1).spec()); 38 GetSaveToWalletNoEscrowUrl(1).spec());
42 EXPECT_EQ("https://wallet-web.sandbox.google.com/online-secure/v2/u/1/" 39 EXPECT_EQ("https://wallet-web.sandbox.google.com/online-secure/v2/u/1/"
43 "autocheckout/v1/saveToWallet?s7e=card_number%3Bcvn", 40 "autocheckout/v1/saveToWallet?s7e=card_number%3Bcvn",
44 GetSaveToWalletUrl(1).spec()); 41 GetSaveToWalletUrl(1).spec());
45 EXPECT_EQ("https://wallet-web.sandbox.google.com/online/v2/u/1/" 42 EXPECT_EQ("https://wallet-web.sandbox.google.com/online/v2/u/1/"
46 "passiveauth?isChromePayments=true", 43 "passiveauth?isChromePayments=true",
47 GetPassiveAuthUrl(1).spec()); 44 GetPassiveAuthUrl(1).spec());
48 } 45 }
49 46
(...skipping 11 matching lines...) Expand all
61 GetManageInstrumentsUrl(1).spec()); 58 GetManageInstrumentsUrl(1).spec());
62 EXPECT_EQ("https://wallet.google.com/manage/w/1/settings/addresses", 59 EXPECT_EQ("https://wallet.google.com/manage/w/1/settings/addresses",
63 GetManageAddressesUrl(1).spec()); 60 GetManageAddressesUrl(1).spec());
64 EXPECT_EQ("https://wallet.google.com/online/v2/u/1/wallet/" 61 EXPECT_EQ("https://wallet.google.com/online/v2/u/1/wallet/"
65 "autocheckout/v1/acceptLegalDocument", 62 "autocheckout/v1/acceptLegalDocument",
66 GetAcceptLegalDocumentsUrl(1).spec()); 63 GetAcceptLegalDocumentsUrl(1).spec());
67 EXPECT_EQ("https://wallet.google.com/online-secure/v2/u/4/" 64 EXPECT_EQ("https://wallet.google.com/online-secure/v2/u/4/"
68 "autocheckout/v1/authenticateInstrument?s7e=cvn", 65 "autocheckout/v1/authenticateInstrument?s7e=cvn",
69 GetAuthenticateInstrumentUrl(4).spec()); 66 GetAuthenticateInstrumentUrl(4).spec());
70 EXPECT_EQ("https://wallet.google.com/online/v2/u/1/wallet/" 67 EXPECT_EQ("https://wallet.google.com/online/v2/u/1/wallet/"
71 "autocheckout/v1/reportStatus",
72 GetSendStatusUrl(1).spec());
73 EXPECT_EQ("https://wallet.google.com/online/v2/u/1/wallet/"
74 "autocheckout/v1/saveToWallet", 68 "autocheckout/v1/saveToWallet",
75 GetSaveToWalletNoEscrowUrl(1).spec()); 69 GetSaveToWalletNoEscrowUrl(1).spec());
76 EXPECT_EQ("https://wallet.google.com/online-secure/v2/u/1/" 70 EXPECT_EQ("https://wallet.google.com/online-secure/v2/u/1/"
77 "autocheckout/v1/saveToWallet?s7e=card_number%3Bcvn", 71 "autocheckout/v1/saveToWallet?s7e=card_number%3Bcvn",
78 GetSaveToWalletUrl(1).spec()); 72 GetSaveToWalletUrl(1).spec());
79 EXPECT_EQ("https://wallet.google.com/online/v2/u/1/" 73 EXPECT_EQ("https://wallet.google.com/online/v2/u/1/"
80 "passiveauth?isChromePayments=true", 74 "passiveauth?isChromePayments=true",
81 GetPassiveAuthUrl(1).spec()); 75 GetPassiveAuthUrl(1).spec());
82 } 76 }
83 77
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 TEST(WalletServiceUrl, IsSignInRelatedUrl) { 140 TEST(WalletServiceUrl, IsSignInRelatedUrl) {
147 EXPECT_TRUE(IsSignInRelatedUrl(GetSignInUrl())); 141 EXPECT_TRUE(IsSignInRelatedUrl(GetSignInUrl()));
148 EXPECT_TRUE(IsSignInRelatedUrl(GURL("https://accounts.youtube.com"))); 142 EXPECT_TRUE(IsSignInRelatedUrl(GURL("https://accounts.youtube.com")));
149 EXPECT_TRUE(IsSignInRelatedUrl(GURL("https://accounts.youtube.com/"))); 143 EXPECT_TRUE(IsSignInRelatedUrl(GURL("https://accounts.youtube.com/")));
150 EXPECT_TRUE(IsSignInRelatedUrl(GURL("https://accounts.google.com"))); 144 EXPECT_TRUE(IsSignInRelatedUrl(GURL("https://accounts.google.com")));
151 EXPECT_FALSE(IsSignInRelatedUrl(GURL("http://google.com"))); 145 EXPECT_FALSE(IsSignInRelatedUrl(GURL("http://google.com")));
152 } 146 }
153 147
154 } // namespace wallet 148 } // namespace wallet
155 } // namespace autofill 149 } // namespace autofill
OLDNEW
« no previous file with comments | « components/autofill/content/browser/wallet/wallet_service_url.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698