| Index: third_party/WebKit/LayoutTests/fast/media/mq-width-on-zoom.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/media/mq-width-on-zoom.html b/third_party/WebKit/LayoutTests/fast/media/mq-width-on-zoom.html
|
| index 6456ca5a06fafa1c80e9b17f395b165370719064..ad4f5e1d8b3dd70fcedd6e74dd373c5edc06845e 100644
|
| --- a/third_party/WebKit/LayoutTests/fast/media/mq-width-on-zoom.html
|
| +++ b/third_party/WebKit/LayoutTests/fast/media/mq-width-on-zoom.html
|
| @@ -11,24 +11,11 @@
|
| // eventSender.zoomPageOut/In zooms with a fixed factor of 1.2 instead
|
| // of the zoom levels of the actual browser.
|
|
|
| - function printMatch(match) {
|
| - return (match > 0) ? "matches " + match + "px." : "doesn't match tested values.";
|
| - }
|
| -
|
| function test() {
|
| - shouldBeTrue("window.matchMedia('(width: " + window.innerWidth + "px)').matches");
|
| - if (window.matchMedia("(width: " + window.innerWidth + "px)").matches)
|
| - return;
|
| -
|
| - var matches = 0
|
| - for (var j = 0; j < window.innerWidth + 100; j++) {
|
| - if (window.matchMedia("(width: " + j + "px)").matches) {
|
| - matches = j;
|
| - break;
|
| - }
|
| - }
|
| -
|
| - debug("window.innerWidth is " + window.innerWidth + "px, but width MQ feature " + printMatch(j));
|
| + var minWidth = window.innerWidth - 1;
|
| + var maxWidth = window.innerWidth + 1;
|
| + shouldBeTrue("window.matchMedia('(min-width: " + minWidth + "px)').matches");
|
| + shouldBeTrue("window.matchMedia('(max-width: " + maxWidth + "px)').matches");
|
| }
|
|
|
| if (window.eventSender) {
|
|
|