| Index: third_party/WebKit/LayoutTests/fast/css/access-namespace-rule-after-delete-rule.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/css/access-namespace-rule-after-delete-rule.html b/third_party/WebKit/LayoutTests/fast/css/access-namespace-rule-after-delete-rule.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..edc3e1ec20a35d5b074cda362fc9bf82abcac0da
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/css/access-namespace-rule-after-delete-rule.html
|
| @@ -0,0 +1,27 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../resources/testharness.js"></script>
|
| +<script src="../../resources/testharnessreport.js"></script>
|
| +
|
| +<style>@namespace a "a"; div { }</style>
|
| +<style>@namespace a "a"; div { }</style>
|
| +
|
| +<script>
|
| +
|
| +test(function() {
|
| + document.styleSheets[0].deleteRule(1);
|
| + assert_equals(document.styleSheets[0].cssRules.length, 1);
|
| + var rule = document.styleSheets[0].cssRules[0];
|
| + assert_equals(rule.type, CSSRule.NAMESPACE_RULE);
|
| + assert_equals(rule.namespaceURI, 'a');
|
| +
|
| + // The other stylesheet should not be affected.
|
| + assert_equals(document.styleSheets[1].cssRules.length, 2);
|
| + var rule1 = document.styleSheets[1].cssRules[0];
|
| + assert_equals(rule1.type, CSSRule.NAMESPACE_RULE);
|
| + assert_equals(rule1.namespaceURI, 'a');
|
| + var rule2 = document.styleSheets[1].cssRules[1];
|
| + assert_equals(rule2.type, CSSRule.STYLE_RULE);
|
| + assert_equals(rule2.selectorText, 'div');
|
| +}, 'Access namespace rule after deleting child rule');
|
| +
|
| +</script>
|
|
|