Package com.google.gxp.compiler.fs

Examples of com.google.gxp.compiler.fs.FileRef


    assertAlert(new TypeError(pos(4,5), "<call:innerCallee>", "text/javascript", "text/html"));
    assertNoUnexpectedAlerts();
  }

  public void testCall_badContentTypeForParam() throws Exception {
    FileRef callee = createFile("callee", "<gxp:param name='x' content-type='text/plain' />");
    FileRef caller = createFile("caller",
                                "<call:callee>",
                                "  <gxp:attr name='x'>",
                                "    <b>foo</b>",
                                "  </gxp:attr>",
                                "</call:callee>");
View Full Code Here


    assertAlert(new TypeError(pos(4,5), "<b>", "text/html", "text/plain"));
    assertNoUnexpectedAlerts();
  }

  public void testCall_multipleBodyAttributes() throws Exception {
    FileRef callee = createFile("callee", "<gxp:param name='body' content='*' />");
    FileRef caller = createFile("caller",
                                "<call:callee expr:body='HtmlClosures.EMPTY' />");
    compileFiles(callee, caller);
    assertNoUnexpectedAlerts();

    caller = createFile("caller",
View Full Code Here

            "</gxp:abbr>");
    assertNoUnexpectedAlerts();
  }

  public void testInCallAttrCss_text() throws Exception {
    FileRef callee = createFile("callee", "<gxp:param name='x' content-type='text/css' />");
    FileRef caller = createFile("caller",
                                "<call:callee>",
                                "  <gxp:attr name='x'>",
                                "    color: blue;",
                                "  </gxp:attr>",
                                "</call:callee>");
View Full Code Here

      }
    } catch (UnmappableCharacterException uce) {
      // These are caused by coding errors, not user error.
      throw new AssertionError(uce);
    } catch (IOException iox) {
      FileRef sourceFileRef = compilationUnit.getSourceFileRef();
      alertSink.add(new IOError(sourceFileRef, iox));
    }
    alertSink.add(new ProgressAlert(outputPosition, "Generate finished"));
  }
View Full Code Here

    codeGeneratorFactory.setDynamicModeEnabled(true);
    return codeGeneratorFactory;
  }

  public void testDynamicCompilation() throws Throwable {
    FileRef gxp = createFile("TestGxp", "hello, world!");
    compileAndLoad(gxp);

    // initial output using the statically compiled methods
    assertOutputEquals("hello, world!");
    assertCompilationCountEquals(0);
View Full Code Here

    createFile("TestGxp", "hello, world!");
    assertOutputEquals("hello, world!");
  }

  public void testDynamicCompilationDefaults() throws Throwable {
    FileRef gxp =
        createFile("TestGxp2",
                   "<gxp:param name='message' type='String' default='\"hello world\"'/>");

    compileAndLoad(gxp, String.class);
View Full Code Here

    assertDefaultEquals("message", "goodbye world");
    assertCompilationCountEquals(1);
  }

  public void testDynamicCompilationDeleteFile() throws Throwable {
    FileRef gxp = createFile("TestGxp3", "hello, world!");
    compileAndLoad(gxp);

    // initial output using the statically compiled methods
    assertOutputEquals("hello, world!");
    assertCompilationCountEquals(0);
View Full Code Here

    assertOutputEquals("hello again!");
    assertCompilationCountEquals(1);
  }

  public void testDynamicCompilationParamChange() throws Throwable {
    FileRef gxp = createFile("TestGxp4",
                             "<gxp:param name='name' type='String' />",
                             "",
                             "Hello <expr:name />!");
    compileAndLoad(gxp, String.class);
    assertOutputEquals("Hello World!", "World");
View Full Code Here

               "Hello <expr:name />!");
    assertOutputEquals("Hello Alice!", "Alice");
  }

  public void testPackagePrivate() throws Throwable {
    FileRef gxp = createFile("PackagePrivateGxp", "hello, world!");
    compileAndLoad(gxp);

    // initial output
    assertOutputEquals("hello, world!");
View Full Code Here

    createFile("PackagePrivateGxp", "<gxp:eval expr='new PackagePrivateClosure()' />");
    assertOutputEquals("private data");
  }

  public void testStackTraceRewriting() throws Throwable {
    FileRef gxp = createFile("ThrowerGxp", "<gxp:throws exception='BarException' />");
    compileAndLoad(gxp);

    // do a runtime edit to make it throw an exception
    advanceClock();
    createFile("ThrowerGxp",
View Full Code Here

TOP

Related Classes of com.google.gxp.compiler.fs.FileRef

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.