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> |