]> source.dussan.org Git - vaadin-framework.git/commitdiff
test case for #2287 and #2297
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 8 Dec 2008 10:51:47 +0000 (10:51 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 8 Dec 2008 10:51:47 +0000 (10:51 +0000)
svn changeset:6114/svn branch:trunk

src/com/itmill/toolkit/tests/tickets/Ticket2287.java [new file with mode: 0644]

diff --git a/src/com/itmill/toolkit/tests/tickets/Ticket2287.java b/src/com/itmill/toolkit/tests/tickets/Ticket2287.java
new file mode 100644 (file)
index 0000000..76eb590
--- /dev/null
@@ -0,0 +1,40 @@
+package com.itmill.toolkit.tests.tickets;\r
+\r
+import java.io.ByteArrayInputStream;\r
+import java.io.IOException;\r
+import java.net.URL;\r
+\r
+import com.itmill.toolkit.ui.CustomLayout;\r
+import com.itmill.toolkit.ui.Label;\r
+import com.itmill.toolkit.ui.Window;\r
+\r
+public class Ticket2287 extends Ticket2292 {\r
+\r
+    public void init() {\r
+        final Window main = new Window(getClass().getName().substring(\r
+                getClass().getName().lastIndexOf(".") + 1));\r
+        setMainWindow(main);\r
+        URL url = getURL();\r
+        main\r
+                .addComponent(new Label(\r
+                        "Icon is built by servlet with a slow method, so it will show the bug (components not firing requestLayout)."));\r
+\r
+        Label l = new Label();\r
+        l.setContentMode(Label.CONTENT_XHTML);\r
+        l.setValue("This is a label with as slow image. <img src=\"" + url\r
+                + "/icon.png\" />");\r
+        main.addComponent(l);\r
+\r
+        try {\r
+            CustomLayout cl = new CustomLayout(\r
+                    new ByteArrayInputStream(\r
+                            ("This is an empty CustomLayout with as slow image. <img src=\""\r
+                                    + url.toString() + "/icon.png\" />")\r
+                                    .getBytes()));\r
+            main.addComponent(cl);\r
+        } catch (IOException e) {\r
+            // TODO Auto-generated catch block\r
+            e.printStackTrace();\r
+        }\r
+    }\r
+}
\ No newline at end of file