Esempio n. 1
0
 public void testWest() {
   Widget west = root.getWidget(1);
   assertEquals(com.google.gwt.user.client.ui.DockPanel.WEST, root.getWidgetDirection(west));
   assertEquals(HTML.class, west.getClass());
   String html = ((HTML) west).getHTML();
   assertTrue(html.contains("side bar"));
 }
Esempio n. 2
0
  public void testCenter() {
    // TODO(rjrjr) More of a test of HTMLPanelParser

    Widget center = getCenter();
    assertEquals(com.google.gwt.user.client.ui.DockPanel.CENTER, root.getWidgetDirection(center));
    assertEquals(HTMLPanel.class, center.getClass());
    String html = center.getElement().getInnerHTML();
    assertTrue(html.contains("main area"));
    assertTrue(html.contains("Button with"));
    assertTrue(html.contains("Of course"));

    assertEquals(center, widgetUi.myButton.getParent());
  }
Esempio n. 3
0
 public void testNorth() {
   Widget north = root.getWidget(0);
   assertEquals(com.google.gwt.user.client.ui.DockPanel.NORTH, root.getWidgetDirection(north));
   assertEquals(HTML.class, north.getClass());
   assertTrue(((HTML) north).getHTML().contains("Title area"));
 }