Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(414)

Side by Side Diff: LayoutTests/inspector/console/console-eval-throw.html

Issue 369333002: DevTools: Added error message when the command is invoked from the console with exception (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@add-evaluate-exception-details
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
13 WebInspector.consoleModel.addEventListener(WebInspector.ConsoleModel.Eve nts.ConsoleCleared, afterCleared);
14
15 function afterCleared() {
16 WebInspector.consoleModel.removeEventListener(WebInspector.ConsoleMo del.Events.ConsoleCleared, afterCleared);
17 next();
18 }
19 }
20
21 InspectorTest.runTestSuite([
22 function testThrowUndefined(next)
23 {
24 InspectorTest.evaluateInConsole('throw undefined', dumpMessages.bind (null, next));
25 },
26
27 function testThrowNumber(next)
28 {
29 InspectorTest.evaluateInConsole('throw 1', dumpMessages.bind(null, n ext));
30 },
31
32 function testThrowString(next)
33 {
34 InspectorTest.evaluateInConsole('throw \'asdf\'', dumpMessages.bind( null, next));
35 },
36
37 function testThrowObject(next)
38 {
39 InspectorTest.evaluateInConsole('throw {a:42}', dumpMessages.bind(nu ll, next));
40 },
41
42 function testThrowError(next)
43 {
44 InspectorTest.evaluateInConsole('throw new Error(\'asdf\')', dumpMes sages.bind(null, next));
45 }
46 ]);
47 }
48 </script>
49 </head>
50 <body onload="runTest()">
51 <p>
52 Tests that evaluating 'throw undefined|1|string|object|Error' in the console won 't crash the browser and correctly reported.
53 <a href="https://bugs.webkit.org/show_bug.cgi?id=59611">Bug 59611.</a>
54 </p>
55 </body>
56 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698