use of com.google.gwt.user.client.ui.AbstractImagePrototype in project gwt-test-utils by gwt-test-utils.
the class MenuBarImagesTest method createImage.
@Test
public void createImage() {
// Given
AbstractImagePrototype proto = menuBarImages.menuBarSubMenuIcon();
// When
Image image = proto.createImage();
// Then
assertThat(image.getUrl()).isEqualTo("http://127.0.0.1:8888/gwt_test_utils_module/menuBarSubMenuIcon.gif");
}
use of com.google.gwt.user.client.ui.AbstractImagePrototype in project gwt-test-utils by gwt-test-utils.
the class MenuBarImagesTest method getHTML.
@Test
public void getHTML() {
// Given
AbstractImagePrototype proto = menuBarImages.menuBarSubMenuIcon();
// When
String html = proto.getHTML();
// Then
assertThat(html).isEqualTo("<img onload='this.__gwtLastUnhandledEvent=\"load\";' src='http://127.0.0.1:8888/gwt_test_utils_module/clear.cache.gif' style='width:0.0px;height:0.0px;background:url(http://127.0.0.1:8888/gwt_test_utils_module/menuBarSubMenuIcon.gif) no-repeat 0px 0px;' border='0'>");
}
use of com.google.gwt.user.client.ui.AbstractImagePrototype in project gwt-test-utils by gwt-test-utils.
the class MenuBarImagesTest method checkToString.
@Test
public void checkToString() {
// Given
AbstractImagePrototype proto = menuBarImages.menuBarSubMenuIcon();
// When & Then
assertThat(proto.toString()).isNotNull();
}
use of com.google.gwt.user.client.ui.AbstractImagePrototype in project gwt-test-utils by gwt-test-utils.
the class MenuBarImagesTest method createElement.
@Test
public void createElement() {
// Given
AbstractImagePrototype proto = menuBarImages.menuBarSubMenuIcon();
// When
ImagePrototypeElement element = proto.createElement();
// Then
assertThat(element.getTagName()).isEqualTo("IMG");
assertThat(element.toString()).isEqualTo("<img onload=\"this.__gwtLastUnhandledEvent=\"load\";\" src=\"http://127.0.0.1:8888/gwt_test_utils_module/clear.cache.gif\" style=\"width: 0px; height: 0px; background:url(http://127.0.0.1: 8888/gwt_test_utils_module/menuBarSubMenuIcon.gif) no-repeat 0px 0px; \" border=\"0\"></img>");
}
Aggregations