Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / inspector-enabled / console-exception-while-no-inspector.html
blob5b12d54855fad4ab77c8e334cceb19b4c1860097
1 <html>
2 <head>
3 <script src="../inspector/inspector-test.js"></script>
4 <script>
5 function throwException() {
6 throw 2013;
9 function baz()
11 throwException();
14 function bar(callback)
16 callback()
19 function foo()
21 bar(baz.bind(this));
25 function handleLoaded()
27 if (window.testRunner)
28 testRunner.waitUntilDone();
29 setTimeout(showInspectorAndRunTest, 0);
30 foo();
34 function showInspectorAndRunTest()
36 if (window.testRunner)
37 testRunner.showWebInspector();
38 runTest();
41 function test()
43 if (InspectorTest.consoleModel.messages().length !== 1)
44 InspectorTest.addResult("FAIL: found too many console messages: " + InspectorTest.consoleModel.messages().length);
46 var message = InspectorTest.consoleModel.messages()[0];
47 var stack = message.stackTrace;
48 if (stack)
49 InspectorTest.addResult("FAIL: found message with stack trace");
50 else
51 InspectorTest.addResult("SUCCESS: message doesn't have stack trace");
53 InspectorTest.addResult("TEST COMPLETE.");
54 InspectorTest.completeTest();
57 </script>
59 </head>
60 <body onload="handleLoaded()">
61 <p>
62 Tests that console will NOT contain stack trace for exception thrown when inspector front-end was closed. <a href="https://bugs.webkit.org/show_bug.cgi?id=109427">Bug 109427.</a>
63 </p>
64 </body>
65 </html>