benjamin@webkit.org | e2ae553 | 2015-01-24 04:15:56 +0000 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <body> |
| 4 | <script src="../../resources/js-test-pre.js"></script> |
| 5 | <script> |
| 6 | description("Test the hover media feature with machMedia.") |
| 7 | |
| 8 | function testHoverCondition(condition) { |
| 9 | var testString = 'window.matchMedia("(' + condition + ')").matches'; |
| 10 | debug(testString + " = " + eval(testString)); |
| 11 | } |
| 12 | |
| 13 | testHoverCondition("hover"); |
| 14 | |
| 15 | testHoverCondition("hover: hover"); |
| 16 | testHoverCondition("hover: on-demand"); |
| 17 | testHoverCondition("hover: none"); |
| 18 | |
| 19 | testHoverCondition("hover: Hover"); |
| 20 | testHoverCondition("hover: On-demand"); |
| 21 | testHoverCondition("hover: None"); |
| 22 | |
| 23 | testHoverCondition("Hover: hover"); |
| 24 | testHoverCondition("Hover: on-demand"); |
| 25 | testHoverCondition("Hover: none"); |
| 26 | </script> |
| 27 | |
| 28 | <script src="../../resources/js-test-post.js"></script> |
| 29 | </body> |
| 30 | </html> |