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

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

Issue 2724063002: [Payments] Add a Pay button in the Order summary screen (Closed)
Patch Set: addressed 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 #include "chrome/browser/ui/views/payments/payment_request_interactive_uitest_ba se.h" 5 #include "chrome/browser/ui/views/payments/payment_request_interactive_uitest_ba se.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 autofill::ServerFieldType type) { 274 autofill::ServerFieldType type) {
275 ValidatingCombobox* combobox = static_cast<ValidatingCombobox*>( 275 ValidatingCombobox* combobox = static_cast<ValidatingCombobox*>(
276 delegate_->dialog_view()->GetViewByID(static_cast<int>(type))); 276 delegate_->dialog_view()->GetViewByID(static_cast<int>(type)));
277 DCHECK(combobox); 277 DCHECK(combobox);
278 return combobox->invalid(); 278 return combobox->invalid();
279 } 279 }
280 280
281 bool PaymentRequestInteractiveTestBase::IsPayButtonEnabled() { 281 bool PaymentRequestInteractiveTestBase::IsPayButtonEnabled() {
282 views::Button* button = 282 views::Button* button =
283 static_cast<views::Button*>(delegate_->dialog_view()->GetViewByID( 283 static_cast<views::Button*>(delegate_->dialog_view()->GetViewByID(
284 static_cast<int>(DialogViewID::PAYMENT_SHEET_PAY_BUTTON))); 284 static_cast<int>(DialogViewID::PAY_BUTTON)));
285 DCHECK(button); 285 DCHECK(button);
286 return button->enabled(); 286 return button->enabled();
287 } 287 }
288 288
289 void PaymentRequestInteractiveTestBase::WaitForAnimation() { 289 void PaymentRequestInteractiveTestBase::WaitForAnimation() {
290 ViewStack* view_stack = dialog_view()->view_stack_for_testing(); 290 ViewStack* view_stack = dialog_view()->view_stack_for_testing();
291 if (view_stack->slide_in_animator_->IsAnimating()) { 291 if (view_stack->slide_in_animator_->IsAnimating()) {
292 view_stack->slide_in_animator_->SetAnimationDuration(1); 292 view_stack->slide_in_animator_->SetAnimationDuration(1);
293 view_stack->slide_in_animator_->SetAnimationDelegate( 293 view_stack->slide_in_animator_->SetAnimationDelegate(
294 view_stack->top(), std::unique_ptr<gfx::AnimationDelegate>( 294 view_stack->top(), std::unique_ptr<gfx::AnimationDelegate>(
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 345
346 void PaymentRequestInteractiveTestBase::ResetEventObserver(DialogEvent event) { 346 void PaymentRequestInteractiveTestBase::ResetEventObserver(DialogEvent event) {
347 event_observer_ = base::MakeUnique<DialogEventObserver>(event); 347 event_observer_ = base::MakeUnique<DialogEventObserver>(event);
348 } 348 }
349 349
350 void PaymentRequestInteractiveTestBase::WaitForObservedEvent() { 350 void PaymentRequestInteractiveTestBase::WaitForObservedEvent() {
351 event_observer_->Wait(); 351 event_observer_->Wait();
352 } 352 }
353 353
354 } // namespace payments 354 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698