Package com.google.gwt.query.client.impl

Examples of com.google.gwt.query.client.impl.SelectorEngineImpl.select()


  public void testUnique() {
    SelectorEngineImpl selSizz = new SelectorEngineSizzle();
    GQuery g = $(e).html("<div><p></p><p></p><span></span><p></p>");
    JsNodeArray a;
    a = selSizz.select("p", e).cast();
    assertEquals(3, a.getLength());
    a.addNode(a.getNode(0));
    a.addNode(a.getNode(3));
    assertEquals(5, a.getLength());
    a = g.unique(a);
View Full Code Here


  public void testUnique() {
    SelectorEngineImpl selSizz = new SelectorEngineSizzleGwt();
    $(e).html(getTestContent());

    JsArray<Element> a;
    a = selSizz.select("p", e).cast();
    int n = a.length();
    assertTrue(n > 300);
    for (int i=0; i<n; i++) {
      a.push(a.get(i));
    }
View Full Code Here

    // FIXME: this fails when running in iframe since 2.5.0
//    assertArrayContains(selector + " - (selSizz)", selSizz.select(selector, elem).getLength(), array);
//    assertArrayContains(selector + " - (selSizzGwt) ", selSizzGwt.select(selector, elem).getLength(), array);
    assertArrayContains(selector + " - (selJS)", selJS.select(selector, elem).getLength(), array);
    if (hasNativeSelector()) {
      assertArrayContains(selector + " - (selNative)", selNative.select(selector, elem).getLength(), array);
    }
    assertArrayContains(selector + " - (selXpath)", selXpath.select(selector, elem).getLength(), array);
    assertArrayContains(selector + " - (selC2X)", selC2X.select(selector, elem).getLength(), array);
  }
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.