| OLD | NEW |
| (Empty) |
| 1 <html> | |
| 2 <head> | |
| 3 <script type="text/javascript"> | |
| 4 | |
| 5 function test() | |
| 6 { | |
| 7 if (window.testRunner && window.internals) { | |
| 8 testRunner.dumpAsText(); | |
| 9 internals.settings.setFrameFlatteningEnabled(true); | |
| 10 } | |
| 11 | |
| 12 // Force synchronous layout. | |
| 13 document.body.offsetHeight; | |
| 14 | |
| 15 var theframe = document.getElementById("theframe"); | |
| 16 var width = parseInt(getComputedStyle(theframe).width); | |
| 17 var height = parseInt(getComputedStyle(theframe).height); | |
| 18 var pass = false; | |
| 19 if (width == 0 && height == 0) | |
| 20 pass = true; | |
| 21 document.getElementById("console").innerText = pass ? "PASS" : "FAIL
"; | |
| 22 } | |
| 23 </script> | |
| 24 </head> | |
| 25 <body onload="test()"> | |
| 26 <style>body { background-color: green; }</style> | |
| 27 <p>Test for iframe flattening. The flattening only works inside the DRT. | |
| 28 <p>The frame should not be resized to the size of the containing content. | |
| 29 | |
| 30 <p><iframe id=theframe width="0" height="0" scrolling=auto src="data:text/ht
ml, | |
| 31 <style>body { background-color: red; }</style> | |
| 32 <body> | |
| 33 <div style='position: absolute; width: 400px; height: 400px; left: 0
; top: 0px;'></div> | |
| 34 </body> | |
| 35 "></iframe> | |
| 36 <div id=console></div> | |
| 37 </body> | |
| 38 </html> | |
| OLD | NEW |