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

Unified Diff: LayoutTests/inspector/console/console-log-linkify-stack-in-errors.html

Issue 674513002: DevTools: linkify relative links in console.log(new Error().stack) (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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
Index: LayoutTests/inspector/console/console-log-linkify-stack-in-errors.html
diff --git a/LayoutTests/inspector/console/console-log-linkify-stack-in-errors.html b/LayoutTests/inspector/console/console-log-linkify-stack-in-errors.html
new file mode 100644
index 0000000000000000000000000000000000000000..dea168bb9b27fc715d3bed70d53176980d0acb54
--- /dev/null
+++ b/LayoutTests/inspector/console/console-log-linkify-stack-in-errors.html
@@ -0,0 +1,43 @@
+<html>
+<head>
+<script src="../../http/tests/inspector/inspector-test.js"></script>
+<script src="../../http/tests/inspector/console-test.js"></script>
+<script>
+
+function forStack()
+{
+ console.log(new Error("line\nbreak").stack);
+}
+
+forStack();
+
+console.log("Error message without stacks http://www.chromium.org/");
+
+console.log("Error valid stack #1\n at function_name(foo.js:30:1)\n at boo.js:40:70");
+console.log("Error valid stack #2\n at http://www.chromium.org/boo.js:40:70\n at foo(http://www.chromium.org/foo.js:10:50)");
+console.log("Error valid stack #3\n at http://www.chromium.org/foo.js:40");
+console.log("Error valid stack #4\n at function_name (some.js:30)");
+console.log("Error valid\n stack #5\n at function_name (some.js:30)");
+console.log("Error valid stack #6\n at function_name(foo.js:30:1)\n at boo.js:40:70\n at another_function(foo.js:50:500)");
+
+console.log("Error broken stack\n at function_name(rooo.js foo.js:30:1)\n at boo.js:40:70");
+console.log("Error broken stack #2\n at function_name(some.js:20:30");
+console.log("Error broken stack #3\n at function_name(some:20.js:30 bla");
+console.log("Error broken stack #4\n at function_name)some.js:20:30(");
+console.log("Error broken stack #5\n at function_name some.js:20:30)");
+console.log("Error broken stack #6\n at foo.js boo.js:40:70");
+
+
+function test()
+{
+ InspectorTest.dumpConsoleMessages(false, true);
+ InspectorTest.completeTest();
+}
+</script>
+</head>
+<body onload="runTest()">
+<p>
+Test that console.log(new Error().stack) would linkify all links even relative ones. <a href="http://crbug.com/424001">Bug 424001.</a>
+</p>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698