Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(275)

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css/access-namespace-rule-after-delete-rule.html

Issue 2459843002: Copy m_namespaceRules when copying StyleSheetContents to avoid crashing. (Closed)
Patch Set: Rename test, move comment Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/StyleRule.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/StyleRule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698