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

Unified Diff: chrome/browser/ui/views/payments/payment_request_browsertest_base.h

Issue 2775193004: [Payments] Have an observer for canMakePayment, for testing. (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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/payments/payment_request_browsertest_base.h
diff --git a/chrome/browser/ui/views/payments/payment_request_browsertest_base.h b/chrome/browser/ui/views/payments/payment_request_browsertest_base.h
index 18ff9650deefe5a729450b0a33bc2f3b9b2f184c..8f3c487ba55e9e8338f490d6b8607c5647f7cb47 100644
--- a/chrome/browser/ui/views/payments/payment_request_browsertest_base.h
+++ b/chrome/browser/ui/views/payments/payment_request_browsertest_base.h
@@ -18,6 +18,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "components/autofill/core/browser/field_types.h"
#include "components/autofill/core/browser/personal_data_manager_observer.h"
+#include "components/payments/content/payment_request.h"
#include "components/payments/content/payment_request.mojom.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "testing/gmock/include/gmock/gmock.h"
@@ -39,7 +40,6 @@ class Widget;
namespace payments {
enum class DialogViewID;
-class PaymentRequest;
ACTION_P(QuitMessageLoop, loop) {
loop->Quit();
@@ -58,6 +58,7 @@ class PersonalDataLoadedObserverMock
// the UI and interact with it.
class PaymentRequestBrowserTestBase
: public InProcessBrowserTest,
+ public PaymentRequest::ObserverForTest,
public PaymentRequestDialogView::ObserverForTest,
public views::WidgetObserver {
protected:
@@ -71,7 +72,10 @@ class PaymentRequestBrowserTestBase
void SetIncognitoForTesting();
- // PaymentRequestDialogView::ObserverForTest
+ // PaymentRequest::ObserverForTest:
+ void OnCanMakePaymentCalled() override;
+
+ // PaymentRequestDialogView::ObserverForTest:
void OnDialogOpened() override;
void OnOrderSummaryOpened() override;
void OnPaymentMethodOpened() override;
@@ -165,6 +169,7 @@ class PaymentRequestBrowserTestBase
BACK_NAVIGATION,
CONTACT_INFO_OPENED,
EDITOR_VIEW_UPDATED,
+ CAN_MAKE_PAYMENT_CALLED,
};
// DialogEventObserver is used to wait on specific events that may have

Powered by Google App Engine
This is Rietveld 408576698