| OLD | NEW |
| (Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto
r-protocol-test.js"></script> |
| 4 <script> |
| 5 |
| 6 function test() |
| 7 { |
| 8 InspectorTest.sendCommand("Console.enable", {}); |
| 9 |
| 10 InspectorTest.sendCommand("Runtime.evaluate", { expression: "let a = 42;" },
step2); |
| 11 |
| 12 function step2(response) |
| 13 { |
| 14 failIfError(response); |
| 15 InspectorTest.log("first \"let a = 1;\" result: wasThrown = " + response
.result.wasThrown); |
| 16 |
| 17 InspectorTest.sendCommand("Runtime.evaluate", { expression: "let a = 239
;" }, step3); |
| 18 } |
| 19 |
| 20 function step3(response) |
| 21 { |
| 22 failIfError(response); |
| 23 |
| 24 InspectorTest.log("second \"let a = 1;\" result: wasThrown = " + respons
e.result.wasThrown); |
| 25 if (response.result.wasThrown) |
| 26 InspectorTest.log("exception message: " + response.result.exceptionD
etails.text); |
| 27 |
| 28 InspectorTest.sendCommand("Runtime.evaluate", { expression: "a" }, step4
); |
| 29 } |
| 30 |
| 31 function step4(response) |
| 32 { |
| 33 failIfError(response); |
| 34 |
| 35 InspectorTest.log(JSON.stringify(response.result)); |
| 36 |
| 37 InspectorTest.completeTest(); |
| 38 } |
| 39 |
| 40 function failIfError(response) |
| 41 { |
| 42 if (response && response.error) { |
| 43 InspectorTest.log("FAIL: " + JSON.stringify(response.error)); |
| 44 } |
| 45 } |
| 46 } |
| 47 |
| 48 </script> |
| 49 </head> |
| 50 <body onload="runTest()"> |
| 51 </body> |
| 52 </html> |
| OLD | NEW |