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

Unified Diff: third_party/WebKit/LayoutTests/fast/media/resolution-change-on-page-zoom.html

Issue 2038793002: Clear media query rulesets on page zoom changes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | third_party/WebKit/LayoutTests/fast/media/resolution-change-on-page-zoom-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/fast/media/resolution-change-on-page-zoom.html
diff --git a/third_party/WebKit/LayoutTests/fast/media/resolution-change-on-page-zoom.html b/third_party/WebKit/LayoutTests/fast/media/resolution-change-on-page-zoom.html
new file mode 100644
index 0000000000000000000000000000000000000000..c0f9f9c6db6b1324c51325fbb6baf25f54edcbcb
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/fast/media/resolution-change-on-page-zoom.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<script src="../../resources/js-test.js"></script>
Yoav Weiss 2016/06/03 10:15:49 Could you rewrite the test using testharness? It's
rune 2016/06/03 11:09:08 Done.
+<style>
+ @media (min-resolution: 2dppx) {
+ body { background-color: green; }
+ }
+</style>
+<p>The viewport should have a green background for page zoom = 200%.</p>
+<script>
+ description("Check that page zoom causes resolution media query changes to take effect.");
+
+ jsTestIsAsync = true;
+
+ matchMedia("(min-resolution: 2dppx)").addListener((mq) => {
+ shouldBeTrue(mq.matches);
+ shouldBeEqualToString("getComputedStyle(document.body).backgroundColor", "rgb(0, 128, 0)");
+ finishJSTest();
+ });
+
+ onload = () => {
+ document.body.offsetTop;
+ if (window.eventSender)
+ eventSender.setPageZoomFactor(2.0);
+ };
+</script>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/media/resolution-change-on-page-zoom-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698