File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed
tests/org.eclipse.e4.ui.tests.css.core/src/org/eclipse/e4/ui/tests/css/core/parser Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change 1515package org .eclipse .e4 .ui .tests .css .core .parser ;
1616
1717import static org .junit .jupiter .api .Assertions .assertEquals ;
18+ import static org .junit .jupiter .api .Assertions .assertFalse ;
1819import static org .junit .jupiter .api .Assertions .assertNotNull ;
20+ import static org .junit .jupiter .api .Assertions .assertTrue ;
1921
2022import org .eclipse .e4 .ui .tests .css .core .util .ParserTestUtil ;
21- import org .junit .jupiter .api .Disabled ;
2223import org .junit .jupiter .api .Test ;
23- import org .w3c .dom .css .CSSRuleList ;
2424import org .w3c .dom .css .CSSStyleSheet ;
2525
2626/**
2929public class MediaRulesTest {
3030
3131 @ Test
32- @ Disabled ("//THIS TEST KNOWN TO FAIL Dec 16/08" )
3332 void testMediaRule () throws Exception {
3433 String css = """
35- @media screen, print {
36- BODY { line-height: 1.2 }
37- }
38- Label { background-color: #FF0000 }""" ;
34+ @media screen, print {
35+ BODY { line-height: 1.2 }
36+ }
37+ Label { background-color: #FF0000 }""" ;
3938 CSSStyleSheet styleSheet = ParserTestUtil .parseCss (css );
4039 assertNotNull (styleSheet );
41- CSSRuleList rules = styleSheet .getCssRules ();
42-
43-
44- assertEquals (1 , rules .getLength ());
40+ assertEquals (2 , styleSheet .getCssRules ().getLength ());
41+ assertFalse (styleSheet .getCssRules ().item (0 ).getCssText ().contains ("line-height" ));
42+ assertTrue (styleSheet .getCssRules ().item (1 ).getCssText ().contains ("background-color" ));
4543 }
4644}
You can’t perform that action at this time.
0 commit comments