OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 InspectorTest.log("Tests that Runtime.callFunctionOn works with awaitPromise fla
g."); | 5 let {session, contextGroup, Protocol} = InspectorTest.start("Tests that Runtime.
callFunctionOn works with awaitPromise flag."); |
6 | 6 |
7 InspectorTest.runTestSuite([ | 7 InspectorTest.runTestSuite([ |
8 function testArguments(next) | 8 function testArguments(next) |
9 { | 9 { |
10 callFunctionOn( | 10 callFunctionOn( |
11 "({a : 1})", | 11 "({a : 1})", |
12 "function(arg1, arg2, arg3, arg4) { return \"\" + arg1 + \"|\" + arg2 + \"
|\" + arg3 + \"|\" + arg4; }", | 12 "function(arg1, arg2, arg3, arg4) { return \"\" + arg1 + \"|\" + arg2 + \"
|\" + arg3 + \"|\" + arg4; }", |
13 [ "undefined", "NaN", "({a:2})", "this"], | 13 [ "undefined", "NaN", "({a:2})", "this"], |
14 /* returnByValue */ true, | 14 /* returnByValue */ true, |
15 /* generatePreview */ false, | 15 /* generatePreview */ false, |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 callArguments.push({ unserializableValue: result.unserializableValue }); | 120 callArguments.push({ unserializableValue: result.unserializableValue }); |
121 } else if (result.type === "undefined") { | 121 } else if (result.type === "undefined") { |
122 callArguments.push({}); | 122 callArguments.push({}); |
123 } else { | 123 } else { |
124 InspectorTest.log("Unexpected argument object:"); | 124 InspectorTest.log("Unexpected argument object:"); |
125 InspectorTest.logMessage(result); | 125 InspectorTest.logMessage(result); |
126 InspectorTest.completeTest(); | 126 InspectorTest.completeTest(); |
127 } | 127 } |
128 } | 128 } |
129 } | 129 } |
OLD | NEW |