| Index: LayoutTests/fast/media/mq-display-mode-fullscreen.html
|
| diff --git a/LayoutTests/fast/media/mq-display-mode-fullscreen.html b/LayoutTests/fast/media/mq-display-mode-fullscreen.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..59c294791d3c39779879c9b81beb23ea4e1b940e
|
| --- /dev/null
|
| +++ b/LayoutTests/fast/media/mq-display-mode-fullscreen.html
|
| @@ -0,0 +1,56 @@
|
| +<html>
|
| +<head>
|
| +<title>Test the media query "display-mode" features.</title>
|
| +<script src="../../fullscreen/trusted-event.js"></script>
|
| +<script>
|
| + if (window.testRunner) {
|
| + testRunner.dumpAsText();
|
| + testRunner.waitUntilDone();
|
| + }
|
| +
|
| + function log(m) {
|
| + document.getElementById('results').innerHTML += m + '<br>';
|
| + }
|
| +
|
| + function testQueries() {
|
| + var queries = [
|
| + "(display-mode)",
|
| + "(display-mode: browser)",
|
| + "(display-mode: minimal-ui)",
|
| + "(display-mode: standalone)",
|
| + "(display-mode: fullscreen)",
|
| + ];
|
| + for (var index=0; index < queries.length; index++) {
|
| + log("Query "" + queries[index] + "": " +
|
| + window.matchMedia(queries[index]).matches);
|
| + }
|
| + }
|
| +
|
| + function runTests() {
|
| + var div = document.querySelector("div");
|
| + document.onwebkitfullscreenchange = function() {
|
| + log("------------- entered fullscreen -------------");
|
| + testQueries();
|
| +
|
| + document.onwebkitfullscreenchange = function() {
|
| + log("------------- left fullscreen -------------");
|
| + testQueries();
|
| + if (window.testRunner)
|
| + testRunner.notifyDone();
|
| + }
|
| + document.exitFullscreen();
|
| + }
|
| + trusted_event(function() {
|
| + log("------------- before entering fullscreen -------------");
|
| + testQueries();
|
| + div.webkitRequestFullscreen();
|
| + }, document.body);
|
| + }
|
| +</script>
|
| +</head>
|
| +<body onload="runTests()">
|
| + <p>Test the <a href="http://w3c.github.io/manifest/#the-display-mode-media-feature">(display-mode: ...)</a>
|
| + media features while the browser window entering/leaving fullscreen mode.</p>
|
| + <div id="results"></div>
|
| +</body>
|
| +</html>
|
|
|