Chromium Code Reviews| Index: LayoutTests/fast/media/media-query-overflow-value.html |
| diff --git a/LayoutTests/fast/media/media-query-overflow-value.html b/LayoutTests/fast/media/media-query-overflow-value.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6c857040f926f00bb4b074f9454198f1e1588cf7 |
| --- /dev/null |
| +++ b/LayoutTests/fast/media/media-query-overflow-value.html |
| @@ -0,0 +1,37 @@ |
| +<!doctype html> |
| +<html> |
| +<head> |
|
Yoav Weiss
2014/10/10 07:33:49
nit: We usually don't include the doctype + html +
rune
2014/10/10 07:52:55
doctype should be there, for sure, preferable upca
|
| +<script> |
| + if (window.testRunner) |
| + testRunner.dumpAsText(); |
| + function log(m) |
| + { |
| + var results = document.getElementById('results'); |
| + results.innerHTML += m + '<br>'; |
| + } |
| + function testQuery(query, expected) |
|
Yoav Weiss
2014/10/10 07:33:49
nit: Can you add a newline above functions?
|
| + { |
| + var isTrue = window.matchMedia(query).matches; |
| + var message = '\"' + query + '\" evaluates to ' + (isTrue ? 'true' : 'false'); |
| + message += (isTrue == expected) ? ': PASS' : ': FAIL'; |
| + log(message); |
| + } |
| + function runTests() |
| + { |
| + testQuery('(min-width: 9999999999px)', false); |
| + testQuery('(max-width: 9999999999px)', true); |
| + testQuery('(min-device-width: 9999999999px)', false); |
| + testQuery('(max-device-width: 9999999999px)', true); |
| + testQuery('(min-height: 9999999999px)', false); |
| + testQuery('(max-height: 9999999999px)', true); |
| + testQuery('(min-device-height: 9999999999px)', false); |
| + testQuery('(max-device-height: 9999999999px)', true); |
| + } |
| +</script> |
| +</head> |
| +<body onload="runTests()"> |
| + <p>Test MediaQuery values that overflow int range</p> |
| + <div id="results"> |
| + </div> |
| +</body> |
| +</html> |