@@ -0,0 +1,1320 @@
+package com.itmill.toolkit.tests.tickets;%0D%0A%0D%0Aimport java.io.ByteArrayInputStream;%0D%0Aimport java.io.IOException;%0D%0A%0D%0Aimport com.itmill.toolkit.Application;%0D%0Aimport com.itmill.toolkit.ui.CustomLayout;%0D%0Aimport com.itmill.toolkit.ui.Label;%0D%0Aimport com.itmill.toolkit.ui.OrderedLayout;%0D%0Aimport com.itmill.toolkit.ui.Window;%0D%0A%0D%0Apublic class Ticket2303 extends Application %7B%0D%0A%0D%0A    @Override%0D%0A    public void init() %7B%0D%0A        Window w = new Window(%22main window%22);%0D%0A%0D%0A        String customlayout = %22%3Cdiv location=%5C%22test%5C%22%3E%3C/div%3E%22;%0D%0A        CustomLayout cl = null;%0D%0A        try %7B%0D%0A            cl = new CustomLayout(new ByteArrayInputStream(customlayout%0D%0A                    .getBytes()));%0D%0A        %7D catch (IOException e) %7B%0D%0A            // TODO Auto-generated catch block%0D%0A            e.printStackTrace();%0D%0A        %7D%0D%0A        cl.setWidth(%22100%25%22);%0D%0A        w.setLayout(cl);%0D%0A%0D%0A        // VerticalLayout ol = new VerticalLayout();%0D%0A        // w.setLayout(ol);%0D%0A        OrderedLayout hugeLayout = new OrderedLayout();%0D%0A        hugeLayout.setMargin(true);%0D%0A        hugeLayout.setSpacing(true);%0D%0A        for (int i = 0; i %3C 30; i++) %7B%0D%0A            hugeLayout.addComponent(new Label(%22huge %22 + i));%0D%0A        %7D%0D%0A        cl.addComponent(hugeLayout, %22test%22);%0D%0A        // ol.addComponent(hugeLayout);%0D%0A        setMainWindow(w);%0D%0A    %7D%0D%0A%0D%0A%7D%0D%0A

Test case for #2303