OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <style type="text/css">@media screen { }</style> | 2 <style type="text/css">@media screen { }</style> |
3 <script src="../../resources/testharness.js"></script> | 3 <script src="../../resources/testharness.js"></script> |
4 <script src="../../resources/testharnessreport.js"></script> | 4 <script src="../../resources/testharnessreport.js"></script> |
5 <div id=log></div> | 5 <div id=log></div> |
6 <script> | 6 <script> |
7 var rules = document.styleSheets[0].cssRules; | 7 var rules = document.styleSheets[0].cssRules; |
8 var mediaList = rules.item(0).media; | 8 var mediaList = rules.item(0).media; |
9 | 9 |
10 // - appendMedium() | 10 // - appendMedium() |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 assert_equals(mediaList.mediaText, "screen, tv"); | 70 assert_equals(mediaList.mediaText, "screen, tv"); |
71 // Ignored; terminate steps. | 71 // Ignored; terminate steps. |
72 }, "Add '&invalid' to 'screen, tv'"); | 72 }, "Add '&invalid' to 'screen, tv'"); |
73 | 73 |
74 test(function () { | 74 test(function () { |
75 mediaList.mediaText = "screen, tv"; | 75 mediaList.mediaText = "screen, tv"; |
76 mediaList.appendMedium("not all"); | 76 mediaList.appendMedium("not all"); |
77 assert_equals(mediaList.mediaText, "screen, tv, not all"); | 77 assert_equals(mediaList.mediaText, "screen, tv, not all"); |
78 }, "Add 'not all' to 'screen, tv'"); | 78 }, "Add 'not all' to 'screen, tv'"); |
79 | 79 |
| 80 test(function () { |
| 81 mediaList.mediaText = "screen, tv"; |
| 82 mediaList.appendMedium("#?:/"); |
| 83 assert_equals(mediaList.mediaText, "screen, tv"); |
| 84 // Ignored; terminate steps. |
| 85 }, "Add '#?:/' to 'screen, tv'"); |
| 86 |
80 // - deleteMedium() | 87 // - deleteMedium() |
81 | 88 |
82 test(function () { | 89 test(function () { |
83 mediaList.mediaText = "screen, tv, not all"; | 90 mediaList.mediaText = "screen, tv, not all"; |
84 mediaList.deleteMedium("&invalid"); | 91 mediaList.deleteMedium("&invalid"); |
85 // Ignored; terminate steps. | 92 // Ignored; terminate steps. |
86 assert_equals(mediaList.mediaText, "screen, tv, not all"); | 93 assert_equals(mediaList.mediaText, "screen, tv, not all"); |
87 }, "Remove '&invalid' from 'screen, tv, not all'"); | 94 }, "Remove '&invalid' from 'screen, tv, not all'"); |
88 | 95 |
89 test(function () { | 96 test(function () { |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 // for which comparing the media query returns true. | 141 // for which comparing the media query returns true. |
135 }, "Remove 'tv' from 'not all, not all, tv, not all'"); | 142 }, "Remove 'tv' from 'not all, not all, tv, not all'"); |
136 | 143 |
137 test(function () { | 144 test(function () { |
138 mediaList.mediaText = "tv, print, screen"; | 145 mediaList.mediaText = "tv, print, screen"; |
139 mediaList.deleteMedium("tv, print"); | 146 mediaList.deleteMedium("tv, print"); |
140 assert_equals(mediaList.mediaText, "tv, print, screen"); | 147 assert_equals(mediaList.mediaText, "tv, print, screen"); |
141 // CSSOM 4.1: Parsing media query returns none as | 148 // CSSOM 4.1: Parsing media query returns none as |
142 // there are more than one; terminate steps. | 149 // there are more than one; terminate steps. |
143 }, "Remove 'tv, print' from 'screen, tv, screen'"); | 150 }, "Remove 'tv, print' from 'screen, tv, screen'"); |
| 151 |
| 152 test(function () { |
| 153 mediaList.mediaText = "screen, tv, not all"; |
| 154 mediaList.deleteMedium("#?:/"); |
| 155 // Ignored; terminate steps. |
| 156 assert_equals(mediaList.mediaText, "screen, tv, not all"); |
| 157 }, "Remove '#?:/' from 'screen, tv, not all'"); |
144 </script> | 158 </script> |
OLD | NEW |