Package com.google.caja.parser.quasiliteral

Examples of com.google.caja.parser.quasiliteral.ModuleManager


        }
        return result;
      }
    };

    ModuleManager moduleMgr = new ModuleManager(
        jobs.getPluginMeta(), buildInfo, jobs.getPluginMeta().getUriFetcher(),
        jobs.getMessageQueue());
    new PipelineMaker(
        cssSchema, htmlSchema, moduleMgr, jobCache, preconditions, goals)
        .populate(compilationPipeline.getStages());
View Full Code Here


    private CajoledModule cajole(String text, String name) {
      MessageQueue mq = new EchoingMessageQueue(
          new PrintWriter(System.err), new MessageContext(), false);
      PluginMeta pm = new PluginMeta();
      pm.setPrecajoleMap(null);
      ModuleManager mgr = new ModuleManager(
          pm, BuildInfo.getInstance(),
          UriFetcher.NULL_NETWORK, mq);
      UncajoledModule input = uncajoled(text, name, mq);

      // TODO(felix8a): maybe should use compilation pipeline
View Full Code Here

            MessagePart.Factory.valueOf(stage.getClass().getSimpleName()));
        return super.applyStage(stage, jobs);
      }
    };

    ModuleManager moduleMgr = new ModuleManager(
        jobs.getPluginMeta(), buildInfo, jobs.getPluginMeta().getUriFetcher(),
        jobs.getMessageQueue());
    new PipelineMaker(
        cssSchema, htmlSchema, moduleMgr, jobCache, preconditions, goals)
        .populate(compilationPipeline.getStages());
View Full Code Here

  protected boolean runPipeline(Jobs jobs) throws Exception {
    Pipeline<Jobs> pl = new Pipeline<Jobs>();
    PipelineMaker plm = new PipelineMaker(
        CssSchema.getDefaultCss21Schema(mq),
        HtmlSchema.getDefault(mq),
        new ModuleManager(
            meta, TestBuildInfo.getInstance(), UriFetcher.NULL_NETWORK, mq),
        cache,
        PipelineMaker.DEFAULT_PRECONDS,
        PipelineMaker.CAJOLED_MODULES.with(PipelineMaker.HTML_SAFE_STATIC)
            .with(PipelineMaker.SANITY_CHECK)
View Full Code Here

  }

  public final void testNoPath() {
    PipelineMaker pm = new PipelineMaker(
        CssSchema.getDefaultCss21Schema(mq), HtmlSchema.getDefault(mq),
        new ModuleManager(
            new PluginMeta(), TestBuildInfo.getInstance(),
            UriFetcher.NULL_NETWORK, mq),
        new StubJobCache(), PipelineMaker.HTML, PipelineMaker.CSS);
    long t0 = System.nanoTime();
    try {
View Full Code Here

      throws Exception {

    List<Pipeline.Stage<Jobs>> stages = Lists.newArrayList();
    PipelineMaker pm = new PipelineMaker(
        CssSchema.getDefaultCss21Schema(mq), HtmlSchema.getDefault(mq),
        new ModuleManager(
            new PluginMeta(), TestBuildInfo.getInstance(),
            UriFetcher.NULL_NETWORK, mq),
        new StubJobCache(), preconds, goals);
    {
      long t0 = System.nanoTime();
View Full Code Here

        new Identifier(FilePosition.UNKNOWN, "\u00e6"));
    assertTrue(mq.hasMessageAtLevel(MessageLevel.FATAL_ERROR));
  }

  private ExpressionSanitizerCaja newPassThruSanitizer() {
    ModuleManager mgr = new ModuleManager(
        new PluginMeta(), TestBuildInfo.getInstance(),
        UriFetcher.NULL_NETWORK, mq);
    return new ExpressionSanitizerCaja(mgr, null) {
      @Override
      protected Rewriter newES53Rewriter(ModuleManager mgr) {
View Full Code Here

  }

  private void assertSanitize(String input, String golden)
      throws Exception {
    Block inputNode = js(fromString(input));
    ModuleManager mgr = new ModuleManager(
        new PluginMeta(), TestBuildInfo.getInstance(),
        UriFetcher.NULL_NETWORK, mq);
    ParseTreeNode sanitized = new ExpressionSanitizerCaja(mgr, null)
        .sanitize(inputNode);
    String inputCmp = render(sanitized);
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

TOP

Related Classes of com.google.caja.parser.quasiliteral.ModuleManager

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.