Package com.google.gwt.libideas.resources.css.ast

Examples of com.google.gwt.libideas.resources.css.ast.CssStylesheet


* Tests the CssNodeCloner utility class.
*/
public class CssNodeClonerTest extends CssTestCase {

  public void testClone() throws UnableToCompleteException {
    CssStylesheet sheet = GenerateCssAst.exec(TreeLogger.NULL,
        new URL[] {getClass().getClassLoader().getResource(
            "com/google/gwt/libideas/resources/client/test.css")});

    CssStylesheet cloned = CssNodeCloner.clone(CssStylesheet.class, sheet);

    assertNotSame(sheet, cloned);
    assertNoAliasing(cloned);
  }
View Full Code Here


    assertNotSame(sheet, cloned);
    assertNoAliasing(cloned);
  }

  public void testCloneList() throws UnableToCompleteException {
    CssStylesheet sheet = GenerateCssAst.exec(TreeLogger.NULL,
        new URL[] {getClass().getClassLoader().getResource(
            "com/google/gwt/libideas/resources/client/test.css")});

    List<CssNode> cloned = CssNodeCloner.clone(CssNode.class, sheet.getNodes());

    assertEquals(sheet.getNodes().size(), cloned.size());

    for (CssNode node : cloned) {
      assertNoAliasing(node);
    }
  }
View Full Code Here

   * order by the specified visitors, and a golden-output file.
   */
  private static void test(TreeLogger logger, URL test, URL expected,
      CssVisitor... visitors) throws UnableToCompleteException {

    CssStylesheet expectedSheet = null;
    CssStylesheet testSheet = null;

    try {
      expectedSheet = GenerateCssAst.exec(logger, new URL[] {expected});
      testSheet = GenerateCssAst.exec(logger, new URL[] {test});
    } catch (UnableToCompleteException e) {
View Full Code Here

      logger.log(TreeLogger.ERROR, "Return type must be an interface");
      throw new UnableToCompleteException();
    }

    // Create the AST and do a quick scan for requirements
    CssStylesheet sheet = GenerateCssAst.exec(logger, resources);
    stylesheetMap.put(method, sheet);
    (new RequirementsCollector(logger, requirements)).accept(sheet);
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.libideas.resources.css.ast.CssStylesheet

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.