Package com.google.caja.plugin

Examples of com.google.caja.plugin.PluginMeta


        new Executor.Input("(new Date() - benchmark.startTime)", "elapsed"));
    return elapsed.doubleValue();
  }

  private double runCajoledES53(String filename) throws Exception {
    PluginMeta meta = new PluginMeta();
    MessageQueue mq = new SimpleMessageQueue();
    PluginCompiler pc = new PluginCompiler(new TestBuildInfo(), meta, mq);
    CharProducer src = fromString(plain(fromResource(filename)));
    pc.addInput(js(src), is.getUri());
View Full Code Here


    return stream.toByteArray();
  }

  public CajoledModule es53(Block plain) {
    CajoledModule result = null;
    PluginMeta meta = new PluginMeta();
    MessageQueue mq = TestUtil.createTestMessageQueue(this.mc);
    PluginCompiler pc = new PluginCompiler(
        TestBuildInfo.getInstance(), meta, mq);
    pc.addInput(plain, null);
    if (pc.run()) {
View Full Code Here

    Node outputHtml;

    Map<InputSource, ? extends CharSequence> originalSources
        = Collections.singletonMap(new InputSource(guessURI(base, url)), input);

    PluginMeta meta = new PluginMeta(fetcher, null);
    if (opt_idClass != null && opt_idClass.length() != 0) {
      meta.setIdClass(opt_idClass);
    }
    PluginCompiler compiler = makePluginCompiler(meta, mq);
    compiler.setJobCache(new AppEngineJobCache());
    compiler.setMessageContext(mc);
View Full Code Here

    // namespace from parent.
    assertTrue(mq.getMessages().isEmpty());
  }

  private void assertFixed(String golden, Job... inputs) {
    Jobs jobs = new Jobs(mc, mq, new PluginMeta());
    for (Job input : inputs) {
      jobs.getJobs().add(JobEnvelope.of(input));
    }
    new LegacyNamespaceFixupStage().apply(jobs);
    StringBuilder sb = new StringBuilder();
View Full Code Here

  @Override
  protected boolean runPipeline(Jobs jobs) {
    return new OptimizeJavascriptStage().apply(jobs)
        && new ValidateJavascriptStage(new ModuleManager(
                new PluginMeta(), TestBuildInfo.getInstance(),
                UriFetcher.NULL_NETWORK, mq))
            .apply(jobs)
        && discardBoilerPlate(jobs);
  }
View Full Code Here

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

  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

Related Classes of com.google.caja.plugin.PluginMeta

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.