Web Inspector: store last evaluation result in $_
[WebKit-https.git] / LayoutTests / inspector / console / console-last-result.html
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 function test()
8 {
9     InspectorTest.evaluateInConsole("1+1", step1);
10
11     function step1()
12     {
13         InspectorTest.evaluateInConsole("$_", callback);
14     }
15
16     function callback()
17     {
18         InspectorTest.dumpConsoleMessages();
19         InspectorTest.completeTest();
20     }
21 }
22
23 </script>
24 </head>
25
26 <body onload="runTest()">
27 <p>
28     Tests that console exposes last evaluation result as $_.
29 </p>
30
31 </body>
32 </html>