OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> |
| 3 <style id="testsheet"> |
| 4 p { color: green } |
| 5 .nomatch { color: red } |
| 6 </style> |
| 7 <p>This text should be green</p> |
| 8 <script> |
| 9 description("Should not be allowed to set selectorText with unknown namespace"); |
| 10 |
| 11 var green = "rgb(0, 128, 0)"; |
| 12 var p = document.querySelector("p"); |
| 13 var sheet = document.querySelector("#testsheet").sheet; |
| 14 shouldBe("getComputedStyle(p).color", "green"); |
| 15 |
| 16 sheet.cssRules[1].selectorText = "bogus|p"; |
| 17 |
| 18 shouldBeEqualToString("sheet.cssRules[1].selectorText", ".nomatch"); |
| 19 shouldBe("getComputedStyle(p).color", "green"); |
| 20 </script> |
OLD | NEW |