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

Unified Diff: LayoutTests/inspector/console/console-eval-exception-report.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-eval-exception-report-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/console/console-eval-exception-report.html
diff --git a/LayoutTests/inspector/console/console-eval-exception-report.html b/LayoutTests/inspector/console/console-eval-exception-report.html
new file mode 100644
index 0000000000000000000000000000000000000000..e51ab7b34fc4793b08b07805f7b2f7f23487fdfd
--- /dev/null
+++ b/LayoutTests/inspector/console/console-eval-exception-report.html
@@ -0,0 +1,53 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/console-test.js"></script>
+<script>
+function test()
+{
+ InspectorTest.evaluateInConsole("\
+ function foo()\n\
+ {\n\
+ throw {a:239};\n\
+ }\n\
+ function boo()\n\
+ {\n\
+ foo();\n\
+ }\n\
+ boo();", afterEvaluate);
+
+ function afterEvaluate()
+ {
+ InspectorTest.dumpConsoleMessages();
+
+ var viewMessages = WebInspector.ConsolePanel._view()._visibleViewMessages;
+ var uiMessage = viewMessages[viewMessages.length - 1];
+ var message = uiMessage.consoleMessage();
+ var stackTrace = message.stackTrace;
+
+ if (stackTrace.length < 3) {
+ InspectorTest.addResult('FAILED: bad stack size');
vsevik 2014/07/17 14:34:02 Stack size too small
kozyatinskiy1 2014/07/17 14:58:44 Done.
+ } else {
+ dumpStackFrame(stackTrace[0]);
+ dumpStackFrame(stackTrace[1]);
+ dumpStackFrame(stackTrace[2]);
+ }
+ InspectorTest.completeTest();
+ }
+
+ function dumpStackFrame(frame)
+ {
+ InspectorTest.addResult('frame function name:' + frame.functionName);
vsevik 2014/07/17 14:34:02 Let's put all of them on one line for better reada
kozyatinskiy1 2014/07/17 14:58:44 Done.
+ InspectorTest.addResult('frame line number:' + frame.lineNumber);
+ InspectorTest.addResult('frame url:' + frame.url);
+ }
+}
+
+</script>
+</head>
+<body onload="runTest()">
+<p>
+Tests that evaluating an expression with an exception in the console provide correct exception information.
+</p>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/inspector/console/console-eval-exception-report-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698