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

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

Issue 2905283002: [Payments] Allow international phone from different country in shipping editor. (Closed)
Patch Set: Created 3 years, 6 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 <iostream> 8 #include <iostream>
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 void PaymentRequestBrowserTestBase::OnSpecDoneUpdating() { 204 void PaymentRequestBrowserTestBase::OnSpecDoneUpdating() {
205 if (event_observer_) 205 if (event_observer_)
206 event_observer_->Observe(DialogEvent::SPEC_DONE_UPDATING); 206 event_observer_->Observe(DialogEvent::SPEC_DONE_UPDATING);
207 } 207 }
208 208
209 void PaymentRequestBrowserTestBase::OnCvcPromptShown() { 209 void PaymentRequestBrowserTestBase::OnCvcPromptShown() {
210 if (event_observer_) 210 if (event_observer_)
211 event_observer_->Observe(DialogEvent::CVC_PROMPT_SHOWN); 211 event_observer_->Observe(DialogEvent::CVC_PROMPT_SHOWN);
212 } 212 }
213 213
214 void PaymentRequestBrowserTestBase::OnEditorValidationError() {
215 if (event_observer_)
216 event_observer_->Observe(DialogEvent::EDITOR_VALIDATION_ERROR);
217 }
218
214 void PaymentRequestBrowserTestBase::InvokePaymentRequestUI() { 219 void PaymentRequestBrowserTestBase::InvokePaymentRequestUI() {
215 ResetEventObserver(DialogEvent::DIALOG_OPENED); 220 ResetEventObserver(DialogEvent::DIALOG_OPENED);
216 221
217 content::WebContents* web_contents = GetActiveWebContents(); 222 content::WebContents* web_contents = GetActiveWebContents();
218 const std::string click_buy_button_js = 223 const std::string click_buy_button_js =
219 "(function() { document.getElementById('buy').click(); })();"; 224 "(function() { document.getElementById('buy').click(); })();";
220 ASSERT_TRUE(content::ExecuteScript(web_contents, click_buy_button_js)); 225 ASSERT_TRUE(content::ExecuteScript(web_contents, click_buy_button_js));
221 226
222 WaitForObservedEvent(); 227 WaitForObservedEvent();
223 228
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
772 break; 777 break;
773 case DialogEvent::CVC_PROMPT_SHOWN: 778 case DialogEvent::CVC_PROMPT_SHOWN:
774 out << "CVC_PROMPT_SHOWN"; 779 out << "CVC_PROMPT_SHOWN";
775 break; 780 break;
776 case DialogEvent::NOT_SUPPORTED_ERROR: 781 case DialogEvent::NOT_SUPPORTED_ERROR:
777 out << "NOT_SUPPORTED_ERROR"; 782 out << "NOT_SUPPORTED_ERROR";
778 break; 783 break;
779 case DialogEvent::ABORT_CALLED: 784 case DialogEvent::ABORT_CALLED:
780 out << "ABORT_CALLED"; 785 out << "ABORT_CALLED";
781 break; 786 break;
787 case DialogEvent::EDITOR_VALIDATION_ERROR:
788 out << "EDITOR_VALIDATION_ERROR";
789 break;
782 } 790 }
783 return out; 791 return out;
784 } 792 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698