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

Unified Diff: LayoutTests/fast/css/zoom-media-queries-resolution.html

Issue 23192002: Let page zoom affect resolution and -webkit-device-pixel-ratio MQs. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review issue: renamed variable Created 7 years, 4 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/css/zoom-media-queries-resolution-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css/zoom-media-queries-resolution.html
diff --git a/LayoutTests/fast/css/zoom-media-queries-resolution.html b/LayoutTests/fast/css/zoom-media-queries-resolution.html
new file mode 100644
index 0000000000000000000000000000000000000000..850382e75e2b5b192d4ee7ea927dcc974e678654
--- /dev/null
+++ b/LayoutTests/fast/css/zoom-media-queries-resolution.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<script src="../js/resources/js-test-pre.js"></script>
+<script>
+ if (!window.eventSender) {
+ document.write("This test does not work in manual mode.");
+ } else {
+ var initialResolution = window.devicePixelRatio;
+ shouldBeTrue('matchMedia("(resolution: " + initialResolution + "dppx)").matches');
+ shouldBeTrue('matchMedia("(-webkit-device-pixel-ratio: " + initialResolution + ")").matches');
+
+ eventSender.zoomPageIn();
+
+ shouldBeTrue('matchMedia("(resolution: " + initialResolution * 1.2 + "dppx)").matches');
+ shouldBeTrue('matchMedia("(-webkit-device-pixel-ratio: " + initialResolution * 1.2 + ")").matches');
+
+ eventSender.zoomPageOut();
+ eventSender.zoomPageOut();
+
+ shouldBeTrue('matchMedia("(resolution: " + initialResolution / 1.2 + "dppx)").matches');
+ shouldBeTrue('matchMedia("(-webkit-device-pixel-ratio: " + initialResolution / 1.2 + ")").matches');
+ }
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css/zoom-media-queries-resolution-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698