OLD | NEW |
(Empty) | |
| 1 <html> |
| 2 <head> |
| 3 <script src="../../http/tests/inspector/inspector-test.js"></script> |
| 4 <script src="../../http/tests/inspector/console-test.js"></script> |
| 5 <script> |
| 6 function test() |
| 7 { |
| 8 function dumpMessages(next, message) |
| 9 { |
| 10 InspectorTest.dumpConsoleMessages(); |
| 11 next(); |
| 12 } |
| 13 |
| 14 InspectorTest.runTestSuite([ |
| 15 function testThrowUndefined(next) |
| 16 { |
| 17 InspectorTest.evaluateInConsole('throw undefined', dumpMessages.bind
(null, next)); |
| 18 }, |
| 19 |
| 20 function testThrowNumber(next) |
| 21 { |
| 22 InspectorTest.evaluateInConsole('throw 1', dumpMessages.bind(null, n
ext)); |
| 23 }, |
| 24 |
| 25 function testThrowString(next) |
| 26 { |
| 27 InspectorTest.evaluateInConsole('throw \'asdf\'', dumpMessages.bind(
null, next)); |
| 28 }, |
| 29 |
| 30 function testThrowObject(next) |
| 31 { |
| 32 InspectorTest.evaluateInConsole('throw {a:42}', dumpMessages.bind(nu
ll, next)); |
| 33 }, |
| 34 |
| 35 function testThrowError(next) |
| 36 { |
| 37 InspectorTest.evaluateInConsole('throw new Error(\'asdf\')', dumpMes
sages.bind(null, next)); |
| 38 } |
| 39 ]); |
| 40 } |
| 41 </script> |
| 42 </head> |
| 43 <body onload="runTest()"> |
| 44 <p> |
| 45 Tests that evaluating 'throw undefined|1|string|object|Error' in the console won
't crash the browser and correctly reported. |
| 46 <a href="https://bugs.webkit.org/show_bug.cgi?id=59611">Bug 59611.</a> |
| 47 </p> |
| 48 </body> |
| 49 </html> |
OLD | NEW |