Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / media / invalid-lengths.html
blob50a933dfa79d81037465f5238c7cfea475335421
1 <!DOCTYPE html>
2 <pre id="console">
3 </pre>
4 <script>
5 if (window.testRunner)
6 testRunner.dumpAsText();
8 function log(message)
10 document.getElementById('console').appendChild(document.createTextNode(message + "\n"));
13 function testQuery(query, expected)
15 var actual = window.styleMedia.matchMedium(query);
16 var message = (actual === expected) ? 'PASS' : 'FAIL';
17 message += ": \"" + query + "\" evaluates to " + (actual ? "true" : "false") + ".";
18 log(message);
21 testQuery('(min-device-width: 0)', true);
22 testQuery('(min-device-width: 1px)', true);
23 testQuery('(min-device-width: 1deg)', false);
24 testQuery('(min-device-width: 1)', false);
25 testQuery('(min-device-width: solid)', false);
26 testQuery('(min-device-width: "red")', false);
27 </script>