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

Unified Diff: third_party/WebKit/Source/modules/payments/OnPaymentResponseTest.cpp

Issue 2477883002: [Web Payments] Mojom namespace blink -> payments (Closed)
Patch Set: Fix WebKit tests Created 4 years, 1 month 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: third_party/WebKit/Source/modules/payments/OnPaymentResponseTest.cpp
diff --git a/third_party/WebKit/Source/modules/payments/OnPaymentResponseTest.cpp b/third_party/WebKit/Source/modules/payments/OnPaymentResponseTest.cpp
index b64e160a5cc63b1ba5960d7f7c3a0b57f74ae61d..c4dfd58a6593882a0dc490f57a6c7072e0a9b44e 100644
--- a/third_party/WebKit/Source/modules/payments/OnPaymentResponseTest.cpp
+++ b/third_party/WebKit/Source/modules/payments/OnPaymentResponseTest.cpp
@@ -28,8 +28,9 @@ TEST(OnPaymentResponseTest, RejectMissingShippingOption) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
ASSERT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response = buildPaymentResponseForTest();
- response->shipping_address = mojom::blink::PaymentAddress::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ buildPaymentResponseForTest();
+ response->shipping_address = payments::mojom::blink::PaymentAddress::New();
response->shipping_address->country = "US";
response->shipping_address->language_code = "en";
response->shipping_address->script_code = "Latn";
@@ -37,8 +38,8 @@ TEST(OnPaymentResponseTest, RejectMissingShippingOption) {
request->show(scope.getScriptState())
.then(funcs.expectNoCall(), funcs.expectCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
}
// If the merchant requests shipping information, but the browser does not
@@ -53,14 +54,15 @@ TEST(OnPaymentResponseTest, RejectMissingAddress) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
ASSERT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response = buildPaymentResponseForTest();
+ payments::mojom::blink::PaymentResponsePtr response =
+ buildPaymentResponseForTest();
response->shipping_option = "standardShipping";
request->show(scope.getScriptState())
.then(funcs.expectNoCall(), funcs.expectCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
}
// If the merchant requests a payer name, but the browser does not provide it,
@@ -75,14 +77,14 @@ TEST(OnPaymentResponseTest, RejectMissingName) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
request->show(scope.getScriptState())
.then(funcs.expectNoCall(), funcs.expectCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
}
// If the merchant requests an email address, but the browser does not provide
@@ -97,14 +99,14 @@ TEST(OnPaymentResponseTest, RejectMissingEmail) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
request->show(scope.getScriptState())
.then(funcs.expectNoCall(), funcs.expectCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
}
// If the merchant requests a phone number, but the browser does not provide it,
@@ -119,14 +121,14 @@ TEST(OnPaymentResponseTest, RejectMissingPhone) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
request->show(scope.getScriptState())
.then(funcs.expectNoCall(), funcs.expectCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
}
// If the merchant requests shipping information, but the browser provides an
@@ -141,9 +143,10 @@ TEST(OnPaymentResponseTest, RejectEmptyShippingOption) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
ASSERT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response = buildPaymentResponseForTest();
+ payments::mojom::blink::PaymentResponsePtr response =
+ buildPaymentResponseForTest();
response->shipping_option = "";
- response->shipping_address = mojom::blink::PaymentAddress::New();
+ response->shipping_address = payments::mojom::blink::PaymentAddress::New();
response->shipping_address->country = "US";
response->shipping_address->language_code = "en";
response->shipping_address->script_code = "Latn";
@@ -151,8 +154,8 @@ TEST(OnPaymentResponseTest, RejectEmptyShippingOption) {
request->show(scope.getScriptState())
.then(funcs.expectNoCall(), funcs.expectCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
}
// If the merchant requests shipping information, but the browser provides an
@@ -167,15 +170,16 @@ TEST(OnPaymentResponseTest, RejectEmptyAddress) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
ASSERT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response = buildPaymentResponseForTest();
+ payments::mojom::blink::PaymentResponsePtr response =
+ buildPaymentResponseForTest();
response->shipping_option = "standardShipping";
- response->shipping_address = mojom::blink::PaymentAddress::New();
+ response->shipping_address = payments::mojom::blink::PaymentAddress::New();
request->show(scope.getScriptState())
.then(funcs.expectNoCall(), funcs.expectCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
}
// If the merchant requests a payer name, but the browser provides an empty
@@ -190,15 +194,15 @@ TEST(OnPaymentResponseTest, RejectEmptyName) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
response->payer_name = "";
request->show(scope.getScriptState())
.then(funcs.expectNoCall(), funcs.expectCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
}
// If the merchant requests an email, but the browser provides an empty string
@@ -213,15 +217,15 @@ TEST(OnPaymentResponseTest, RejectEmptyEmail) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
response->payer_email = "";
request->show(scope.getScriptState())
.then(funcs.expectNoCall(), funcs.expectCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
}
// If the merchant requests a phone number, but the browser provides an empty
@@ -236,15 +240,15 @@ TEST(OnPaymentResponseTest, RejectEmptyPhone) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
response->payer_phone = "";
request->show(scope.getScriptState())
.then(funcs.expectNoCall(), funcs.expectCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
}
// If the merchant does not request shipping information, but the browser
@@ -259,9 +263,9 @@ TEST(OnPaymentResponseTest, RejectNotRequestedAddress) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
ASSERT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
- response->shipping_address = mojom::blink::PaymentAddress::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
+ response->shipping_address = payments::mojom::blink::PaymentAddress::New();
response->shipping_address->country = "US";
response->shipping_address->language_code = "en";
response->shipping_address->script_code = "Latn";
@@ -269,8 +273,8 @@ TEST(OnPaymentResponseTest, RejectNotRequestedAddress) {
request->show(scope.getScriptState())
.then(funcs.expectNoCall(), funcs.expectCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
}
// If the merchant does not request shipping information, but the browser
@@ -285,15 +289,15 @@ TEST(OnPaymentResponseTest, RejectNotRequestedShippingOption) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
ASSERT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
response->shipping_option = "";
request->show(scope.getScriptState())
.then(funcs.expectNoCall(), funcs.expectCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
}
// If the merchant does not request a payer name, but the browser provides it,
@@ -308,15 +312,15 @@ TEST(OnPaymentResponseTest, RejectNotRequestedName) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
response->payer_name = "";
request->show(scope.getScriptState())
.then(funcs.expectNoCall(), funcs.expectCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
}
// If the merchant does not request an email, but the browser provides it,
@@ -331,15 +335,15 @@ TEST(OnPaymentResponseTest, RejectNotRequestedEmail) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
response->payer_email = "";
request->show(scope.getScriptState())
.then(funcs.expectNoCall(), funcs.expectCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
}
// If the merchant does not request a phone number, but the browser provides it,
@@ -354,15 +358,15 @@ TEST(OnPaymentResponseTest, RejectNotRequestedPhone) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
response->payer_phone = "";
request->show(scope.getScriptState())
.then(funcs.expectNoCall(), funcs.expectCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
}
// If the merchant requests shipping information, but the browser provides an
@@ -377,16 +381,17 @@ TEST(OnPaymentResponseTest, RejectInvalidAddress) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
ASSERT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response = buildPaymentResponseForTest();
+ payments::mojom::blink::PaymentResponsePtr response =
+ buildPaymentResponseForTest();
response->shipping_option = "standardShipping";
- response->shipping_address = mojom::blink::PaymentAddress::New();
+ response->shipping_address = payments::mojom::blink::PaymentAddress::New();
response->shipping_address->country = "Atlantis";
request->show(scope.getScriptState())
.then(funcs.expectNoCall(), funcs.expectCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
}
class PaymentResponseFunction : public ScriptFunction {
@@ -425,9 +430,10 @@ TEST(OnPaymentResponseTest, CanRequestShippingInformation) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
ASSERT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response = buildPaymentResponseForTest();
+ payments::mojom::blink::PaymentResponsePtr response =
+ buildPaymentResponseForTest();
response->shipping_option = "standardShipping";
- response->shipping_address = mojom::blink::PaymentAddress::New();
+ response->shipping_address = payments::mojom::blink::PaymentAddress::New();
response->shipping_address->country = "US";
response->shipping_address->language_code = "en";
response->shipping_address->script_code = "Latn";
@@ -436,8 +442,8 @@ TEST(OnPaymentResponseTest, CanRequestShippingInformation) {
.then(PaymentResponseFunction::create(scope.getScriptState(), &outValue),
funcs.expectNoCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
v8::MicrotasksScope::PerformCheckpoint(scope.isolate());
PaymentResponse* resp = V8PaymentResponse::toImplWithTypeCheck(
@@ -459,16 +465,16 @@ TEST(OnPaymentResponseTest, CanRequestName) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
response->payer_name = "Jon Doe";
ScriptValue outValue;
request->show(scope.getScriptState())
.then(PaymentResponseFunction::create(scope.getScriptState(), &outValue),
funcs.expectNoCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
v8::MicrotasksScope::PerformCheckpoint(scope.isolate());
PaymentResponse* pr = V8PaymentResponse::toImplWithTypeCheck(
@@ -488,16 +494,16 @@ TEST(OnPaymentResponseTest, CanRequestEmail) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
response->payer_email = "abc@gmail.com";
ScriptValue outValue;
request->show(scope.getScriptState())
.then(PaymentResponseFunction::create(scope.getScriptState(), &outValue),
funcs.expectNoCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
v8::MicrotasksScope::PerformCheckpoint(scope.isolate());
PaymentResponse* pr = V8PaymentResponse::toImplWithTypeCheck(
@@ -517,8 +523,8 @@ TEST(OnPaymentResponseTest, CanRequestPhone) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
response->payer_phone = "0123";
ScriptValue outValue;
@@ -526,8 +532,8 @@ TEST(OnPaymentResponseTest, CanRequestPhone) {
.then(PaymentResponseFunction::create(scope.getScriptState(), &outValue),
funcs.expectNoCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
v8::MicrotasksScope::PerformCheckpoint(scope.isolate());
PaymentResponse* pr = V8PaymentResponse::toImplWithTypeCheck(
scope.isolate(), outValue.v8Value());
@@ -552,8 +558,8 @@ TEST(OnPaymentResponseTest, ShippingInformationNotRequired) {
.then(PaymentResponseFunction::create(scope.getScriptState(), &outValue),
funcs.expectNoCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- buildPaymentResponseForTest());
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(buildPaymentResponseForTest());
v8::MicrotasksScope::PerformCheckpoint(scope.isolate());
PaymentResponse* resp = V8PaymentResponse::toImplWithTypeCheck(
@@ -574,16 +580,16 @@ TEST(OnPaymentResponseTest, PhoneNotRequred) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
response->payer_phone = String();
ScriptValue outValue;
request->show(scope.getScriptState())
.then(PaymentResponseFunction::create(scope.getScriptState(), &outValue),
funcs.expectNoCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
v8::MicrotasksScope::PerformCheckpoint(scope.isolate());
PaymentResponse* pr = V8PaymentResponse::toImplWithTypeCheck(
@@ -603,16 +609,16 @@ TEST(OnPaymentResponseTest, NameNotRequired) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
response->payer_name = String();
ScriptValue outValue;
request->show(scope.getScriptState())
.then(PaymentResponseFunction::create(scope.getScriptState(), &outValue),
funcs.expectNoCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
v8::MicrotasksScope::PerformCheckpoint(scope.isolate());
PaymentResponse* pr = V8PaymentResponse::toImplWithTypeCheck(
@@ -632,16 +638,16 @@ TEST(OnPaymentResponseTest, EmailNotRequired) {
scope.getScriptState(), buildPaymentMethodDataForTest(),
buildPaymentDetailsForTest(), options, scope.getExceptionState());
EXPECT_FALSE(scope.getExceptionState().hadException());
- mojom::blink::PaymentResponsePtr response =
- mojom::blink::PaymentResponse::New();
+ payments::mojom::blink::PaymentResponsePtr response =
+ payments::mojom::blink::PaymentResponse::New();
response->payer_email = String();
ScriptValue outValue;
request->show(scope.getScriptState())
.then(PaymentResponseFunction::create(scope.getScriptState(), &outValue),
funcs.expectNoCall());
- static_cast<mojom::blink::PaymentRequestClient*>(request)->OnPaymentResponse(
- std::move(response));
+ static_cast<payments::mojom::blink::PaymentRequestClient*>(request)
+ ->OnPaymentResponse(std::move(response));
v8::MicrotasksScope::PerformCheckpoint(scope.isolate());
PaymentResponse* pr = V8PaymentResponse::toImplWithTypeCheck(

Powered by Google App Engine
This is Rietveld 408576698