3 <title>Test the CSS4 media query
"pointer" features.
</title>
4 <style type=
"text/css">
7 <script type=
"text/javascript" charset=
"utf-8">
9 testRunner.dumpAsText();
12 document.getElementById('results').innerHTML += m + '
<br>';
15 function testQueries()
24 "(pointer:bogusvalue)",
31 "(any-pointer:coarse)",
32 "(any-pointer:coARse)",
33 "(any-pointer:bogusvalue)",
37 for (var index=
0; index < queries.length; index++) {
38 log(
"Query "" + queries[index] +
"": " +
39 window.matchMedia(queries[index]).matches);
45 if (!window.internals)
48 log(
"------------- with 'coarse' pointer -------------");
49 internals.settings.setPrimaryPointerType('coarse');
50 internals.settings.setAvailablePointerTypes('coarse');
53 log(
"------------- with 'fine' pointer -------------");
54 internals.settings.setPrimaryPointerType('fine');
55 internals.settings.setAvailablePointerTypes('fine');
58 log(
"------------- with 'fine' and 'coarse' pointer, 'fine' is primary -------------");
59 internals.settings.setPrimaryPointerType('fine');
60 internals.settings.setAvailablePointerTypes('fine,coarse');
63 log(
"------------- with 'fine' and 'coarse' pointer, 'coarse' is primary -------------");
64 internals.settings.setPrimaryPointerType('coarse');
65 internals.settings.setAvailablePointerTypes('fine,coarse');
68 log(
"------------- with 'none', 'fine' and 'coarse' pointer, 'none' is primary -------------");
69 internals.settings.setPrimaryPointerType('none');
70 internals.settings.setAvailablePointerTypes('none,fine,coarse');
73 log(
"------------- with 'none' pointer -------------");
74 internals.settings.setPrimaryPointerType('none');
75 internals.settings.setAvailablePointerTypes('none');
81 <body onload=
"runTests()">
82 <p>Test the
<a href=
"http://www.w3.org/TR/2014/WD-mediaqueries-4-20140605/#pointer">(pointer)
</a> media features.
83 See
<a href=
"http://crbug.com/136119">Bug
136119</a> for details.
</p>