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

Side by Side Diff: third_party/WebKit/LayoutTests/css3/media-cssom.html

Issue 2416893002: CSSMediaRule and CSSSupportsRule inherit from CSSConditionRule (Closed)
Patch Set: Fix layout virtual tests Created 4 years, 2 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 <html>
3 <head>
4 <title>@media CSSOM - inherited from CSSConditionRule</title>
5 <script src="../resources/testharness.js"></script>
6 <script src="../resources/testharnessreport.js"></script>
7 <style>
8 @media screen and (min-width: 480px) {
9 body { background-color: lightgreen; }
10 }
11 </style>
12 </head>
13 <body>
14 <p>Test for <a href="http://crbug.com/651792">bug 651792</a>.</p>
15 <script>
16 var rules = document.styleSheets[0].cssRules;
17 test(function(){
18 assert_equals(CSSRule.STYLE_RULE,1);
19 assert_equals(CSSRule.MEDIA_RULE,4);
20 assert_equals(rules.length, 1);
21 assert_equals(rules[0].type, 4);
22 assert_equals(rules[0].cssRules.length, 1);
23 assert_equals(rules[0].cssRules[0].type, 1);
24 assert_equals(rules[0].conditionText, "screen and (min-width: 480px)");
25 assert_equals(rules[0].cssText,
26 "@media screen and (min-width: 480px) { \n" +
27 " body { background-color: lightgreen; }\n" +
28 "}");
29 }, "@media inherited from CSSConditionRule pass.");
30 </script>
31 </body>
32 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698