Separated test cases, added double components

svn changeset:6115/svn branch:trunk
This commit is contained in:
Matti Tahvonen 2008-12-08 11:59:09 +00:00
parent aabb83ade2
commit 69def2f010
2 changed files with 47 additions and 14 deletions

View File

@ -1,10 +1,7 @@
package com.itmill.toolkit.tests.tickets;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.net.URL;
import com.itmill.toolkit.ui.CustomLayout;
import com.itmill.toolkit.ui.Label;
import com.itmill.toolkit.ui.Window;
@ -25,16 +22,11 @@ public class Ticket2287 extends Ticket2292 {
+ "/icon.png\" />");
main.addComponent(l);
try {
CustomLayout cl = new CustomLayout(
new ByteArrayInputStream(
("This is an empty CustomLayout with as slow image. <img src=\""
+ url.toString() + "/icon.png\" />")
.getBytes()));
main.addComponent(cl);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
l = new Label();
l.setContentMode(Label.CONTENT_XHTML);
l.setValue("This is a label with as slow image. <img src=\"" + url
+ "/icon.png\" />");
main.addComponent(l);
}
}

View File

@ -0,0 +1,41 @@
package com.itmill.toolkit.tests.tickets;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.net.URL;
import com.itmill.toolkit.ui.CustomLayout;
import com.itmill.toolkit.ui.Label;
import com.itmill.toolkit.ui.Window;
public class Ticket2297 extends Ticket2292 {
public void init() {
final Window main = new Window(getClass().getName().substring(
getClass().getName().lastIndexOf(".") + 1));
setMainWindow(main);
URL url = getURL();
main
.addComponent(new Label(
"Icon is built by servlet with a slow method, so it will show the bug (components not firing requestLayout)."));
try {
CustomLayout cl = new CustomLayout(
new ByteArrayInputStream(
("This is an empty CustomLayout with as slow image. <img src=\""
+ url.toString() + "/icon.png\" />")
.getBytes()));
main.addComponent(cl);
cl = new CustomLayout(
new ByteArrayInputStream(
("This is an empty CustomLayout with as slow image. <img src=\""
+ url.toString() + "/icon.png\" />")
.getBytes()));
main.addComponent(cl);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}