Package org.apache.shindig.gadgets.parse

Examples of org.apache.shindig.gadgets.parse.DefaultHtmlSerializer


  // Fails due to non-existent mail classes referenced in caja
  // @Test
  public void testIncludedURLRequestMarkedInternal() throws Exception {
    CacheProvider lru = new LruCacheProvider(3);
    DefaultHtmlSerializer defaultSerializer = new DefaultHtmlSerializer();
    CapturingPipeline pipeline = new CapturingPipeline();
    rewriter = new CajaContentRewriter(lru, pipeline, defaultSerializer, proxyUriManager) {
      @Override
      protected PluginCompiler makePluginCompiler(PluginMeta m, MessageQueue q) {
        BuildInfo bi = EasyMock.createNiceMock(BuildInfo.class);
View Full Code Here


  private String serialize(Node node) throws IOException {
    StringBuilder sb = new StringBuilder();
    NodeList children = node.getChildNodes();
    for (int i = 0; i < children.getLength(); i++) {
      Node child = children.item(i);
      new DefaultHtmlSerializer().serialize(child, sb);
    }
    return sb.toString();
  }
View Full Code Here

    assertEquals(CSS3_URL_STR, concatUri.getQueryParameter("3"));

    // Verify serializer escape '&' once:
    assertFalse(concatUri.toString().contains("&amp;"));
    doc.appendChild(concatNode);
    HtmlSerializer serializer = new DefaultHtmlSerializer();
    String html = serializer.serialize(doc);
    assertTrue(html.contains(concatUri.toString().replace("&", "&amp;")));
    serializer = new CajaHtmlSerializer();
    html = serializer.serialize(doc);
    assertTrue(html.contains(concatUri.toString().replace("&", "&amp;")));
  }
View Full Code Here

    // Disabling neko for now
    parsers = ImmutableList.of(/*neko, */caja);

    CacheProvider lru = new LruCacheProvider(3);
    RequestPipeline pipeline = EasyMock.createNiceMock(RequestPipeline.class);
    DefaultHtmlSerializer defaultSerializer = new DefaultHtmlSerializer();
    proxyUriManager = EasyMock.createNiceMock(ProxyUriManager.class);
    rewriter = new CajaContentRewriter(lru, pipeline, defaultSerializer, proxyUriManager) {
      @Override
      protected PluginCompiler makePluginCompiler(PluginMeta m, MessageQueue q) {
        BuildInfo bi = EasyMock.createNiceMock(BuildInfo.class);
View Full Code Here

  // Fails due to non-existent mail classes referenced in caja
  // @Test
  public void testIncludedURLRequestMarkedInternal() throws Exception {
    CacheProvider lru = new LruCacheProvider(3);
    DefaultHtmlSerializer defaultSerializer = new DefaultHtmlSerializer();
    CapturingPipeline pipeline = new CapturingPipeline();
    rewriter = new CajaContentRewriter(lru, pipeline, defaultSerializer, proxyUriManager) {
      @Override
      protected PluginCompiler makePluginCompiler(PluginMeta m, MessageQueue q) {
        BuildInfo bi = EasyMock.createNiceMock(BuildInfo.class);
View Full Code Here

    // Disabling neko for now
    parsers = ImmutableList.of(/*neko, */caja);

    CacheProvider lru = new LruCacheProvider(3);
    RequestPipeline pipeline = EasyMock.createNiceMock(RequestPipeline.class);
    DefaultHtmlSerializer defaultSerializer = new DefaultHtmlSerializer();
    proxyUriManager = EasyMock.createNiceMock(ProxyUriManager.class);
    rewriter = new CajaContentRewriter(lru, pipeline, defaultSerializer, proxyUriManager) {
      @Override
      protected PluginCompiler makePluginCompiler(PluginMeta m, MessageQueue q) {
        BuildInfo bi = EasyMock.createNiceMock(BuildInfo.class);
View Full Code Here

  // Fails due to non-existent mail classes referenced in caja
  // @Test
  public void testIncludedURLRequestMarkedInternal() throws Exception {
    CacheProvider lru = new LruCacheProvider(3);
    DefaultHtmlSerializer defaultSerializer = new DefaultHtmlSerializer();
    CapturingPipeline pipeline = new CapturingPipeline();
    rewriter = new CajaContentRewriter(lru, pipeline, defaultSerializer, proxyUriManager) {
      @Override
      protected PluginCompiler makePluginCompiler(PluginMeta m, MessageQueue q) {
        BuildInfo bi = EasyMock.createNiceMock(BuildInfo.class);
View Full Code Here

  private String serialize(Node node) throws IOException {
    StringBuilder sb = new StringBuilder();
    NodeList children = node.getChildNodes();
    for (int i = 0; i < children.getLength(); i++) {
      Node child = children.item(i);
      new DefaultHtmlSerializer().serialize(child, sb);
    }
    return sb.toString();
  }
View Full Code Here

  private String serialize(Node node) throws IOException {
    StringBuilder sb = new StringBuilder();
    NodeList children = node.getChildNodes();
    for (int i = 0; i < children.getLength(); i++) {
      Node child = children.item(i);
      new DefaultHtmlSerializer().serialize(child, sb);
    }
    return sb.toString();
  }
View Full Code Here

    assertEquals(CSS3_URL_STR, concatUri.getQueryParameter("3"));

    // Verify serializer escape '&' once:
    assertFalse(concatUri.toString().contains("&amp;"));
    doc.appendChild(concatNode);
    HtmlSerializer serializer = new DefaultHtmlSerializer();
    String html = serializer.serialize(doc);
    assertTrue(html.contains(concatUri.toString().replace("&", "&amp;")));
    serializer = new CajaHtmlSerializer();
    html = serializer.serialize(doc);
    assertTrue(html.contains(concatUri.toString().replace("&", "&amp;")));
  }
View Full Code Here

TOP

Related Classes of org.apache.shindig.gadgets.parse.DefaultHtmlSerializer

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.