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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/media-attr-non-matching-dynamic.html

Issue 2829873002: Collect media query results for non-matching stylesheets. (Closed)
Patch Set: Created 3 years, 8 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/css/ActiveStyleSheets.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 iframe {
6 height: 50px;
7 width: 50px;
8 }
9 </style>
10 <iframe></iframe>
11 <script>
12 test(() => {
13 var iframe = document.querySelector("iframe");
14 var doc = iframe.contentDocument;
15 var style = doc.createElement("style");
16 style.setAttribute("media", "(min-width: 100px)");
17 style.textContent = "body { background: green }";
18 doc.head.appendChild(style);
19 assert_equals(doc.defaultView.getComputedStyle(doc.body).backgroundColor, "r gba(0, 0, 0, 0)");
20 iframe.setAttribute("style", "height: 100px; width: 100px");
21 assert_equals(doc.defaultView.getComputedStyle(doc.body).backgroundColor, "r gb(0, 128, 0)");
22 }, "Sheet with initially non-matching viewport media query applies after resiz e");
23 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/ActiveStyleSheets.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698