Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Unified Diff: LayoutTests/fast/media/mq-display-mode.html

Issue 853483003: Add support for 'display-mode' MQ defined in Manifest spec (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/fast/media/mq-display-mode-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/media/mq-display-mode.html
diff --git a/LayoutTests/fast/media/mq-display-mode.html b/LayoutTests/fast/media/mq-display-mode.html
new file mode 100644
index 0000000000000000000000000000000000000000..b64d6af46a4908d78b9528da2f82940a8f87c2e7
--- /dev/null
+++ b/LayoutTests/fast/media/mq-display-mode.html
@@ -0,0 +1,60 @@
+<html>
+<head>
+<title>Test the Manifest media query "display-mode" features.</title>
+<style type="text/css">
+
+</style>
+<script type="text/javascript" charset="utf-8">
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ 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 &quot;" + queries[index] + "&quot: " +
+ window.matchMedia(queries[index]).matches);
+ }
+ }
+
+ function runTests()
+ {
+ if (!window.internals)
+ return;
+
+ log("------------- with 'browser' display mode -------------");
+ internals.settings.setDisplayModeOverride('browser');
+ testQueries();
+
+ log("------------- with 'minimal-ui' display mode -------------");
+ internals.settings.setDisplayModeOverride('minimal-ui');
+ testQueries();
+
+ log("------------- with 'standalone' display mode -------------");
+ internals.settings.setDisplayModeOverride('standalone');
+ testQueries();
+
+ log("------------- with 'fullscreen' display mode -------------");
+ internals.settings.setDisplayModeOverride('fullscreen');
+ testQueries();
+ }
+
+</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.
+
+ <div id="results">
+ </div>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/media/mq-display-mode-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698