3 <title>Test the media query
"display-mode" features.
</title>
4 <script src=
"../../fullscreen/trusted-event.js"></script>
6 if (window
.testRunner
) {
7 testRunner
.dumpAsText();
8 testRunner
.waitUntilDone();
12 document
.getElementById('results').innerHTML
+= m
+ '<br>';
15 function testQueries() {
18 "(display-mode: browser)",
19 "(display-mode: minimal-ui)",
20 "(display-mode: standalone)",
21 "(display-mode: fullscreen)",
23 for (var index
=0; index
< queries
.length
; index
++) {
24 log("Query "" + queries
[index
] + "": " +
25 window
.matchMedia(queries
[index
]).matches
);
30 var div
= document
.querySelector("div");
31 document
.onwebkitfullscreenchange = function() {
32 log("------------- entered fullscreen -------------");
35 document
.onwebkitfullscreenchange = function() {
36 log("------------- left fullscreen -------------");
38 if (window
.testRunner
)
39 testRunner
.notifyDone();
41 document
.exitFullscreen();
43 trusted_event(function() {
44 log("------------- before entering fullscreen -------------");
46 div
.webkitRequestFullscreen();
51 <body onload=
"runTests()">
52 <p>Test the
<a href=
"http://w3c.github.io/manifest/#the-display-mode-media-feature">(display-mode: ...)
</a>
53 media features while the browser window entering/leaving fullscreen mode.
</p>
54 <div id=
"results"></div>