| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 | |
| 4 <style type="text/css" media="screen"> | |
| 5 #main { background:blue; } | |
| 6 </style> | |
| 7 | |
| 8 <script src="../../../http/tests/inspector/inspector-test.js"></script> | |
| 9 <script src="../../../http/tests/inspector/elements-test.js"></script> | |
| 10 <script> | |
| 11 | |
| 12 function loadIframe() | |
| 13 { | |
| 14 var iframe = document.createElement("iframe"); | |
| 15 iframe.src = "resources/styles-iframe-data.html"; | |
| 16 document.getElementById("main").appendChild(iframe); | |
| 17 } | |
| 18 | |
| 19 function test() | |
| 20 { | |
| 21 InspectorTest.evaluateInPage("loadIframe()"); | |
| 22 InspectorTest.addConsoleSniffer(step0); | |
| 23 | |
| 24 function step0() | |
| 25 { | |
| 26 InspectorTest.selectNodeAndWaitForStyles("main", step1); | |
| 27 } | |
| 28 | |
| 29 function step1() | |
| 30 { | |
| 31 InspectorTest.addResult("Main frame style:"); | |
| 32 InspectorTest.dumpSelectedElementStyles(true, false, true); | |
| 33 InspectorTest.selectNodeAndWaitForStyles("iframeBody", step2); | |
| 34 } | |
| 35 | |
| 36 function step2() | |
| 37 { | |
| 38 InspectorTest.addResult("iframe style:"); | |
| 39 InspectorTest.dumpSelectedElementStyles(true, false, true); | |
| 40 InspectorTest.completeTest(); | |
| 41 } | |
| 42 } | |
| 43 </script> | |
| 44 </head> | |
| 45 | |
| 46 <body onload="runTest()"> | |
| 47 <p> | |
| 48 Tests that proper (and different) styles are returned for body elements of main
document and iframe. | |
| 49 </p> | |
| 50 | |
| 51 <div id="main"></div> | |
| 52 </body> | |
| 53 </html> | |
| OLD | NEW |