File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/test/java/org/htmlunit/cssparser/dom Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 15
15
package org .htmlunit .cssparser .dom ;
16
16
17
17
import static org .junit .jupiter .api .Assertions .assertEquals ;
18
+ import static org .junit .jupiter .api .Assertions .assertNull ;
18
19
19
20
import java .io .StringReader ;
20
21
@@ -40,6 +41,18 @@ public void getCssText() throws Exception {
40
41
assertEquals ("h1 { color: blue; }" , value .toString ());
41
42
}
42
43
44
+ /**
45
+ * @throws Exception if any error occurs
46
+ */
47
+ @ Test
48
+ public void parentRule () throws Exception {
49
+ final CSSStyleRuleImpl value = parseStyleRule ("h1 { color: blue; background: green }" );
50
+ final CSSStyleDeclarationImpl style = value .getStyle ();
51
+
52
+ assertNull (value .getParentRule ());
53
+ assertEquals (value , style .getParentRule ());
54
+ }
55
+
43
56
/**
44
57
* @throws Exception if any error occurs
45
58
*/
You can’t perform that action at this time.
0 commit comments