Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(118)

Unified Diff: LayoutTests/fast/media/media-query-overflow-value.html

Issue 639783002: Media query values should not be 0 when overflowed (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
+<script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+ function log(m)
+ {
+ var results = document.getElementById('results');
+ results.innerHTML += m + '<br>';
+ }
+ function testQuery(query, expected)
+ {
+ 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>
« no previous file with comments | « no previous file | LayoutTests/fast/media/media-query-overflow-value-expected.txt » ('j') | Source/core/css/MediaValues.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698