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

Unified Diff: third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp

Issue 2350813005: bindings: Support sequence in callback function arguments (Closed)
Patch Set: Created 4 years, 3 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: third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp
diff --git a/third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp b/third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp
index 546692b35fc4abfd181efb322954e10723ddcb19..5f8e0204fd27bfc66c23e6233f08221bf3a20bc9 100644
--- a/third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp
+++ b/third_party/WebKit/Source/core/testing/CallbackFunctionTest.cpp
@@ -7,6 +7,7 @@
#include "bindings/core/v8/ScriptState.h"
#include "bindings/core/v8/V8Binding.h"
#include "bindings/core/v8/V8TestCallback.h"
+#include "bindings/core/v8/V8TestSequenceCallback.h"
namespace blink {
@@ -25,4 +26,13 @@ String CallbackFunctionTest::testCallback(ScriptState* scriptState, V8TestCallba
return String("Error!");
}
+Vector<String> CallbackFunctionTest::testSequenceCallback(ScriptState* scriptState, V8TestSequenceCallback* callback, const Vector<int>& numbers, ExceptionState& exceptionState)
+{
+ Vector<String> returnValue;
+ if (callback->call(scriptState, nullptr, numbers, returnValue)) {
+ return returnValue;
+ }
+ return Vector<String>();
+}
+
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698