]> source.dussan.org Git - vaadin-framework.git/commitdiff
Separated test cases, added double components
authorMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 8 Dec 2008 11:59:09 +0000 (11:59 +0000)
committerMatti Tahvonen <matti.tahvonen@itmill.com>
Mon, 8 Dec 2008 11:59:09 +0000 (11:59 +0000)
svn changeset:6115/svn branch:trunk

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

index 76eb590724c8a739682a0faa973ea131194ff4f7..7eddbc983eaa5d8ec7091802239f5d11e36604d4 100644 (file)
@@ -1,10 +1,7 @@
 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
@@ -25,16 +22,11 @@ public class Ticket2287 extends Ticket2292 {
                 + "/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
+        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
     }\r
 }
\ No newline at end of file
diff --git a/src/com/itmill/toolkit/tests/tickets/Ticket2297.java b/src/com/itmill/toolkit/tests/tickets/Ticket2297.java
new file mode 100644 (file)
index 0000000..48584a9
--- /dev/null
@@ -0,0 +1,41 @@
+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 Ticket2297 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
+        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
+\r
+            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