OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <title>Test CSS4 media query "pointer" and "hover" features.</title> | 3 <title>Test CSS4 media query "pointer" and "hover" 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 "(pointer)", | 18 "(pointer)", |
19 "(Pointer)", | 19 "(Pointer)", |
20 "(pointer:none)", | 20 "(pointer:none)", |
21 "(pointer:coarse)", | 21 "(pointer:coarse)", |
22 "(pointer:coARse)", | 22 "(pointer:coARse)", |
23 "(pointer:bogusvalue)", | 23 "(pointer:bogusvalue)", |
24 "(pointer:fine)", | 24 "(pointer:fine)", |
25 "(hover)", | 25 "(hover)", |
26 "(hover:0)", | 26 "(hover:none)", |
27 "(hover:1)", | 27 "(hover:hover)", |
| 28 "(hover:on-demand)", |
28 "(hover:bogusvalue)" ]; | 29 "(hover:bogusvalue)" ]; |
29 for (var index=0; index < queries.length; index++) { | 30 for (var index=0; index < queries.length; index++) { |
30 log("Query "" + queries[index] + "": " + | 31 log("Query "" + queries[index] + "": " + |
31 window.matchMedia(queries[index]).matches); | 32 window.matchMedia(queries[index]).matches); |
32 } | 33 } |
33 } | 34 } |
34 | 35 |
35 function runTests() | 36 function runTests() |
36 { | 37 { |
37 log("------------- default configuration -------------"); | 38 log("------------- default configuration -------------"); |
(...skipping 11 matching lines...) Expand all Loading... |
49 </head> | 50 </head> |
50 <body onload="runTests()"> | 51 <body onload="runTests()"> |
51 <p>Test the <a href="http://dev.w3.org/csswg/css4-mediaqueries/#pointer">(po
inter)</a> and | 52 <p>Test the <a href="http://dev.w3.org/csswg/css4-mediaqueries/#pointer">(po
inter)</a> and |
52 <a href="http://dev.w3.org/csswg/css4-mediaqueries/#hover">(hover)</a> media
features. | 53 <a href="http://dev.w3.org/csswg/css4-mediaqueries/#hover">(hover)</a> media
features. |
53 See <a href="https://bugs.webkit.org/show_bug.cgi?id=87403">Bug 87403</a> fo
r details.</p> | 54 See <a href="https://bugs.webkit.org/show_bug.cgi?id=87403">Bug 87403</a> fo
r details.</p> |
54 | 55 |
55 <div id="results"> | 56 <div id="results"> |
56 </div> | 57 </div> |
57 </body> | 58 </body> |
58 </html> | 59 </html> |
OLD | NEW |