| 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 |
| 5 <script> | 6 <script> |
| 6 | |
| 7 function b() | 7 function b() |
| 8 { | 8 { |
| 9 console.assert(false, 1); | 9 console.assert(false, 1); |
| 10 console.assert(false, "a", "b"); | 10 console.assert(false, "a", "b"); |
| 11 } | 11 } |
| 12 | 12 |
| 13 function a() | 13 function a() |
| 14 { | 14 { |
| 15 b(); | 15 b(); |
| 16 } | 16 } |
| 17 //# sourceURL=console-assert.html |
| 18 </script> |
| 17 | 19 |
| 20 <script> |
| 18 function test() | 21 function test() |
| 19 { | 22 { |
| 20 var callCount = 0; | 23 var callCount = 0; |
| 21 function callback() | 24 function callback() |
| 22 { | 25 { |
| 23 if (++callCount === 2) | 26 if (++callCount === 2) |
| 24 InspectorTest.expandConsoleMessages(onExpandedMessages); | 27 InspectorTest.expandConsoleMessages(onExpandedMessages); |
| 25 } | 28 } |
| 26 | 29 |
| 27 function onExpandedMessages() | 30 function onExpandedMessages() |
| 28 { | 31 { |
| 29 InspectorTest.dumpConsoleMessages(); | 32 InspectorTest.dumpConsoleMessages(); |
| 30 InspectorTest.completeTest(); | 33 InspectorTest.completeTest(); |
| 31 } | 34 } |
| 32 | 35 |
| 33 InspectorTest.evaluateInPage("setTimeout(a, 0)"); | 36 InspectorTest.evaluateInPage("setTimeout(a, 0)"); |
| 34 InspectorTest.addConsoleSniffer(callback, true); | 37 InspectorTest.addConsoleSniffer(callback, true); |
| 35 } | 38 } |
| 36 | 39 |
| 37 </script> | 40 </script> |
| 38 </head> | 41 </head> |
| 39 | 42 |
| 40 <body onload="runTest()"> | 43 <body onload="runTest()"> |
| 41 <p> | 44 <p> |
| 42 Tests that console.assert() will dump a message and stack trace with source URLs
and line numbers. | 45 Tests that console.assert() will dump a message and stack trace with source URLs
and line numbers. |
| 43 </p> | 46 </p> |
| 44 | 47 |
| 45 </body> | 48 </body> |
| 46 </html> | 49 </html> |
| OLD | NEW |