| OLD | NEW |
| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 const autofill::CreditCard card = autofill::test::GetCreditCard2(); // Amex. | 65 const autofill::CreditCard card = autofill::test::GetCreditCard2(); // Amex. |
| 66 AddCreditCard(card); | 66 AddCreditCard(card); |
| 67 | 67 |
| 68 CallCanMakePayment(); | 68 CallCanMakePayment(); |
| 69 | 69 |
| 70 ExpectBodyContains(std::vector<base::string16>{base::ASCIIToUTF16("false")}); | 70 ExpectBodyContains(std::vector<base::string16>{base::ASCIIToUTF16("false")}); |
| 71 } | 71 } |
| 72 | 72 |
| 73 // Visa is required, and user doesn't have a visa instrument and the user is in | 73 // Visa is required, and user doesn't have a visa instrument and the user is in |
| 74 // incognito mode. | 74 // incognito mode. |
| 75 // Test is flaky. crbug.com/705271 | 75 // Test is flaky on ChromeOS. 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 |
| 76 IN_PROC_BROWSER_TEST_F(PaymentRequestCanMakePaymentQueryTest, | 83 IN_PROC_BROWSER_TEST_F(PaymentRequestCanMakePaymentQueryTest, |
| 77 DISABLED_CanMakePayment_NotSupported_Incognito) { | 84 MAYBE_CanMakePayment_NotSupported_Incognito) { |
| 78 SetIncognitoForTesting(); | 85 SetIncognitoForTesting(); |
| 79 | 86 |
| 80 const autofill::CreditCard card = autofill::test::GetCreditCard2(); // Amex. | 87 const autofill::CreditCard card = autofill::test::GetCreditCard2(); // Amex. |
| 81 AddCreditCard(card); | 88 AddCreditCard(card); |
| 82 | 89 |
| 83 CallCanMakePayment(); | 90 CallCanMakePayment(); |
| 84 | 91 |
| 85 // Returns true because the user is in incognito mode, even though it should | 92 // Returns true because the user is in incognito mode, even though it should |
| 86 // return false in a normal profile. | 93 // return false in a normal profile. |
| 87 ExpectBodyContains(std::vector<base::string16>{base::ASCIIToUTF16("true")}); | 94 ExpectBodyContains(std::vector<base::string16>{base::ASCIIToUTF16("true")}); |
| 88 } | 95 } |
| 89 | 96 |
| 90 } // namespace payments | 97 } // namespace payments |
| OLD | NEW |