|
69 | 69 | import io.sf.carte.doc.style.css.nsac.Condition; |
70 | 70 | import io.sf.carte.doc.style.css.nsac.Condition.ConditionType; |
71 | 71 | import io.sf.carte.doc.style.css.nsac.ConditionalSelector; |
| 72 | +import io.sf.carte.doc.style.css.nsac.DeclarationCondition; |
72 | 73 | import io.sf.carte.doc.style.css.nsac.ElementSelector; |
73 | 74 | import io.sf.carte.doc.style.css.nsac.LexicalUnit; |
74 | | -import io.sf.carte.doc.style.css.nsac.Parser; |
75 | 75 | import io.sf.carte.doc.style.css.nsac.LexicalUnit.LexicalType; |
| 76 | +import io.sf.carte.doc.style.css.nsac.Parser; |
76 | 77 | import io.sf.carte.doc.style.css.nsac.Selector; |
77 | 78 | import io.sf.carte.doc.style.css.nsac.Selector.SelectorType; |
78 | 79 | import io.sf.carte.doc.style.css.nsac.SelectorList; |
|
86 | 87 | import io.sf.carte.doc.style.css.om.StyleRule; |
87 | 88 | import io.sf.carte.doc.style.css.om.StyleSheetList; |
88 | 89 | import io.sf.carte.doc.style.css.om.SupportsRule; |
89 | | -import io.sf.carte.doc.style.css.parser.DeclarationCondition; |
90 | 90 | import io.sf.carte.doc.style.css.parser.SyntaxParser; |
91 | 91 | import io.sf.carte.doc.style.css.property.LexicalValue; |
92 | 92 | import io.sf.carte.doc.style.css.property.NumberValue; |
@@ -747,13 +747,13 @@ public void testUsageSupportsCondition() throws Exception { |
747 | 747 | assertEquals("display", predName); |
748 | 748 |
|
749 | 749 | // Now obtain the value |
750 | | - CSSValue value = dCond.getValue(); |
751 | | - Type priType = value.getPrimitiveType(); |
752 | | - // It is a Type.IDENT |
753 | | - assertEquals(Type.IDENT, priType); |
| 750 | + LexicalUnit value = dCond.getValue(); |
| 751 | + LexicalUnit.LexicalType luType = value.getLexicalUnitType(); |
| 752 | + // It is a IDENT |
| 753 | + assertEquals(LexicalUnit.LexicalType.IDENT, luType); |
754 | 754 |
|
755 | | - // IDENT is a TYPED value, so we can cast and get the string value |
756 | | - String condValue = ((CSSTypedValue) value).getStringValue(); |
| 755 | + // Get the string value |
| 756 | + String condValue = value.getStringValue(); |
757 | 757 | // It is "flex" |
758 | 758 | assertEquals("flex", condValue); |
759 | 759 | } |
|
0 commit comments