OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../resources/js-test.js"></script> | 2 <script src="../resources/testharness.js"></script> |
| 3 <script src="../resources/testharnessreport.js"></script> |
3 <style> | 4 <style> |
4 ::-webkit-scrollbar { | 5 ::-webkit-scrollbar { |
5 width: 150px; | 6 width: 150px; |
6 height: 150px; | 7 height: 150px; |
7 } | 8 } |
8 iframe { | 9 iframe { |
9 width: 300px; | 10 width: 300px; |
10 border: 0; | 11 border: 0; |
11 outline: 1px solid blue; | 12 outline: 1px solid blue; |
12 } | 13 } |
13 </style> | 14 </style> |
14 <iframe srcdoc=" | 15 <iframe srcdoc=" |
15 <style> | 16 <style> |
16 body { margin: 0; padding: 10px; height: 500px; font: 10pt monospace; } | 17 body { margin: 0; padding: 10px; height: 500px; font: 10pt monospace; } |
17 </style> | 18 </style> |
18 "></iframe> | 19 "></iframe> |
19 <script> | 20 <script> |
20 onload = function() { | 21 async_test(function(t) { |
21 var body = document.querySelector("iframe").contentDocument.body; | 22 onload = t.step_func_done(function() { |
22 shouldBe("285", String(body.clientWidth)); | 23 var body = document.querySelector("iframe").contentDocument.body; |
23 }; | 24 assert_equals(285, body.clientWidth); |
24 </script> | 25 }); |
| 26 }); |
| 27 </script> |
OLD | NEW |