Index: components/test_runner/test_runner_for_specific_view.cc |
diff --git a/components/test_runner/test_runner_for_specific_view.cc b/components/test_runner/test_runner_for_specific_view.cc |
index 026a715908e58ab286b7085a9c0b31f2d40e0864..f29cb45a95efb2031fd93adf77df3ebfa1200812 100644 |
--- a/components/test_runner/test_runner_for_specific_view.cc |
+++ b/components/test_runner/test_runner_for_specific_view.cc |
@@ -366,6 +366,40 @@ void TestRunnerForSpecificView::SendBluetoothManualChooserEvent( |
delegate()->SendBluetoothManualChooserEvent(event, argument); |
} |
+void TestRunnerForSpecificView::GetAllPaymentAppIDs( |
+ v8::Local<v8::Function> callback) { |
+ delegate()->GetAllPaymentAppIDs( |
+ base::Bind(&TestRunnerForSpecificView::GetAllPaymentAppIDsCallback, |
+ weak_factory_.GetWeakPtr(), |
+ base::Passed(v8::UniquePersistent<v8::Function>( |
+ blink::mainThreadIsolate(), callback)))); |
+} |
+ |
+void TestRunnerForSpecificView::GetAllPaymentAppIDsCallback( |
+ v8::UniquePersistent<v8::Function> callback, |
+ const std::vector<int64_t>& ids) { |
+ // Build the V8 context. |
+ v8::Isolate* isolate = blink::mainThreadIsolate(); |
+ v8::HandleScope handle_scope(isolate); |
+ v8::Local<v8::Context> context = |
+ web_view()->mainFrame()->mainWorldScriptContext(); |
+ if (context.IsEmpty()) |
+ return; |
+ v8::Context::Scope context_scope(context); |
+ |
+ // Convert the argument. |
+ v8::Local<v8::Value> arg; |
+ if (!gin::TryConvertToV8(isolate, ids, &arg)) |
+ return; |
+ |
+ // Call the callback. |
+ PostV8CallbackWithArgs(std::move(callback), 1, &arg); |
+} |
+ |
+void TestRunnerForSpecificView::InvokePaymentApp(int64_t registration_id) { |
+ delegate()->InvokePaymentApp(registration_id); |
+} |
+ |
void TestRunnerForSpecificView::SetBackingScaleFactor( |
double value, |
v8::Local<v8::Function> callback) { |