" }",
"}");
assertHierarchy(
"{this: com.google.gwt.user.client.ui.DialogBox} {this} {/setText('DialogBox')/ /setWidget(button)/}",
" {new: com.google.gwt.user.client.ui.Button} {local-unique: button} {/new Button()/ /setWidget(button)/ /button.setPixelSize(300, 200)/}");
WidgetInfo button = panel.getWidget();
// do refresh()
panel.refresh();
assertFalse(panel.isEmpty());
// check DialogBox bounds
{
Rectangle bounds = panel.getBounds();
assertThat(bounds.x).isEqualTo(0);
assertThat(bounds.y).isEqualTo(0);
assertThat(bounds.width).isEqualTo(300);
assertThat(bounds.height).isGreaterThan(200 + 20);
}
{
Image image = panel.getImage();
assertNotNull(image);
}
// check Button bounds
{
Rectangle bounds = button.getBounds();
assertThat(bounds.x).isEqualTo(0);
assertThat(bounds.y).isGreaterThan(20);
assertThat(bounds.width).isEqualTo(300);
assertThat(bounds.height).isEqualTo(200);
}