| 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 onload() | 7 function onload() |
| 8 { | 8 { |
| 9 console.dir(["test1", "test2"]); | 9 console.dir(["test1", "test2"]); |
| 10 console.dir(document.childNodes); | 10 console.dir(document.childNodes); |
| 11 console.dir(document.evaluate("//head", document, null, XPathResult.ANY_TYPE
, null)); | 11 console.dir(document.evaluate("//head", document, null, XPathResult.ANY_TYPE
, null)); |
| 12 | 12 |
| 13 // Object with properties containing whitespaces | 13 // Object with properties containing whitespaces |
| 14 var obj = { $foo5_: 0 }; | 14 var obj = { $foo5_: 0 }; |
| 15 obj[" a b "] = " a b "; | 15 obj[" a b "] = " a b "; |
| 16 obj["c d"] = "c d"; | 16 obj["c d"] = "c d"; |
| 17 obj[""] = ""; | 17 obj[""] = ""; |
| 18 obj[" "] = " "; | 18 obj[" "] = " "; |
| 19 obj["a\n\nb\nc"] = "a\n\nb\nc"; | 19 obj["a\n\nb\nc"] = "a\n\nb\nc"; |
| 20 obj["negZero"] = -0; | 20 obj["negZero"] = -0; |
| 21 console.dir(obj); | 21 console.dir(obj); |
| 22 | 22 |
| 23 // This should correctly display information about the function. |
| 24 console.dir(function() {}); |
| 25 |
| 23 runTest(); | 26 runTest(); |
| 24 } | 27 } |
| 25 | 28 |
| 26 function test() | 29 function test() |
| 27 { | 30 { |
| 28 InspectorTest.expandConsoleMessages(dumpConsoleMessages); | 31 InspectorTest.expandConsoleMessages(dumpConsoleMessages); |
| 29 | 32 |
| 30 function dumpConsoleMessages() | 33 function dumpConsoleMessages() |
| 31 { | 34 { |
| 32 InspectorTest.dumpConsoleMessages(false, false, InspectorTest.textConten
tWithLineBreaks); | 35 InspectorTest.dumpConsoleMessages(false, false, InspectorTest.textConten
tWithLineBreaks); |
| 33 InspectorTest.completeTest(); | 36 InspectorTest.completeTest(); |
| 34 } | 37 } |
| 35 } | 38 } |
| 36 | 39 |
| 37 </script> | 40 </script> |
| 38 </head> | 41 </head> |
| 39 | 42 |
| 40 <body onload="onload()"> | 43 <body onload="onload()"> |
| 41 <p> | 44 <p> |
| 42 Tests that console logging dumps proper messages. | 45 Tests that console logging dumps proper messages. |
| 43 </p> | 46 </p> |
| 44 | 47 |
| 45 </body> | 48 </body> |
| 46 </html> | 49 </html> |
| OLD | NEW |