use of com.helger.commons.io.stream.NonBlockingStringReader in project ph-css by phax.
the class ParserCSS30Test method test2.
@Test
public void test2() throws ParseException {
final ParserCSS30TokenManager aTokenHdl = new ParserCSS30TokenManager(new CSSCharStream(new NonBlockingStringReader(CSS2)));
aTokenHdl.setDebugStream(System.out);
final ParserCSS30 aParser = new ParserCSS30(aTokenHdl);
aParser.disable_tracing();
final CSSNode aNode = aParser.styleSheet();
assertNotNull(aNode);
final CascadingStyleSheet aCSS = CSSHandler.readCascadingStyleSheetFromNode(ECSSVersion.CSS30, aNode, CSSReader.getDefaultInterpretErrorHandler());
assertNotNull(aCSS);
for (final ICSSTopLevelRule aTopLevelRule : aCSS.getAllFontFaceRules()) assertTrue(aCSS.removeRule(aTopLevelRule).isChanged());
}
Aggregations