Examples of CssNode


Examples of com.google.gwt.resources.css.ast.CssNode

  public void visit_IfElifElifElse_2CssElIfAnd1CssElseInElseNodes() {
    // given
    CssIf elifNode0 = mockCssIf(0);
    CssIf elifNode1 = mockCssIf(1);
    when(elifNode0.getElseNodes()).thenReturn(Lists.<CssNode>newArrayList(elifNode1));
    CssNode elseRule = new CssRule();
    when(elifNode1.getElseNodes()).thenReturn(Lists.newArrayList(elseRule));
    elseNodes.add(elifNode0);

    // when
    elseNodeCreator.visit(cssIf, null);
View Full Code Here

Examples of com.google.gwt.resources.css.ast.CssNode

  private static CssIf findLastIfInChain(List<CssNode> nodes) {
    if (nodes.isEmpty()) {
      return null;
    }

    CssNode lastNode = nodes.get(nodes.size() - 1);
    if (lastNode instanceof CssIf) {
      CssIf asIf = (CssIf) lastNode;
      if (asIf.getElseNodes().isEmpty()) {
        return asIf;
      } else {
View Full Code Here

Examples of com.google.template.soy.soytree.CssNode

    TemplateNode template =
        (TemplateNode) SharedTestUtils.getNode(SharedTestUtils.parseSoyFiles(TEST_FILE_CONTENT));

    // Before.
    assertEquals(9, template.numChildren());
    CssNode cn1 = (CssNode) template.getChild(1);
    assertEquals("AAA", cn1.getSelectorText());
    CssNode cn7 = (CssNode) template.getChild(7);
    assertEquals("$goo", cn7.getComponentNameText());
    assertEquals("BBB", cn7.getSelectorText());

    (new RenameCssVisitor(null)).exec(template);
    (new CombineConsecutiveRawTextNodesVisitor()).exec(template);

    // After.
View Full Code Here

Examples of com.google.template.soy.soytree.CssNode

    TemplateNode template =
        (TemplateNode) SharedTestUtils.getNode(SharedTestUtils.parseSoyFiles(TEST_FILE_CONTENT));

    // Before.
    assertEquals(9, template.numChildren());
    CssNode cn1 = (CssNode) template.getChild(1);
    assertEquals("AAA", cn1.getSelectorText());
    CssNode cn7 = (CssNode) template.getChild(7);
    assertEquals("$goo", cn7.getComponentNameText());
    assertEquals("BBB", cn7.getSelectorText());

    // Use a CSS renaming map that only renames 'AAA'.
    SoyCssRenamingMap cssRenamingMap =
        new SoyCssRenamingMap() {
          @Override public String get(String key) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.