Exemplo n.º 1
0
 public void suppressedForIEfail_testNonXmlEntities() {
   // This fragment includes both translated and non-translated strings
   ParagraphElement mainParagraph = widgetUi.main;
   final String innerHTML = mainParagraph.getInnerHTML().trim();
   assertTrue(innerHTML.contains(" \u261E \u2022 XHTML \u2022 \u261C"));
   assertTrue(innerHTML.startsWith("\u261E&nbsp;<span>"));
   assertTrue(innerHTML.endsWith("</span>&nbsp;\u261C"));
 }
Exemplo n.º 2
0
  public void testPrivateStylesFromInlineCss() {
    ParagraphElement p = widgetUi.reallyPrivateStyleParagraph;
    assertTrue("Some kind of class should be set", p.getClassName().length() > 0);
    assertFalse(
        "Should be a different style than privateStyleParagraph's",
        widgetUi.privateStyleParagraph.getClassName().equals(p.getClassName()));

    assertTrue(
        "Some kind of class should be set",
        widgetUi.totallyPrivateStyleSpan.getClassName().length() > 0);
  }
Exemplo n.º 3
0
 public void suppressedForSafari3Fail_testDomTextNoMessageWithFunnyChars() {
   ParagraphElement p = widgetUi.funnyCharsParagraph;
   // WebKit does \n replace thing, so let's do it everywhere
   String t = StringCase.toLower(p.getInnerHTML().replace("\n", " "));
   String expected =
       "Templates can be marked up for <b>localization</b>, which presents alls "
           + "kinds of exciting opportunities for bugs related to character escaping. "
           + "Consider these funny characters \\ \" \" ' ' &amp; &lt; &gt; &gt; { }, and "
           + "the various places they might make your life miserable, like this "
           + "untranslated paragraph.";
   expected = StringCase.toLower(expected);
   assertEquals(expected, t);
 }
Exemplo n.º 4
0
 private void createComment(ArtifactCommentBean commentBean) {
   ParagraphElement pElement = Document.get().createPElement();
   pElement.setInnerHTML(commentBean.toString());
   add(HTMLPanel.wrap(pElement));
 }
Exemplo n.º 5
0
 public void displayInstruction(String instruction, boolean isError) {
   toggleErrorStyle(isError);
   instructions.setInnerText(instruction);
 }
Exemplo n.º 6
0
 public ImageDropZone() {
   setWidget(BINDER.createAndBindUi(this));
   instructions.setInnerText(MESSAGES.maximumFileSize());
 }
Exemplo n.º 7
0
 public void testPrivateStyleFromExternalCss() {
   ParagraphElement p = widgetUi.privateStyleParagraph;
   assertTrue("Some kind of class should be set", p.getClassName().length() > 0);
 }
Exemplo n.º 8
0
 public void testDomAttributeNoMessageWithFunnyChars() {
   ParagraphElement p = widgetUi.funnyCharsDomAttributeParagraph;
   String t = p.getAttribute("title");
   assertEquals("funny characters \\ \" ' ' & < > > { }", t);
 }