| <html> |
| <head> |
| <script src="../../http/tests/inspector/inspector-test.js"></script> |
| <script src="../../http/tests/inspector/console-test.js"></script> |
| <script> |
| |
| function log() { |
| // Fill console. |
| console.log("one"); |
| console.log("two"); |
| console.log("three"); |
| |
| // Different types and different columns. |
| console.error("error"); console.log("log"); |
| console.info("info"); console.warn("warn"); |
| console.assert(false, "assert"); |
| } |
| |
| function test() |
| { |
| InspectorTest.addSniffer(WebInspector.ConsoleDispatcher.prototype, "messageAdded", messageAdded, true); |
| |
| function messageAdded(payload) |
| { |
| var url = payload.url; |
| var lastSlashIndex = url.lastIndexOf("/"); |
| url = url.substring(lastSlashIndex + 1); |
| InspectorTest.addResult("Message at location: " + url + ":" + payload.line + ":" + payload.column); |
| if (payload.line === 16) |
| InspectorTest.completeTest(); |
| } |
| |
| InspectorTest.evaluateInPage("log()"); |
| } |
| |
| </script> |
| </head> |
| |
| <body onload="runTest()"> |
| <p> |
| Tests that url, line, and column properties are defined for console functions. |
| </p> |
| |
| </body> |
| </html> |