Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector / elements / styles-4 / styles-iframe.html
blobf1b2da79e1b165cbaf9a5d6e687bcabdb87b6ec6
1 <html>
2 <head>
4 <style type="text/css" media="screen">
5 #main { background:blue; }
7 /*# sourceURL=styles-iframe.html*/
8 </style>
10 <script src="../../../http/tests/inspector/inspector-test.js"></script>
11 <script src="../../../http/tests/inspector/elements-test.js"></script>
12 <script>
14 function loadIframe()
16 var iframe = document.createElement("iframe");
17 iframe.src = "../styles/resources/styles-iframe-data.html";
18 document.getElementById("main").appendChild(iframe);
21 function test()
23 InspectorTest.evaluateInPage("loadIframe()");
24 InspectorTest.addConsoleSniffer(step0);
26 function step0()
28 InspectorTest.selectNodeAndWaitForStyles("main", step1);
31 function step1()
33 InspectorTest.addResult("Main frame style:");
34 InspectorTest.dumpSelectedElementStyles(true, false, true);
35 InspectorTest.selectNodeAndWaitForStyles("iframeBody", step2);
38 function step2()
40 InspectorTest.addResult("iframe style:");
41 InspectorTest.dumpSelectedElementStyles(true, false, true);
42 InspectorTest.completeTest();
45 </script>
46 </head>
48 <body onload="runTest()">
49 <p>
50 Tests that proper (and different) styles are returned for body elements of main document and iframe.
51 </p>
53 <div id="main"></div>
54 </body>
55 </html>