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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/css-link-media-change.html

Issue 1793933002: Don't trigger a link resource fetch on media change. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed test and made mediaChanged() virtual Created 4 years, 9 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src="../../resources/js-test.js"></script>
3 <style>#t1 { color: green }</style>
4 <link id="link" rel="stylesheet" href="data:text/css,#t1{color:red}" media="(min -width: 1px)"></link>
5 <div id="t1">This text should be green</div>
6 <script>
7 description("Check that changing media attribute on loaded link works");
8
9 shouldBeEqualToString("getComputedStyle(t1).color", "rgb(255, 0, 0)");
10
11 link.setAttribute("media", "(max-width: 1px)");
12 shouldBeEqualToString("getComputedStyle(t1).color", "rgb(0, 128, 0)");
13 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698