From 7b25b3886ea95bc6495506fbe9472e45fcbde684 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 30 Aug 2012 17:24:36 +0300 Subject: Renamed tests -> uitest and tests/testbench -> uitest/src (#9299) --- .../src/com/vaadin/tests/tickets/Ticket1737.java | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 uitest/src/com/vaadin/tests/tickets/Ticket1737.java (limited to 'uitest/src/com/vaadin/tests/tickets/Ticket1737.java') diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket1737.java b/uitest/src/com/vaadin/tests/tickets/Ticket1737.java new file mode 100644 index 0000000000..caf44865f9 --- /dev/null +++ b/uitest/src/com/vaadin/tests/tickets/Ticket1737.java @@ -0,0 +1,51 @@ +package com.vaadin.tests.tickets; + +import com.vaadin.Application; +import com.vaadin.server.ClassResource; +import com.vaadin.server.DownloadStream; +import com.vaadin.server.Resource; +import com.vaadin.ui.Embedded; +import com.vaadin.ui.Label; +import com.vaadin.ui.Panel; +import com.vaadin.ui.UI.LegacyWindow; +import com.vaadin.ui.VerticalLayout; + +public class Ticket1737 extends Application.LegacyApplication { + + Resource slowRes = new ClassResource(Ticket1737.class, "m-bullet-blue.gif") { + @Override + public DownloadStream getStream() { + try { + Thread.sleep(4000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + return super.getStream(); + } + }; + + @Override + public void init() { + + final LegacyWindow main = new LegacyWindow(getClass().getName() + .substring(getClass().getName().lastIndexOf(".") + 1)); + setMainWindow(main); + + VerticalLayout el = new VerticalLayout(); + main.setContent(el); + + Panel p = new Panel("Test panel"); + p.setSizeFull(); + + p.addComponent(new Label( + "Second component is embedded with a slow resource " + + "and thus should break layout if Embedded cannot" + + " request re-layout after load.")); + + Embedded em = new Embedded("TestEmbedded", slowRes); + + el.addComponent(p); + el.addComponent(em); + + } +} \ No newline at end of file -- cgit v1.2.3