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

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

Issue 2734693002: [Payments] Convert interactive tests to browsertests (Closed)
Patch Set: Initial 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
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 "chrome/browser/ui/views/payments/payment_request_browsertest_base.h"
5 #include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h" 6 #include "chrome/browser/ui/views/payments/payment_request_dialog_view_ids.h"
6 #include "chrome/browser/ui/views/payments/payment_request_interactive_uitest_ba se.h"
7 #include "components/autofill/core/browser/autofill_test_utils.h" 7 #include "components/autofill/core/browser/autofill_test_utils.h"
8 #include "components/autofill/core/browser/personal_data_manager.h" 8 #include "components/autofill/core/browser/personal_data_manager.h"
9 #include "components/payments/content/payment_request.h" 9 #include "components/payments/content/payment_request.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace payments { 12 namespace payments {
13 13
14 class PaymentMethodViewControllerTest 14 class PaymentMethodViewControllerTest : public PaymentRequestBrowserTestBase {
15 : public PaymentRequestInteractiveTestBase {
16 protected: 15 protected:
17 PaymentMethodViewControllerTest() 16 PaymentMethodViewControllerTest()
18 : PaymentRequestInteractiveTestBase( 17 : PaymentRequestBrowserTestBase(
19 "/payment_request_no_shipping_test.html") {} 18 "/payment_request_no_shipping_test.html") {}
20 19
21 private: 20 private:
22 DISALLOW_COPY_AND_ASSIGN(PaymentMethodViewControllerTest); 21 DISALLOW_COPY_AND_ASSIGN(PaymentMethodViewControllerTest);
23 }; 22 };
24 23
25 IN_PROC_BROWSER_TEST_F(PaymentMethodViewControllerTest, EmptyList) { 24 IN_PROC_BROWSER_TEST_F(PaymentMethodViewControllerTest, EmptyList) {
26 InvokePaymentRequestUI(); 25 InvokePaymentRequestUI();
27 OpenPaymentMethodScreen(); 26 OpenPaymentMethodScreen();
28 27
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 93
95 // Clicking on the second card again should not modify any state. 94 // Clicking on the second card again should not modify any state.
96 ClickOnDialogViewAndWait(list_view->child_at(1)); 95 ClickOnDialogViewAndWait(list_view->child_at(1));
97 96
98 EXPECT_EQ(card2, *request->selected_credit_card()); 97 EXPECT_EQ(card2, *request->selected_credit_card());
99 EXPECT_FALSE(checkmark_view->visible()); 98 EXPECT_FALSE(checkmark_view->visible());
100 EXPECT_TRUE(checkmark_view2->visible()); 99 EXPECT_TRUE(checkmark_view2->visible());
101 } 100 }
102 101
103 } // namespace payments 102 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698