Chromium Code Reviews| 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 WebInspector.consoleModel.requestClearMessages(); | |
| 12 InspectorTest.runAfterPendingDispatches(next); | |
|
vsevik
2014/07/18 16:26:19
Let's listen for WebInspector.ConsoleModel.Events.
kozyatinskiy1
2014/07/18 16:43:16
Done.
| |
| 13 } | |
| 14 | |
| 15 InspectorTest.runTestSuite([ | |
| 16 function testThrowUndefined(next) | |
| 17 { | |
| 18 InspectorTest.evaluateInConsole('throw undefined', dumpMessages.bind (null, next)); | |
| 19 }, | |
| 20 | |
| 21 function testThrowNumber(next) | |
| 22 { | |
| 23 InspectorTest.evaluateInConsole('throw 1', dumpMessages.bind(null, n ext)); | |
| 24 }, | |
| 25 | |
| 26 function testThrowString(next) | |
| 27 { | |
| 28 InspectorTest.evaluateInConsole('throw \'asdf\'', dumpMessages.bind( null, next)); | |
| 29 }, | |
| 30 | |
| 31 function testThrowObject(next) | |
| 32 { | |
| 33 InspectorTest.evaluateInConsole('throw {a:42}', dumpMessages.bind(nu ll, next)); | |
| 34 }, | |
| 35 | |
| 36 function testThrowError(next) | |
| 37 { | |
| 38 InspectorTest.evaluateInConsole('throw new Error(\'asdf\')', dumpMes sages.bind(null, next)); | |
| 39 } | |
| 40 ]); | |
| 41 } | |
| 42 </script> | |
| 43 </head> | |
| 44 <body onload="runTest()"> | |
| 45 <p> | |
| 46 Tests that evaluating 'throw undefined|1|string|object|Error' in the console won 't crash the browser and correctly reported. | |
| 47 <a href="https://bugs.webkit.org/show_bug.cgi?id=59611">Bug 59611.</a> | |
| 48 </p> | |
| 49 </body> | |
| 50 </html> | |
| OLD | NEW |