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

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: fix nits 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
« no previous file with comments | « no previous file | LayoutTests/fast/media/media-query-overflow-value-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..773771abfecc472a3a5ab486ba611aad16b911db
--- /dev/null
+++ b/LayoutTests/fast/media/media-query-overflow-value.html
@@ -0,0 +1,38 @@
+<!DOCTYPE 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>
« no previous file with comments | « no previous file | LayoutTests/fast/media/media-query-overflow-value-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698