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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/console/console-eval-exception-report.html

Issue 1855363002: DevTools: [ux regression] There is no way to clear console history. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2661
Patch Set: Created 4 years, 8 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
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 <script> 5 <script>
6 function test() 6 function test()
7 { 7 {
8 InspectorTest.evaluateInConsole("\ 8 InspectorTest.evaluateInConsole("\
9 function foo()\n\ 9 function foo()\n\
10 {\n\ 10 {\n\
11 throw {a:239};\n\ 11 throw {a:239};\n\
12 }\n\ 12 }\n\
13 function boo()\n\ 13 function boo()\n\
14 {\n\ 14 {\n\
15 foo();\n\ 15 foo();\n\
16 }\n\ 16 }\n\
17 boo();", afterEvaluate); 17 boo();", afterEvaluate);
18 18
19 function afterEvaluate() 19 function afterEvaluate()
20 { 20 {
21 InspectorTest.dumpConsoleMessages(); 21 InspectorTest.dumpConsoleMessages();
22 22
23 var viewMessages = WebInspector.ConsolePanel._view()._visibleViewMessage s; 23 var viewMessages = WebInspector.ConsoleView.instance()._visibleViewMessa ges;
24 var uiMessage = viewMessages[viewMessages.length - 1]; 24 var uiMessage = viewMessages[viewMessages.length - 1];
25 var message = uiMessage.consoleMessage(); 25 var message = uiMessage.consoleMessage();
26 var stackTrace = message.stackTrace; 26 var stackTrace = message.stackTrace;
27 27
28 if (stackTrace.callFrames.length < 3) { 28 if (stackTrace.callFrames.length < 3) {
29 InspectorTest.addResult('FAILED: Stack size too small'); 29 InspectorTest.addResult('FAILED: Stack size too small');
30 } else { 30 } else {
31 for (var i = 0; i < 3; ++i) { 31 for (var i = 0; i < 3; ++i) {
32 var frame = stackTrace.callFrames[i]; 32 var frame = stackTrace.callFrames[i];
33 InspectorTest.addResult('call frame:' + frame.functionName + ' a t ' + frame.url + ':' + frame.lineNumber); 33 InspectorTest.addResult('call frame:' + frame.functionName + ' a t ' + frame.url + ':' + frame.lineNumber);
34 } 34 }
35 } 35 }
36 InspectorTest.completeTest(); 36 InspectorTest.completeTest();
37 } 37 }
38 } 38 }
39 39
40 </script> 40 </script>
41 </head> 41 </head>
42 <body onload="runTest()"> 42 <body onload="runTest()">
43 <p> 43 <p>
44 Tests that evaluating an expression with an exception in the console provide cor rect exception information. 44 Tests that evaluating an expression with an exception in the console provide cor rect exception information.
45 </p> 45 </p>
46 </body> 46 </body>
47 </html> 47 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698