OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 <style> | 4 <style> |
5 .test { | 5 .test { |
6 background-color: blue; | 6 content: "UNTOUCHED"; |
7 } | 7 } |
8 | 8 |
9 @media all { | 9 @media all { |
10 @media all { | 10 @media all { |
11 @font-face { | 11 @font-face { |
12 src: local('Courier'); | 12 src: local('Courier'); |
13 font-family: Courier; | 13 font-family: Courier; |
14 } | 14 } |
15 | 15 |
16 @page :left { top: 0 } | 16 @page :left { top: 0 } |
17 | 17 |
18 #t0 { background-color: green; } | 18 #t0 { content: "APPLIED" } |
19 | 19 |
20 @import url("../../cssom/resources/import.css"); | 20 @import url("../../cssom/resources/import.css"); |
21 @charset "UTF-8"; | 21 @charset "UTF-8"; |
22 @namespace ""; | 22 @namespace ""; |
23 } | 23 } |
24 @media all { | 24 @media all { |
25 @media none { | 25 @media none { |
26 #t1 { background-color: green; } | 26 #t1 { content: "APPLIED" } |
27 } | 27 } |
28 } | 28 } |
29 } | 29 } |
30 </style> | 30 </style> |
31 <body> | 31 <body> |
32 <span id=t0 class=test></span> | 32 <span id=t0 class=test></span> |
33 <span id=t1 class=test></span> | 33 <span id=t1 class=test></span> |
34 <script> | 34 <script> |
35 description("Test nested at-rules."); | 35 description("Test nested at-rules."); |
36 | 36 |
(...skipping 13 matching lines...) Expand all Loading... |
50 shouldBe("rules[1].cssRules[0].cssRules[2].parentStyleSheet", "document.styleShe
ets[1]"); | 50 shouldBe("rules[1].cssRules[0].cssRules[2].parentStyleSheet", "document.styleShe
ets[1]"); |
51 | 51 |
52 shouldBe("rules[1].cssRules[1].type", "CSSRule.MEDIA_RULE"); | 52 shouldBe("rules[1].cssRules[1].type", "CSSRule.MEDIA_RULE"); |
53 shouldEvaluateTo("rules[1].cssRules[1].cssRules.length", 1); | 53 shouldEvaluateTo("rules[1].cssRules[1].cssRules.length", 1); |
54 shouldBe("rules[1].cssRules[1].cssRules[0].type", "CSSRule.MEDIA_RULE"); | 54 shouldBe("rules[1].cssRules[1].cssRules[0].type", "CSSRule.MEDIA_RULE"); |
55 evalAndLog("rules[1].cssRules[1].insertRule('@media all { @page :left { top: 0;
} }', 1)"); | 55 evalAndLog("rules[1].cssRules[1].insertRule('@media all { @page :left { top: 0;
} }', 1)"); |
56 shouldEvaluateTo("rules[1].cssRules[1].cssRules.length", 2); | 56 shouldEvaluateTo("rules[1].cssRules[1].cssRules.length", 2); |
57 shouldBe("rules[1].cssRules[1].cssRules[1].type", "CSSRule.MEDIA_RULE"); | 57 shouldBe("rules[1].cssRules[1].cssRules[1].type", "CSSRule.MEDIA_RULE"); |
58 shouldBe("rules[1].cssRules[1].cssRules[1].cssRules[0].type", "CSSRule.PAGE_RULE
"); | 58 shouldBe("rules[1].cssRules[1].cssRules[1].cssRules[0].type", "CSSRule.PAGE_RULE
"); |
59 | 59 |
60 shouldBeEqualToString("getComputedStyle(document.getElementById('t0')).backgroun
dColor", 'rgb(0, 128, 0)'); | 60 shouldBeEqualToString("getComputedStyle(document.getElementById('t0')).content",
'"APPLIED"'); |
61 shouldBeEqualToString("getComputedStyle(document.getElementById('t1')).backgroun
dColor", 'rgb(0, 0, 255)'); | 61 shouldBeEqualToString("getComputedStyle(document.getElementById('t1')).content",
'"UNTOUCHED"'); |
62 </script> | 62 </script> |
OLD | NEW |