| OLD | NEW |
| (Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 |
| 5 <style>@namespace a "a"; div { }</style> |
| 6 <style>@namespace a "a"; div { }</style> |
| 7 |
| 8 <script> |
| 9 |
| 10 test(function() { |
| 11 document.styleSheets[0].deleteRule(1); |
| 12 assert_equals(document.styleSheets[0].cssRules.length, 1); |
| 13 var rule = document.styleSheets[0].cssRules[0]; |
| 14 assert_equals(rule.type, CSSRule.NAMESPACE_RULE); |
| 15 assert_equals(rule.namespaceURI, 'a'); |
| 16 |
| 17 // The other stylesheet should not be affected. |
| 18 assert_equals(document.styleSheets[1].cssRules.length, 2); |
| 19 var rule1 = document.styleSheets[1].cssRules[0]; |
| 20 assert_equals(rule1.type, CSSRule.NAMESPACE_RULE); |
| 21 assert_equals(rule1.namespaceURI, 'a'); |
| 22 var rule2 = document.styleSheets[1].cssRules[1]; |
| 23 assert_equals(rule2.type, CSSRule.STYLE_RULE); |
| 24 assert_equals(rule2.selectorText, 'div'); |
| 25 }, 'Access namespace rule after deleting child rule'); |
| 26 |
| 27 </script> |
| OLD | NEW |