Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / LayoutTests / http / tests / inspector / console-cd.html
1 <html>
2 <head>
3 <script src="console-test.js"></script>
4 <script src="inspector-test.js"></script>
5
6 <script>
7
8 function test()
9 {
10     InspectorTest.showConsolePanel();
11     var selector = WebInspector.consoleView._executionContextSelector._selectElement;
12     var option = selector.firstChild;
13     while (option) {
14         if (option.textContent && option.textContent.startsWith("myIFrame"))
15             break;
16         option = option.nextSibling;
17     }
18     if (!option) {
19         InspectorTest.addResult("FAILED: myIFrame not found in the context list");
20         InspectorTest.completeTest();
21         return;
22     }
23     option.selected = true;
24     WebInspector.consoleView._executionContextChanged();
25
26     InspectorTest.evaluateInConsoleAndDump("foo", finish);
27     function finish()
28     {
29         InspectorTest.completeTest();
30     }
31 }
32
33 </script>
34 </head>
35
36 <body>
37 <p>
38 Tests that console evaluation can be performed in an iframe context.<a href="https://bugs.webkit.org/show_bug.cgi?id=19872">Bug 19872.</a>
39 </p>
40 <iframe name="myIFrame" src="http://localhost:8000/inspector/resources/console-cd-iframe.html" onload="runTest()"></iframe>
41
42 </body>
43 </html>