test_bug1025933.html (1133B)
1 <!DOCTYPE HTML> 2 <html> 3 <!-- 4 https://bugzilla.mozilla.org/show_bug.cgi?id=1025933 5 --> 6 <head> 7 <meta charset="utf-8"> 8 <title>Test for Bug 1025933</title> 9 <script src="/tests/SimpleTest/SimpleTest.js"></script> 10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 11 <script type="application/javascript"> 12 13 /** Test for Bug 1025933 */ 14 15 SimpleTest.waitForExplicitFinish(); 16 17 function test() { 18 var iframe = document.createElement('iframe'); 19 iframe.srcdoc = '<div id="content"> <div id="host"></div </div>'; 20 21 iframe.onload = function() { 22 var s = iframe.contentDocument.getElementById("host").attachShadow({mode: 'open'}); 23 s.innerHTML = '<div style="width:100px;height:100px;background:red"></div>'; 24 var el = s.firstElementChild; 25 is(el.clientWidth, 100); 26 is(el.clientHeight, 100); 27 SimpleTest.finish(); 28 } 29 30 document.body.appendChild(iframe); 31 } 32 33 </script> 34 </head> 35 <body onload="test()"> 36 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1025933">Mozilla Bug 1025933</a> 37 <p id="display"></p> 38 <pre id="test"> 39 </pre> 40 </body> 41 </html>