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

Side by Side Diff: chrome/browser/ui/views/payments/payment_request_can_make_payment_browsertest.cc

Issue 2772263002: Disable flaky CanMakePayment_Supported and CanMakePayment_NotSupported_Incognito (PaymentRequestCan… (Closed)
Patch Set: Created 3 years, 9 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 | « no previous file | 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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 <vector> 5 #include <vector>
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h" 9 #include "chrome/browser/ui/views/payments/payment_request_browsertest_base.h"
10 #include "components/autofill/core/browser/autofill_test_utils.h" 10 #include "components/autofill/core/browser/autofill_test_utils.h"
(...skipping 11 matching lines...) Expand all
22 22
23 void CallCanMakePayment() { 23 void CallCanMakePayment() {
24 ASSERT_TRUE(content::ExecuteScript(GetActiveWebContents(), "buy();")); 24 ASSERT_TRUE(content::ExecuteScript(GetActiveWebContents(), "buy();"));
25 } 25 }
26 26
27 private: 27 private:
28 DISALLOW_COPY_AND_ASSIGN(PaymentRequestCanMakePaymentQueryTest); 28 DISALLOW_COPY_AND_ASSIGN(PaymentRequestCanMakePaymentQueryTest);
29 }; 29 };
30 30
31 // Visa is required, and user has a visa instrument. 31 // Visa is required, and user has a visa instrument.
32 // Test is flaky on ChromeOS. crbug.com/705225 32 // Test is flaky. crbug.com/705225
33 #if defined(OS_CHROMEOS)
34 #define MAYBE_CanMakePayment_Supported DISABLED_CanMakePayment_Supported
35 #else
36 #define MAYBE_CanMakePayment_Supported CanMakePayment_Supported
37 #endif
38 IN_PROC_BROWSER_TEST_F(PaymentRequestCanMakePaymentQueryTest, 33 IN_PROC_BROWSER_TEST_F(PaymentRequestCanMakePaymentQueryTest,
39 MAYBE_CanMakePayment_Supported) { 34 DISABLED_CanMakePayment_Supported) {
40 const autofill::CreditCard card = autofill::test::GetCreditCard(); // Visa. 35 const autofill::CreditCard card = autofill::test::GetCreditCard(); // Visa.
41 AddCreditCard(card); 36 AddCreditCard(card);
42 37
43 CallCanMakePayment(); 38 CallCanMakePayment();
44 39
45 ExpectBodyContains(std::vector<base::string16>{base::ASCIIToUTF16("true")}); 40 ExpectBodyContains(std::vector<base::string16>{base::ASCIIToUTF16("true")});
46 } 41 }
47 42
48 // Visa is required, and user has a visa instrument, and user is in incognito 43 // Visa is required, and user has a visa instrument, and user is in incognito
49 // mode. 44 // mode.
(...skipping 15 matching lines...) Expand all
65 const autofill::CreditCard card = autofill::test::GetCreditCard2(); // Amex. 60 const autofill::CreditCard card = autofill::test::GetCreditCard2(); // Amex.
66 AddCreditCard(card); 61 AddCreditCard(card);
67 62
68 CallCanMakePayment(); 63 CallCanMakePayment();
69 64
70 ExpectBodyContains(std::vector<base::string16>{base::ASCIIToUTF16("false")}); 65 ExpectBodyContains(std::vector<base::string16>{base::ASCIIToUTF16("false")});
71 } 66 }
72 67
73 // Visa is required, and user doesn't have a visa instrument and the user is in 68 // Visa is required, and user doesn't have a visa instrument and the user is in
74 // incognito mode. 69 // incognito mode.
75 // Test is flaky on ChromeOS. crbug.com/705271 70 // Test is flaky. crbug.com/705271
76 #if defined(OS_CHROMEOS)
77 #define MAYBE_CanMakePayment_NotSupported_Incognito \
78 DISABLED_CanMakePayment_NotSupported_Incognito
79 #else
80 #define MAYBE_CanMakePayment_NotSupported_Incognito \
81 CanMakePayment_NotSupported_Incognito
82 #endif
83 IN_PROC_BROWSER_TEST_F(PaymentRequestCanMakePaymentQueryTest, 71 IN_PROC_BROWSER_TEST_F(PaymentRequestCanMakePaymentQueryTest,
84 MAYBE_CanMakePayment_NotSupported_Incognito) { 72 DISABLED_CanMakePayment_NotSupported_Incognito) {
85 SetIncognitoForTesting(); 73 SetIncognitoForTesting();
86 74
87 const autofill::CreditCard card = autofill::test::GetCreditCard2(); // Amex. 75 const autofill::CreditCard card = autofill::test::GetCreditCard2(); // Amex.
88 AddCreditCard(card); 76 AddCreditCard(card);
89 77
90 CallCanMakePayment(); 78 CallCanMakePayment();
91 79
92 // Returns true because the user is in incognito mode, even though it should 80 // Returns true because the user is in incognito mode, even though it should
93 // return false in a normal profile. 81 // return false in a normal profile.
94 ExpectBodyContains(std::vector<base::string16>{base::ASCIIToUTF16("true")}); 82 ExpectBodyContains(std::vector<base::string16>{base::ASCIIToUTF16("true")});
95 } 83 }
96 84
97 } // namespace payments 85 } // namespace payments
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698