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

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

Issue 2855203002: [Payments] Display the shipping option error alongside the address (Closed)
Patch Set: android test fix Created 3 years, 7 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_browsertest_base.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 570 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 base::RunLoop().Run(); 581 base::RunLoop().Run();
582 } else if (view_stack->slide_out_animator_->IsAnimating()) { 582 } else if (view_stack->slide_out_animator_->IsAnimating()) {
583 view_stack->slide_out_animator_->SetAnimationDuration(1); 583 view_stack->slide_out_animator_->SetAnimationDuration(1);
584 view_stack->slide_out_animator_->SetAnimationDelegate( 584 view_stack->slide_out_animator_->SetAnimationDelegate(
585 view_stack->top(), std::unique_ptr<gfx::AnimationDelegate>( 585 view_stack->top(), std::unique_ptr<gfx::AnimationDelegate>(
586 new gfx::TestAnimationDelegate())); 586 new gfx::TestAnimationDelegate()));
587 base::RunLoop().Run(); 587 base::RunLoop().Run();
588 } 588 }
589 } 589 }
590 590
591 const base::string16& PaymentRequestBrowserTestBase::GetLabelText(
592 DialogViewID view_id) {
593 views::View* view = dialog_view()->GetViewByID(static_cast<int>(view_id));
594 DCHECK(view);
595 return static_cast<views::Label*>(view)->text();
596 }
597
591 const base::string16& PaymentRequestBrowserTestBase::GetStyledLabelText( 598 const base::string16& PaymentRequestBrowserTestBase::GetStyledLabelText(
592 DialogViewID view_id) { 599 DialogViewID view_id) {
593 views::View* view = dialog_view()->GetViewByID(static_cast<int>(view_id)); 600 views::View* view = dialog_view()->GetViewByID(static_cast<int>(view_id));
594 DCHECK(view); 601 DCHECK(view);
595 return static_cast<views::StyledLabel*>(view)->text(); 602 return static_cast<views::StyledLabel*>(view)->text();
596 } 603 }
597 604
598 const base::string16& PaymentRequestBrowserTestBase::GetErrorLabelForType( 605 const base::string16& PaymentRequestBrowserTestBase::GetErrorLabelForType(
599 autofill::ServerFieldType type) { 606 autofill::ServerFieldType type) {
600 views::View* view = dialog_view()->GetViewByID( 607 views::View* view = dialog_view()->GetViewByID(
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 std::list<DialogEvent> event_sequence) { 644 std::list<DialogEvent> event_sequence) {
638 event_observer_ = 645 event_observer_ =
639 base::MakeUnique<DialogEventObserver>(std::move(event_sequence)); 646 base::MakeUnique<DialogEventObserver>(std::move(event_sequence));
640 } 647 }
641 648
642 void PaymentRequestBrowserTestBase::WaitForObservedEvent() { 649 void PaymentRequestBrowserTestBase::WaitForObservedEvent() {
643 event_observer_->Wait(); 650 event_observer_->Wait();
644 } 651 }
645 652
646 } // namespace payments 653 } // namespace payments
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698