| <script src="../../resources/js-test-pre.js"></script> |
| <style id="target-style"></style> |
| description("Test invalid input with the hover media feature.") |
| var targetStyle = document.getElementById('target-style'); |
| for (var testCase of testCases) { |
| var testString = 'window.matchMedia("(' + testCase + ')").matches'; |
| shouldBeFalse('window.matchMedia("(' + testCase + ')").matches'); |
| targetStyle.innerText = "@media " + testCase + " { }"; |
| shouldBe("document.styleSheets[1].cssRules[0].media.length", "1"); |
| <script src="../../resources/js-test-post.js"></script> |