3 <title>Test CSSOM View module: MediaQueryList interface</title>
4 <style type="text/css">
7 <script type="text/javascript" charset="utf-8">
8 if (window.layoutTestController)
9 layoutTestController.dumpAsText();
12 document.getElementById('results').innerHTML += m + '<br>';
15 function callback1(query) {
16 log("[1] - query " + query.media + " changed to " + (query.matches ? "true" : "false"));
19 function callback2(query) {
20 log("[2] - query " + query.media + " changed to " + (query.matches ? "true" : "false"));
25 if (!window.layoutTestController)
28 layoutTestController.setViewModeMediaFeature("windowed");
30 var query = window.matchMedia("(-webkit-view-mode: windowed)");
32 query.addListener(callback1);
33 query.addListener(callback1);
34 query.addListener(callback2);
36 layoutTestController.setViewModeMediaFeature("minimized");
41 <body onload="runTests()">
42 <p>Test the MediaQueryList interface: <a href="http://dev.w3.org/csswg/cssom-view/#the-mediaquerylist-interface" title="CSSOM View Module">http://dev.w3.org/csswg/cssom-view/#the-mediaquerylist-interface</a>.</p>
43 <p>Testing listener comparison. Two callbacks are expected.</p>