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 globals = []; |
| 8 |
| 9 function log(current) |
| 10 { |
| 11 console.log(globals[current]); |
| 12 console.log([globals[current]]); |
| 13 } |
| 14 |
| 15 function onload() |
| 16 { |
| 17 var smb1 = Symbol(); |
| 18 var smb2 = Symbol("a"); |
| 19 |
| 20 globals = [ |
| 21 smb1, smb2 |
| 22 ]; |
| 23 |
| 24 runTest(); |
| 25 } |
| 26 |
| 27 function test() |
| 28 { |
| 29 InspectorTest.evaluateInPage("globals.length", loopOverGlobals.bind(this, 0)
); |
| 30 |
| 31 function loopOverGlobals(current, total) |
| 32 { |
| 33 function advance() |
| 34 { |
| 35 var next = current + 1; |
| 36 if (next == total.description) { |
| 37 InspectorTest.expandConsoleMessages(); |
| 38 InspectorTest.runAfterPendingDispatches(finish); |
| 39 } else { |
| 40 loopOverGlobals(next, total); |
| 41 } |
| 42 } |
| 43 |
| 44 function finish() |
| 45 { |
| 46 InspectorTest.dumpConsoleMessages(); |
| 47 InspectorTest.completeTest(); |
| 48 } |
| 49 |
| 50 InspectorTest.evaluateInPage("log(" + current + ")"); |
| 51 InspectorTest.runAfterPendingDispatches(evalInConsole); |
| 52 function evalInConsole() |
| 53 { |
| 54 InspectorTest.evaluateInConsole("globals[" + current + "]"); |
| 55 InspectorTest.runAfterPendingDispatches(advance); |
| 56 } |
| 57 } |
| 58 } |
| 59 </script> |
| 60 </head> |
| 61 |
| 62 <body onload="onload()"> |
| 63 <p> |
| 64 Tests that console properly displays information about ES6 features. |
| 65 </p> |
| 66 </body> |
| 67 </html> |
OLD | NEW |