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

Side by Side Diff: chrome/browser/ui/views/payments/payment_request_interactive_uitest_base.h

Issue 2725623004: [Web Payments] Add the contact info screen. (Closed)
Patch Set: Address comments. 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 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_INTERACTIVE_UITEST_BASE _H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_INTERACTIVE_UITEST_BASE _H_
6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_INTERACTIVE_UITEST_BASE _H_ 6 #define CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_INTERACTIVE_UITEST_BASE _H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 void SetUpCommandLine(base::CommandLine* command_line) override; 71 void SetUpCommandLine(base::CommandLine* command_line) override;
72 void SetUpOnMainThread() override; 72 void SetUpOnMainThread() override;
73 73
74 // PaymentRequestDialogView::ObserverForTest 74 // PaymentRequestDialogView::ObserverForTest
75 void OnDialogOpened() override; 75 void OnDialogOpened() override;
76 void OnOrderSummaryOpened() override; 76 void OnOrderSummaryOpened() override;
77 void OnPaymentMethodOpened() override; 77 void OnPaymentMethodOpened() override;
78 void OnCreditCardEditorOpened() override; 78 void OnCreditCardEditorOpened() override;
79 void OnBackNavigation() override; 79 void OnBackNavigation() override;
80 void OnContactInfoOpened() override;
80 81
81 // views::WidgetObserver 82 // views::WidgetObserver
82 // Effective way to be warned of all dialog closures. 83 // Effective way to be warned of all dialog closures.
83 void OnWidgetDestroyed(views::Widget* widget) override; 84 void OnWidgetDestroyed(views::Widget* widget) override;
84 85
85 // Will call JavaScript to invoke the PaymentRequest dialog and verify that 86 // Will call JavaScript to invoke the PaymentRequest dialog and verify that
86 // it's open. 87 // it's open.
87 void InvokePaymentRequestUI(); 88 void InvokePaymentRequestUI();
88 89
89 // Utility functions that will click on Dialog views and wait for the 90 // Utility functions that will click on Dialog views and wait for the
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 PaymentRequestDialogView* dialog_view() { return delegate_->dialog_view(); } 146 PaymentRequestDialogView* dialog_view() { return delegate_->dialog_view(); }
146 147
147 // Various events that can be waited on by the DialogEventObserver. 148 // Various events that can be waited on by the DialogEventObserver.
148 enum DialogEvent : int { 149 enum DialogEvent : int {
149 DIALOG_OPENED, 150 DIALOG_OPENED,
150 DIALOG_CLOSED, 151 DIALOG_CLOSED,
151 ORDER_SUMMARY_OPENED, 152 ORDER_SUMMARY_OPENED,
152 PAYMENT_METHOD_OPENED, 153 PAYMENT_METHOD_OPENED,
153 CREDIT_CARD_EDITOR_OPENED, 154 CREDIT_CARD_EDITOR_OPENED,
154 BACK_NAVIGATION, 155 BACK_NAVIGATION,
156 CONTACT_INFO_OPENED,
155 }; 157 };
156 158
157 // DialogEventObserver is used to wait on specific events that may have 159 // DialogEventObserver is used to wait on specific events that may have
158 // occured before the call to Wait(), or after, in which case a RunLoop is 160 // occured before the call to Wait(), or after, in which case a RunLoop is
159 // used. 161 // used.
160 // 162 //
161 // Usage: 163 // Usage:
162 // observer_.reset(new DialogEventObserver([DialogEvent])); 164 // observer_.reset(new DialogEventObserver([DialogEvent]));
163 // 165 //
164 // Do stuff, which (a)synchronously calls observer_->Observe([DialogEvent]). 166 // Do stuff, which (a)synchronously calls observer_->Observe([DialogEvent]).
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 std::unique_ptr<net::EmbeddedTestServer> https_server_; 198 std::unique_ptr<net::EmbeddedTestServer> https_server_;
197 // Weak, owned by the PaymentRequest object. 199 // Weak, owned by the PaymentRequest object.
198 TestChromePaymentRequestDelegate* delegate_; 200 TestChromePaymentRequestDelegate* delegate_;
199 201
200 DISALLOW_COPY_AND_ASSIGN(PaymentRequestInteractiveTestBase); 202 DISALLOW_COPY_AND_ASSIGN(PaymentRequestInteractiveTestBase);
201 }; 203 };
202 204
203 } // namespace payments 205 } // namespace payments
204 206
205 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_INTERACTIVE_UITEST_B ASE_H_ 207 #endif // CHROME_BROWSER_UI_VIEWS_PAYMENTS_PAYMENT_REQUEST_INTERACTIVE_UITEST_B ASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698