3 <title>Test the CSS4 media query
"hover" 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()
31 "(any-hover:on-demand)",
32 "(any-hover:oN-dEmAnd)",
33 "(any-hover: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 'on-demand' hover -------------");
49 internals.settings.setPrimaryHoverType('on-demand');
50 internals.settings.setAvailableHoverTypes('on-demand');
53 log(
"------------- with 'hover' hover -------------");
54 internals.settings.setPrimaryHoverType('hover');
55 internals.settings.setAvailableHoverTypes('hover');
58 log(
"------------- with 'on-demand' and 'hover' hover, 'hover' is primary -------------");
59 internals.settings.setPrimaryHoverType('hover');
60 internals.settings.setAvailableHoverTypes('on-demand,hover');
63 log(
"------------- with 'on-demand' and 'hover' hover, 'on-demand' is primary -------------");
64 internals.settings.setPrimaryHoverType('on-demand');
65 internals.settings.setAvailableHoverTypes('on-demand,hover');
68 log(
"------------- with 'none', 'on-demand' and 'hover' hover, 'none' is primary -------------");
69 internals.settings.setPrimaryHoverType('none');
70 internals.settings.setAvailableHoverTypes('none,on-demand,hover');
73 log(
"------------- with 'none' hover -------------");
74 internals.settings.setPrimaryHoverType('none');
75 internals.settings.setAvailableHoverTypes('none');
81 <body onload=
"runTests()">
82 <p>Test the
<a href=
"http://www.w3.org/TR/2014/WD-mediaqueries-4-20140605/#hover">(hover)
</a> media features.
83 See
<a href=
"http://crbug.com/136119">Bug
136119</a> for details.
</p>