16 <script src=
"../../resources/js-test.js"></script>
20 <img id=
"test_img" src=
"resources/green-256x256.jpg">
23 Image should return a size of
250x166 regardless of zoom level.
26 var imageElement
= document
.getElementById('test_img');
27 var wrapElement
= document
.getElementById('test_wrap');
29 function getSize(zoomLevel
)
31 document
.body
.zoom
= zoomLevel
;
33 imageWidth
: imageElement
.offsetWidth
,
34 imageHeight
: imageElement
.offsetHeight
,
35 wrapWidth
: wrapElement
.offsetWidth
,
36 wrapHeight
: wrapElement
.offsetHeight
40 for (var i
= 90; i
<= 200; i
+= 5) {
41 shouldBe('getSize(' + (i
/ 100) + ').imageWidth', '250');
42 shouldBe('getSize(' + (i
/ 100) + ').imageHeight', '166');
43 shouldBe('getSize(' + (i
/ 100) + ').wrapWidth', '250');
44 shouldBe('getSize(' + (i
/ 100) + ').wrapHeight', '166');
46 document
.body
.zoom
= 1.0;