| 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 f8ff7e029adb70b8f7eb085f008685e54ccfdf7b..5833a52b0e29f4303cdba7b5c7596ad26e0e5f81 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
|
| @@ -2,8 +2,9 @@
|
| <script src="../../resources/testharness.js"></script>
|
| <script src="../../resources/testharnessreport.js"></script>
|
| <script>
|
| +var callbackFunctionTest = internals.callbackFunctionTest();
|
| +
|
| test(function() {
|
| - var callbackFunctionTest = internals.callbackFunctionTest();
|
| var callback1 = function(msg1, msg2) {
|
| return msg1 + ', ' + msg2;
|
| };
|
| @@ -14,4 +15,15 @@ test(function() {
|
| };
|
| assert_equals(callbackFunctionTest.testCallback(callback2, 'hello', 'world'), 'SUCCESS: hellohello worldworld');
|
| }, 'Callback function which takes two strings');
|
| +
|
| +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>
|
|
|