| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <script src="../../../resources/js-test.js"></script> | |
| 5 <script> | |
| 6 window.onload = function () { | |
| 7 debug("This test ensures that content inside a seamless srcdoc ifram
e correctly inherits style, even if it doesn't set any styles of its own."); | |
| 8 | |
| 9 window.srcdocspan = document.getElementById("nostyle").contentDocume
nt.querySelector('span'); | |
| 10 window.srcdocstylespan = document.getElementById("style").contentDoc
ument.querySelector('span'); | |
| 11 window.span = document.querySelector('iframe[src]').contentDocument.
querySelector('span'); | |
| 12 | |
| 13 shouldBeEqualToString("window.getComputedStyle(srcdocspan).getProper
tyCSSValue('color').cssText", "rgb(255, 0, 0)"); | |
| 14 shouldBeEqualToString("window.getComputedStyle(srcdocstylespan).getP
ropertyCSSValue('color').cssText", "rgb(255, 0, 0)"); | |
| 15 shouldBeEqualToString("window.getComputedStyle(span).getPropertyCSSV
alue('color').cssText", "rgb(255, 0, 0)"); | |
| 16 }; | |
| 17 </script> | |
| 18 <style> | |
| 19 span { color: red; } | |
| 20 </style> | |
| 21 </head> | |
| 22 <body> | |
| 23 <iframe id="nostyle" seamless srcdoc="<span>This is a span.</span>"></iframe
> | |
| 24 <iframe id="style" seamless srcdoc="<style></style><span>This is a span.</sp
an>"></iframe> | |
| 25 <iframe seamless src="resources/span.html"></iframe> | |
| 26 </body> | |
| 27 </html> | |
| OLD | NEW |