@@ -0,0 +1,1450 @@
+package com.itmill.toolkit.tests.tickets;%0D%0A%0D%0Aimport java.io.ByteArrayInputStream;%0D%0Aimport java.io.IOException;%0D%0Aimport java.net.URL;%0D%0A%0D%0Aimport com.itmill.toolkit.ui.CustomLayout;%0D%0Aimport com.itmill.toolkit.ui.Label;%0D%0Aimport com.itmill.toolkit.ui.Window;%0D%0A%0D%0Apublic class Ticket2287 extends Ticket2292 %7B%0D%0A%0D%0A    public void init() %7B%0D%0A        final Window main = new Window(getClass().getName().substring(%0D%0A                getClass().getName().lastIndexOf(%22.%22) + 1));%0D%0A        setMainWindow(main);%0D%0A        URL url = getURL();%0D%0A        main%0D%0A                .addComponent(new Label(%0D%0A                        %22Icon is built by servlet with a slow method, so it will show the bug (components not firing requestLayout).%22));%0D%0A%0D%0A        Label l = new Label();%0D%0A        l.setContentMode(Label.CONTENT_XHTML);%0D%0A        l.setValue(%22This is a label with as slow image. %3Cimg src=%5C%22%22 + url%0D%0A                + %22/icon.png%5C%22 /%3E%22);%0D%0A        main.addComponent(l);%0D%0A%0D%0A        try %7B%0D%0A            CustomLayout cl = new CustomLayout(%0D%0A                    new ByteArrayInputStream(%0D%0A                            (%22This is an empty CustomLayout with as slow image. %3Cimg src=%5C%22%22%0D%0A                                    + url.toString() + %22/icon.png%5C%22 /%3E%22)%0D%0A                                    .getBytes()));%0D%0A            main.addComponent(cl);%0D%0A        %7D catch (IOException e) %7B%0D%0A            // TODO Auto-generated catch block%0D%0A            e.printStackTrace();%0D%0A        %7D%0D%0A    %7D%0D%0A%7D

test case for #2287 and #2297