| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | |
| 4 <script src="../../http/tests/inspector/console-test.js"></script> | |
| 5 <script> | |
| 6 | |
| 7 var obj = { "a" : 1, "b": 2 }; | |
| 8 | |
| 9 function test() | |
| 10 { | |
| 11 var remote; | |
| 12 InspectorTest.RuntimeAgent.evaluate("window.obj", step1); | |
| 13 | |
| 14 function step1(error, result) | |
| 15 { | |
| 16 InspectorTest.assertTrue(!error, "FAIL: " + error); | |
| 17 remote = result; | |
| 18 InspectorTest.evaluateInConsole("1+1", step2); | |
| 19 } | |
| 20 | |
| 21 function step2() | |
| 22 { | |
| 23 InspectorTest.evaluateInConsole("$_", step3); | |
| 24 } | |
| 25 | |
| 26 function step3() | |
| 27 { | |
| 28 InspectorTest.ConsoleAgent.setLastEvaluationResult(remote.objectId, didS
etResult); | |
| 29 } | |
| 30 | |
| 31 function didSetResult(error) | |
| 32 { | |
| 33 InspectorTest.assertTrue(!error, "FAIL: " + error); | |
| 34 InspectorTest.evaluateInConsole("$_", completeTest); | |
| 35 } | |
| 36 | |
| 37 function completeTest() | |
| 38 { | |
| 39 InspectorTest.dumpConsoleMessages(); | |
| 40 InspectorTest.completeTest(); | |
| 41 } | |
| 42 } | |
| 43 | |
| 44 </script> | |
| 45 </head> | |
| 46 | |
| 47 <body onload="runTest()"> | |
| 48 <p> | |
| 49 Tests setting console last evaluation result. | |
| 50 </p> | |
| 51 </body> | |
| 52 </html> | |
| OLD | NEW |