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 the 'body' element inside a seamless i
frame defaults to a margin of 0px rather than 8px, and that we don't break the p
arent document's 'body' style in the process."); | |
8 | |
9 window.seamlesssrcdoc = document.getElementById('seamlesssrcdoc').co
ntentDocument.querySelector('body'); | |
10 window.seamlesssrc = document.getElementById('seamlesssrc').contentD
ocument.querySelector('body'); | |
11 window.srcdoc = document.getElementById('srcdoc').contentDocument.qu
erySelector('body'); | |
12 window.src = document.getElementById('src').contentDocument.querySel
ector('body'); | |
13 | |
14 shouldBeEqualToString("window.getComputedStyle(document.body).getPro
pertyCSSValue('margin').cssText", "8px"); | |
15 shouldBeEqualToString("window.getComputedStyle(seamlesssrcdoc).getPr
opertyCSSValue('margin').cssText", "0px"); | |
16 shouldBeEqualToString("window.getComputedStyle(seamlesssrc).getPrope
rtyCSSValue('margin').cssText", "0px"); | |
17 shouldBeEqualToString("window.getComputedStyle(srcdoc).getPropertyCS
SValue('margin').cssText", "8px"); | |
18 shouldBeEqualToString("window.getComputedStyle(src).getPropertyCSSVa
lue('margin').cssText", "8px"); | |
19 }; | |
20 </script> | |
21 </head> | |
22 <body> | |
23 <iframe id="seamlesssrc" seamless src="resources/span.html"></iframe> | |
24 <iframe id="seamlesssrcdoc" seamless srcdoc="<span>This is a span.</span>"><
/iframe> | |
25 <iframe id="src" src="resources/span.html"></iframe> | |
26 <iframe id="srcdoc" srcdoc="<span>This is a span.</span>"></iframe> | |
27 </body> | |
28 </html> | |
OLD | NEW |