| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include <vector> |
| 6 |
| 7 #include "chrome/browser/ui/views/payments/payment_request_interactive_uitest_ba
se.h" |
| 8 #include "components/payments/payment_request.h" |
| 9 #include "components/payments/payment_request_web_contents_manager.h" |
| 10 |
| 11 namespace payments { |
| 12 |
| 13 class PaymentRequestWebContentsManagerTest |
| 14 : public PaymentRequestInteractiveTestBase { |
| 15 protected: |
| 16 PaymentRequestWebContentsManagerTest() |
| 17 : PaymentRequestInteractiveTestBase( |
| 18 "/payment_request_multiple_requests.html") {} |
| 19 }; |
| 20 |
| 21 // If the page creates multiple PaymentRequest objects, it should not crash. |
| 22 IN_PROC_BROWSER_TEST_F(PaymentRequestWebContentsManagerTest, MultipleRequests) { |
| 23 const std::vector<PaymentRequest*> payment_requests = |
| 24 GetPaymentRequests(GetActiveWebContents()); |
| 25 EXPECT_EQ(5U, payment_requests.size()); |
| 26 } |
| 27 |
| 28 class PaymentRequestNoShippingTest : public PaymentRequestInteractiveTestBase { |
| 29 protected: |
| 30 PaymentRequestNoShippingTest() |
| 31 : PaymentRequestInteractiveTestBase( |
| 32 "/payment_request_no_shipping_test.html") {} |
| 33 }; |
| 34 |
| 35 IN_PROC_BROWSER_TEST_F(PaymentRequestNoShippingTest, OpenPaymentRequestSheet) { |
| 36 InvokePaymentRequestUI(); |
| 37 } |
| 38 |
| 39 } // namespace payments |
| OLD | NEW |