| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> | 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> |
| 4 <script> | 4 <script> |
| 5 | 5 |
| 6 function createPromiseAndScheduleResolve() | |
| 7 { | |
| 8 var resolveCallback; | |
| 9 var promise = new Promise((resolve) => resolveCallback = resolve); | |
| 10 setTimeout(resolveCallback.bind(null, { a : 239 }), 0); | |
| 11 return promise; | |
| 12 } | |
| 13 | |
| 14 function test() | 6 function test() |
| 15 { | 7 { |
| 16 InspectorTest.runTestSuite([ | 8 InspectorTest.runTestSuite([ |
| 17 function testArguments(next) | 9 function testArguments(next) |
| 18 { | 10 { |
| 19 callFunctionOn( | 11 callFunctionOn( |
| 20 "({a : 1})", | 12 "({a : 1})", |
| 21 "function(arg1, arg2, arg3, arg4) { return \"\" + arg1 + \"|\" +
arg2 + \"|\" + arg3 + \"|\" + arg4; }", | 13 "function(arg1, arg2, arg3, arg4) { return \"\" + arg1 + \"|\" +
arg2 + \"|\" + arg3 + \"|\" + arg4; }", |
| 22 [ "undefined", "NaN", "({a:2})", "window"], | 14 [ "undefined", "NaN", "({a:2})", "window"], |
| 23 /* returnByValue */ true, | 15 /* returnByValue */ true, |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 InspectorTest.logObject(result); | 131 InspectorTest.logObject(result); |
| 140 } | 132 } |
| 141 } | 133 } |
| 142 </script> | 134 </script> |
| 143 </head> | 135 </head> |
| 144 <body onLoad="runTest();"> | 136 <body onLoad="runTest();"> |
| 145 Tests that Runtime.callFunctionOn works with awaitPromise flag. | 137 Tests that Runtime.callFunctionOn works with awaitPromise flag. |
| 146 </body> | 138 </body> |
| 147 </html> | 139 </html> |
| 148 | 140 |
| OLD | NEW |