test_bug1307853.html (946B)
1 <!DOCTYPE HTML> 2 <title>Test for Mozilla Bug 1307853</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <style> 6 iframe { 7 margin: 0; padding: 0; border: none; 8 } 9 </style> 10 <body onload="run_tests()"> 11 <iframe id="i" src="file_bug1307853.html" style="width: 200px; height: 100px"></iframe> 12 <script> 13 function run_tests() { 14 test(function() { 15 var iframe = document.getElementById("i"); 16 var idoc = iframe.contentDocument; 17 var iwin = iframe.contentWindow; 18 var inner = idoc.getElementById("inner"); 19 20 assert_equals(inner.clientWidth, 60, 21 "width of element before iframe resize"); 22 iframe.style.width = "300px"; 23 assert_equals(inner.clientWidth, 40, 24 "width of element after iframe resize"); 25 }, 26 "resize_iframe_percent_padding_fixed_width_boxsizing_borderbox"); 27 } 28 </script>