OLD | NEW |
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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 int total_num_children, | 421 int total_num_children, |
422 DialogViewID list_view_id) { | 422 DialogViewID list_view_id) { |
423 views::View* list_view = | 423 views::View* list_view = |
424 dialog_view()->GetViewByID(static_cast<int>(list_view_id)); | 424 dialog_view()->GetViewByID(static_cast<int>(list_view_id)); |
425 EXPECT_TRUE(list_view); | 425 EXPECT_TRUE(list_view); |
426 EXPECT_EQ(total_num_children, list_view->child_count()); | 426 EXPECT_EQ(total_num_children, list_view->child_count()); |
427 ClickOnDialogViewAndWait(list_view->child_at(child_index)); | 427 ClickOnDialogViewAndWait(list_view->child_at(child_index)); |
428 } | 428 } |
429 | 429 |
430 std::vector<base::string16> | 430 std::vector<base::string16> |
431 PaymentRequestBrowserTestBase::GetThreeLineLabelValues( | 431 PaymentRequestBrowserTestBase::GetProfileLabelValues( |
432 DialogViewID parent_view_id) { | 432 DialogViewID parent_view_id) { |
433 std::vector<base::string16> line_labels; | 433 std::vector<base::string16> line_labels; |
434 views::View* parent_view = | 434 views::View* parent_view = |
435 dialog_view()->GetViewByID(static_cast<int>(parent_view_id)); | 435 dialog_view()->GetViewByID(static_cast<int>(parent_view_id)); |
436 EXPECT_TRUE(parent_view); | 436 EXPECT_TRUE(parent_view); |
437 | 437 |
438 views::View* view = parent_view->GetViewByID( | 438 views::View* view = parent_view->GetViewByID( |
439 static_cast<int>(DialogViewID::THREE_LINE_LABEL_LINE_1)); | 439 static_cast<int>(DialogViewID::PROFILE_LABEL_LINE_1)); |
440 if (view) | 440 if (view) |
441 line_labels.push_back(static_cast<views::Label*>(view)->text()); | 441 line_labels.push_back(static_cast<views::Label*>(view)->text()); |
442 view = parent_view->GetViewByID( | 442 view = parent_view->GetViewByID( |
443 static_cast<int>(DialogViewID::THREE_LINE_LABEL_LINE_2)); | 443 static_cast<int>(DialogViewID::PROFILE_LABEL_LINE_2)); |
444 if (view) | 444 if (view) |
445 line_labels.push_back(static_cast<views::Label*>(view)->text()); | 445 line_labels.push_back(static_cast<views::Label*>(view)->text()); |
446 view = parent_view->GetViewByID( | 446 view = parent_view->GetViewByID( |
447 static_cast<int>(DialogViewID::THREE_LINE_LABEL_LINE_3)); | 447 static_cast<int>(DialogViewID::PROFILE_LABEL_LINE_3)); |
| 448 if (view) |
| 449 line_labels.push_back(static_cast<views::Label*>(view)->text()); |
| 450 view = parent_view->GetViewByID( |
| 451 static_cast<int>(DialogViewID::PROFILE_LABEL_ERROR)); |
448 if (view) | 452 if (view) |
449 line_labels.push_back(static_cast<views::Label*>(view)->text()); | 453 line_labels.push_back(static_cast<views::Label*>(view)->text()); |
450 | 454 |
451 return line_labels; | 455 return line_labels; |
452 } | 456 } |
453 | 457 |
454 std::vector<base::string16> | 458 std::vector<base::string16> |
455 PaymentRequestBrowserTestBase::GetShippingOptionLabelValues( | 459 PaymentRequestBrowserTestBase::GetShippingOptionLabelValues( |
456 DialogViewID parent_view_id) { | 460 DialogViewID parent_view_id) { |
457 std::vector<base::string16> labels; | 461 std::vector<base::string16> labels; |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
617 std::list<DialogEvent> event_sequence) { | 621 std::list<DialogEvent> event_sequence) { |
618 event_observer_ = | 622 event_observer_ = |
619 base::MakeUnique<DialogEventObserver>(std::move(event_sequence)); | 623 base::MakeUnique<DialogEventObserver>(std::move(event_sequence)); |
620 } | 624 } |
621 | 625 |
622 void PaymentRequestBrowserTestBase::WaitForObservedEvent() { | 626 void PaymentRequestBrowserTestBase::WaitForObservedEvent() { |
623 event_observer_->Wait(); | 627 event_observer_->Wait(); |
624 } | 628 } |
625 | 629 |
626 } // namespace payments | 630 } // namespace payments |
OLD | NEW |