| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> | 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../http/tests/inspector/console-test.js"></script> | 4 <script src="../../http/tests/inspector/console-test.js"></script> |
| 5 <script> | 5 <script> |
| 6 | 6 |
| 7 function logToConsole() | 7 function logToConsole() |
| 8 { | 8 { |
| 9 console.log("Mutating object in a loop"); | 9 console.log("Mutating object in a loop"); |
| 10 var object = { a: 0, b: 0 }; | 10 var object = { a: 0, b: 0 }; |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 console.log(obj); | 69 console.log(obj); |
| 70 | 70 |
| 71 console.log("Object with exactly 5 properties: expected to be lossless"); | 71 console.log("Object with exactly 5 properties: expected to be lossless"); |
| 72 console.log({a:1, b:2, c:3, d:4, e:5}); | 72 console.log({a:1, b:2, c:3, d:4, e:5}); |
| 73 | 73 |
| 74 console.log({null:null, undef:undefined, regexp: /^[regexp]$/g, bool: false}
); | 74 console.log({null:null, undef:undefined, regexp: /^[regexp]$/g, bool: false}
); |
| 75 } | 75 } |
| 76 | 76 |
| 77 function test() | 77 function test() |
| 78 { | 78 { |
| 79 InspectorTest.evaluateInPage("logToConsole()", callback); | 79 InspectorTest.evaluateInPage("logToConsole()", step2); |
| 80 | 80 |
| 81 function callback() | 81 function step2() |
| 82 { |
| 83 InspectorTest.dumpConsoleMessages(false, true); |
| 84 InspectorTest.addResult("Expanded all messages"); |
| 85 InspectorTest.expandConsoleMessages(step3); |
| 86 } |
| 87 |
| 88 function step3() |
| 82 { | 89 { |
| 83 InspectorTest.dumpConsoleMessages(false, true); | 90 InspectorTest.dumpConsoleMessages(false, true); |
| 84 InspectorTest.completeTest(); | 91 InspectorTest.completeTest(); |
| 85 } | 92 } |
| 86 } | 93 } |
| 87 </script> | 94 </script> |
| 88 </head> | 95 </head> |
| 89 | 96 |
| 90 <body onload="runTest()"> | 97 <body onload="runTest()"> |
| 91 <p> | 98 <p> |
| 92 Tests that console produces instant previews for arrays and objects. | 99 Tests that console produces instant previews for arrays and objects. |
| 93 </p> | 100 </p> |
| 94 | 101 |
| 95 </body> | 102 </body> |
| 96 </html> | 103 </html> |
| OLD | NEW |