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

Unified Diff: LayoutTests/fast/media/mq-resolution.html

Issue 14408004: Fix incorrect evaluation of resolution media queries (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 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/mq-resolution-expected.txt » ('j') | Source/core/css/CSSParser.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/media/mq-resolution.html
diff --git a/LayoutTests/fast/media/mq-resolution.html b/LayoutTests/fast/media/mq-resolution.html
index 0620cc017bfa00eff2212ba52e7da06436d900e7..6b966d731f42b4c0108ba1cac896ce10106a9432 100644
--- a/LayoutTests/fast/media/mq-resolution.html
+++ b/LayoutTests/fast/media/mq-resolution.html
@@ -49,19 +49,19 @@
shouldBe("matchMedia('(min-resolution: 0dpi)').matches", "false");
shouldBe("matchMedia('(max-resolution: 0dpi)').matches", "false");
- window.internals.settings.setResolutionOverride(144, 144);
+ window.internals.setDeviceScaleFactor(1.5)
shouldBe("matchMedia('(resolution: 1.5dppx)').matches", "true");
shouldBe("resolutionFromStyle()", "1.5");
- window.internals.settings.setResolutionOverride(192, 192);
+ window.internals.setDeviceScaleFactor(2);
shouldBe("matchMedia('(resolution: 2dppx)').matches", "true");
shouldBe("resolutionFromStyle()", "2");
- window.internals.settings.setResolutionOverride(96, 96);
+ window.internals.setDeviceScaleFactor(1);
shouldBe("matchMedia('(resolution: 1dppx)').matches", "true");
shouldBe("resolutionFromStyle()", "1");
- window.internals.settings.setResolutionOverride(216, 216);
+ window.internals.setDeviceScaleFactor(2.25);
shouldBe("matchMedia('(resolution: 2.25dppx)').matches", "true");
shouldBe("resolutionFromStyle()", "2.25");
shouldBe("matchMedia('(resolution)').matches", "true");
@@ -73,26 +73,6 @@
shouldBe("matchMedia('(min-resolution: 85dpcm)').matches", "true");
shouldBe("matchMedia('(max-resolution: 85dpcm)').matches", "true");
- window.internals.settings.setResolutionOverride(216, 254);
- // Non-square must never match.
- shouldBe("matchMedia('(resolution)').matches", "false");
- shouldBe("matchMedia('(resolution: 216dpi)').matches", "false");
- shouldBe("matchMedia('(resolution: 254dpi)').matches", "false");
-
- shouldBe("matchMedia('(min-resolution: 216dpi)').matches", "true");
- shouldBe("matchMedia('(min-resolution: 254dpi)').matches", "false");
- shouldBe("matchMedia('(max-resolution: 216dpi)').matches", "false");
- shouldBe("matchMedia('(max-resolution: 254dpi)').matches", "true");
-
- // Non-square must never match.
- shouldBe("matchMedia('(resolution: 85dpcm)').matches", "false");
- shouldBe("matchMedia('(resolution: 100dpcm)').matches", "false");
-
- shouldBe("matchMedia('(min-resolution: 85dpcm)').matches", "true");
- shouldBe("matchMedia('(min-resolution: 100dpcm)').matches", "false");
- shouldBe("matchMedia('(max-resolution: 85dpcm)').matches", "false");
- shouldBe("matchMedia('(max-resolution: 100dpcm)').matches", "true");
-
// Test printing.
window.internals.settings.setMediaTypeOverride("print");
« no previous file with comments | « no previous file | LayoutTests/fast/media/mq-resolution-expected.txt » ('j') | Source/core/css/CSSParser.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698