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..4ffab15fef48085771e7e73b56d885abcd1f04aa |
--- /dev/null |
+++ b/LayoutTests/inspector/console/console-log-linkify-stack-in-errors.html |
@@ -0,0 +1,60 @@ |
+<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(); |
+ |
+function stack1(errorConstructor, text) { |
+ function stack2() { |
+ console.log(new errorConstructor(text).stack); |
+ } |
+ stack2(); |
+} |
aandrey
2014/10/30 14:50:43
can you also add a test for DOMException?
sergeyv
2014/11/05 10:50:04
Done.
|
+ |
+ |
+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"); |
aandrey
2014/10/30 14:50:43
nit: would be easier to read if it was not on one
sergeyv
2014/11/05 10:50:04
Acknowledged.
|
+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)"); |
+ |
+stack1(ReferenceError, "valid stack"); |
+stack1(EvalError, "valid stack"); |
+stack1(SyntaxError, "valid stack"); |
+stack1(RangeError, "valid stack"); |
+stack1(TypeError, "valid stack"); |
+stack1(URIError, "valid stack"); |
+ |
+ |
aandrey
2014/10/30 14:50:43
extra line br
sergeyv
2014/11/05 10:50:04
Done.
|
+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"); |
+ |
+console.log("Error: Failed to execute 'removeChild' on 'Node': The node to be removed is not a child of this node.\nat Object.InjectedScript._evaluateOn (<anonymous>:732:137)\nat Object.InjectedScript._evaluateAndWrap (<anonymous>:665:34)\nat Object.InjectedScript.evaluate (<anonymous>:579:21)"); |
aandrey
2014/10/30 14:50:43
maybe replace with generating actual DOMException?
sergeyv
2014/11/05 10:50:04
Done.
|
+ |
+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> |