Examples of PluginCompiler


Examples of com.google.caja.plugin.PluginCompiler

    assertContains(js, "'precajoled': 'cached:dalmatian false'");
    assertNoWarnings();
  }

  public final void testMinified() throws Exception {
    PluginCompiler compiler = makeCompiler(true);
    addHtml(compiler,
        "<script src='data:banana'></script>"
        + "<script src='data:capricorn'></script>"
        + "<script>cached:dalmatian</script>");
    assertTrue(compiler.run());
    String js = render(compiler.getJavascript());
    assertContains(js, "'precajoled': 'data:banana true'");
    assertContains(js, "'precajoled': 'data:capricorn true'");
    assertContains(js, "'precajoled': 'cached:dalmatian true'");
    assertNoWarnings();
  }
View Full Code Here

Examples of com.google.caja.plugin.PluginCompiler

  private PluginCompiler makeCompiler(boolean minify) {
    PluginMeta meta = new PluginMeta(
        UriFetcher.NULL_NETWORK, UriPolicy.IDENTITY);
    meta.setPrecajoleMap(new MockPrecajoleMap());
    meta.setPrecajoleMinify(minify);
    PluginCompiler compiler = new PluginCompiler(
        TestBuildInfo.getInstance(), meta, mq);
    compiler.setMessageContext(mc);
    return compiler;
  }
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.