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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 console.log(denseArray); | 53 console.log(denseArray); |
54 | 54 |
55 console.log("Object with properties containing whitespaces"); | 55 console.log("Object with properties containing whitespaces"); |
56 var obj = { $foo5_: 0 }; | 56 var obj = { $foo5_: 0 }; |
57 obj[" a b "] = " a b "; | 57 obj[" a b "] = " a b "; |
58 obj["c d"] = "c d"; | 58 obj["c d"] = "c d"; |
59 obj[""] = ""; | 59 obj[""] = ""; |
60 obj[" "] = " "; | 60 obj[" "] = " "; |
61 obj["a\n\nb\nc"] = "a\n\nb\nc"; | 61 obj["a\n\nb\nc"] = "a\n\nb\nc"; |
62 console.log(obj); | 62 console.log(obj); |
| 63 |
| 64 console.log("Object with special numbers"); |
| 65 var obj = { nan: NaN, posInf: Infinity, negInf: -Infinity, negZero: -0 }; |
| 66 console.log(obj); |
63 } | 67 } |
64 | 68 |
65 function test() | 69 function test() |
66 { | 70 { |
67 InspectorTest.evaluateInPage("logToConsole()", callback); | 71 InspectorTest.evaluateInPage("logToConsole()", callback); |
68 | 72 |
69 function callback() | 73 function callback() |
70 { | 74 { |
71 InspectorTest.dumpConsoleMessages(false, true); | 75 InspectorTest.dumpConsoleMessages(false, true); |
72 InspectorTest.completeTest(); | 76 InspectorTest.completeTest(); |
73 } | 77 } |
74 } | 78 } |
75 </script> | 79 </script> |
76 </head> | 80 </head> |
77 | 81 |
78 <body onload="runTest()"> | 82 <body onload="runTest()"> |
79 <p> | 83 <p> |
80 Tests that console produces instant previews for arrays and objects. | 84 Tests that console produces instant previews for arrays and objects. |
81 </p> | 85 </p> |
82 | 86 |
83 </body> | 87 </body> |
84 </html> | 88 </html> |
OLD | NEW |