| 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.table(); | 9 console.table(); |
| 10 console.table(null); | 10 console.table(null); |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 console.table([[1,2,3], [4,5,6]], "Foo"); | 34 console.table([[1,2,3], [4,5,6]], "Foo"); |
| 35 | 35 |
| 36 console.log("Array of strings as columns"); | 36 console.log("Array of strings as columns"); |
| 37 console.table([{a:1, b:2, c:3}, {a:"foo", b:"bar"}], ["a", "b"]); | 37 console.table([{a:1, b:2, c:3}, {a:"foo", b:"bar"}], ["a", "b"]); |
| 38 | 38 |
| 39 console.log("Good and bad column names"); | 39 console.log("Good and bad column names"); |
| 40 console.table([{a:1, b:2, c:3}, {a:"foo"}], ["a", "b", "d"]); | 40 console.table([{a:1, b:2, c:3}, {a:"foo"}], ["a", "b", "d"]); |
| 41 | 41 |
| 42 console.log("Missing column name"); | 42 console.log("Missing column name"); |
| 43 console.table([{a:1, b:2, c:3}, {a:"foo"}], ["d"]); | 43 console.table([{a:1, b:2, c:3}, {a:"foo"}], ["d"]); |
| 44 |
| 45 console.log("Shallow array"); |
| 46 console.table([1, "foo", null]); |
| 47 |
| 48 console.log("Shallow array with 'Value' column"); |
| 49 console.table([1, {Value: 2}]); |
| 50 |
| 51 console.log("Deep and shallow array"); |
| 52 console.table([1, "foo", [2]]); |
| 44 } | 53 } |
| 45 | 54 |
| 46 function onload() | 55 function onload() |
| 47 { | 56 { |
| 48 logToConsole(); | 57 logToConsole(); |
| 49 runTest(); | 58 runTest(); |
| 50 } | 59 } |
| 51 | 60 |
| 52 function test() | 61 function test() |
| 53 { | 62 { |
| 54 InspectorTest.evaluateInPage("logToConsole()", callback); | 63 InspectorTest.evaluateInPage("logToConsole()", callback); |
| 55 | 64 |
| 56 function callback() | 65 function callback() |
| 57 { | 66 { |
| 58 InspectorTest.dumpConsoleMessages(); | 67 InspectorTest.dumpConsoleMessages(); |
| 59 InspectorTest.completeTest(); | 68 InspectorTest.completeTest(); |
| 60 } | 69 } |
| 61 } | 70 } |
| 62 </script> | 71 </script> |
| 63 </head> | 72 </head> |
| 64 | 73 |
| 65 <body onload="onload()"> | 74 <body onload="onload()"> |
| 66 <p> | 75 <p> |
| 67 Tests console.table. | 76 Tests console.table. |
| 68 </p> | 77 </p> |
| 69 </body> | 78 </body> |
| 70 </html> | 79 </html> |
| OLD | NEW |