Upstream version 7.36.149.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(viewMessage)
12     {
13         if (viewMessage.toString().indexOf("setTimeout") !== -1) {
14             InspectorTest.expandConsoleMessages();
15             InspectorTest.dumpConsoleMessages();
16             InspectorTest.completeTest();
17         }
18     }
19 }
20
21 function loadIframe()
22 {
23     var iframe = document.createElement("iframe");
24     iframe.src = "resources/uncaught-in-iframe.html";
25     document.body.appendChild(iframe);
26 }
27
28 </script>
29 </head>
30
31 <body onload="runTest()">
32 <p>
33 Tests that uncaught exceptions are logged into console.<a href="https://bugs.webkit.org/show_bug.cgi?id=47250">Bug 47250.</a>
34 </p>
35
36 </body>
37 </html>