Upstream version 6.35.121.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / inspector / console / console-uncaught-exception.html
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/console-test.js"></script>
5 <script>
6
7 function test()
8 {
9     InspectorTest.addConsoleSniffer(addMessage, true);
10     InspectorTest.evaluateInPage("loadIframe()");
11     function addMessage(message)
12     {
13         var uiMessage = InspectorTest.toViewMessage(message);
14         if (uiMessage.toString().indexOf("setTimeout") !== -1) {
15             InspectorTest.expandConsoleMessages();
16             InspectorTest.dumpConsoleMessages();
17             InspectorTest.completeTest();
18         }
19     }
20 }
21
22 function loadIframe()
23 {
24     var iframe = document.createElement("iframe");
25     iframe.src = "resources/uncaught-in-iframe.html";
26     document.body.appendChild(iframe);
27 }
28
29 </script>
30 </head>
31
32 <body onload="runTest()">
33 <p>
34 Tests that uncaught exceptions are logged into console.<a href="https://bugs.webkit.org/show_bug.cgi?id=47250">Bug 47250.</a>
35 </p>
36
37 </body>
38 </html>