4 <script src=
"../../resources/js-test.js"></script>
8 Tests that width MQ feature is correct on zoom.
11 // eventSender.zoomPageOut/In zooms with a fixed factor of 1.2 instead
12 // of the zoom levels of the actual browser.
14 function printMatch(match
) {
15 return (match
> 0) ? "matches " + match
+ "px." : "doesn't match tested values.";
19 shouldBeTrue("window.matchMedia('(width: " + window
.innerWidth
+ "px)').matches");
20 if (window
.matchMedia("(width: " + window
.innerWidth
+ "px)").matches
)
24 for (var j
= 0; j
< window
.innerWidth
+ 100; j
++) {
25 if (window
.matchMedia("(width: " + j
+ "px)").matches
) {
31 debug("window.innerWidth is " + window
.innerWidth
+ "px, but width MQ feature " + printMatch(j
));
34 if (window
.eventSender
) {
35 for (var i
= 0; i
< 5; i
++) {
36 eventSender
.zoomPageOut();
40 for (var i
= 0; i
< 10; i
++) {
41 eventSender
.zoomPageIn();