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

Side by Side 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: Use testharness.js 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/testharness.js"></script>
3 <script src="../../resources/testharnessreport.js"></script>
4 <style>
5 @media (min-resolution: 2dppx) {
6 body { background-color: green; }
7 }
8 </style>
9 <p>The viewport should have a green background for page zoom = 200%.</p>
10 <script>
11 setup({ "explicit_done": true });
12
13 matchMedia("(min-resolution: 2dppx)").addListener((mq) => {
14 test(() => {
15 assert_true(mq.matches, "resolution query doesn't match after page z oom.");
16 }, "Check that the MediaQueryList matches the resolution query.");
17
18 test(() => {
19 assert_equals(getComputedStyle(document.body).backgroundColor, "rgb( 0, 128, 0)", "Background color of body is not green.");
20 }, "Check that the background color is applied after the media query res ult changed.");
21 done();
22 });
23
24 onload = () => {
25 document.body.offsetTop;
26 if (window.eventSender)
27 eventSender.setPageZoomFactor(2.0);
28 };
29 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/LocalFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698