Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <title>Test the Manifest media query "display-mode" features.</title> | 3 <title>Test the Manifest media query "display-mode" features.</title> |
| 4 <style type="text/css"> | 4 <style type="text/css"> |
| 5 | 5 |
| 6 </style> | 6 </style> |
| 7 <script type="text/javascript" charset="utf-8"> | 7 <script type="text/javascript" charset="utf-8"> |
| 8 if (window.testRunner) | 8 if (window.testRunner) |
| 9 testRunner.dumpAsText(); | 9 testRunner.dumpAsText(); |
| 10 | 10 |
| 11 function log(m) { | 11 function log(m) { |
| 12 document.getElementById('results').innerHTML += m + '<br>'; | 12 document.getElementById('results').innerHTML += m + '<br>'; |
| 13 } | 13 } |
| 14 | 14 |
| 15 function testQueries() | 15 function testQueries() |
| 16 { | 16 { |
| 17 var queries = [ | 17 var queries = [ |
| 18 "(display-mode)", | 18 "(display-mode)", |
| 19 "(display-mode: browser)", | 19 "(display-mode: browser)", |
| 20 "(display-mode: minimal-ui)", | 20 "(display-mode: minimal-ui)", |
| 21 "(display-mode: standalone)", | 21 "(display-mode: standalone)", |
| 22 "(display-mode: fullscreen)", | 22 "(display-mode: fullscreen)", |
| 23 "(display-mode: fine)", | |
|
Mikhail
2015/10/13 14:01:16
comment here, like "// Unexpected values."
| |
| 24 "(display-mode: 1)", | |
| 25 "(display-mode: 3%)", | |
| 23 ]; | 26 ]; |
| 24 for (var index=0; index < queries.length; index++) { | 27 for (var index=0; index < queries.length; index++) { |
| 25 log("Query "" + queries[index] + "": " + | 28 log("Query "" + queries[index] + "": " + |
| 26 window.matchMedia(queries[index]).matches); | 29 window.matchMedia(queries[index]).matches); |
| 27 } | 30 } |
| 28 } | 31 } |
| 29 | 32 |
| 30 function runTests() | 33 function runTests() |
| 31 { | 34 { |
| 32 if (!window.internals) | 35 if (!window.internals) |
| (...skipping 18 matching lines...) Expand all Loading... | |
| 51 | 54 |
| 52 </script> | 55 </script> |
| 53 </head> | 56 </head> |
| 54 <body onload="runTests()"> | 57 <body onload="runTests()"> |
| 55 <p>Test the <a href="http://w3c.github.io/manifest/#the-display-mode-media-f eature">(display-mode: ...)</a> media features. | 58 <p>Test the <a href="http://w3c.github.io/manifest/#the-display-mode-media-f eature">(display-mode: ...)</a> media features. |
| 56 | 59 |
| 57 <div id="results"> | 60 <div id="results"> |
| 58 </div> | 61 </div> |
| 59 </body> | 62 </body> |
| 60 </html> | 63 </html> |
| OLD | NEW |