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

Unified Diff: third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html

Issue 2350813005: bindings: Support sequence in callback function arguments (Closed)
Patch Set: rebase 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html
diff --git a/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html b/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html
index e9d93711fda441b6e539cac54b53081dd0fcd0d2..6626c4b0f9a4f9f74e6c29001808c980b9ed1740 100644
--- a/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html
+++ b/third_party/WebKit/LayoutTests/fast/dom/idl-callback-function-unittest.html
@@ -31,4 +31,15 @@ test(function() {
};
callbackFunctionTest.testReceiverObjectCallback(callback);
}, 'Callback function which takes receiver object');
+
+test(function() {
+ var squareStringNumbers = function(numbers) {
+ return numbers.map(n => (n * n).toString());
+ };
+ var results = callbackFunctionTest.testSequenceCallback(squareStringNumbers, [1, 2, 3]);
+ assert_equals(3, results.length);
+ assert_equals('1', results[0]);
+ assert_equals('4', results[1]);
+ assert_equals('9', results[2]);
+}, 'Callback function which takes a number sequence');
</script>
« no previous file with comments | « no previous file | third_party/WebKit/Source/bindings/core/v8/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698