From: Matti Tahvonen Date: Fri, 14 Aug 2009 11:39:50 +0000 (+0000) Subject: test case for #3183 X-Git-Tag: 6.7.0.beta1~2617 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fe5faeb1c2aee56febc389da65fbe944fd29ca28;p=vaadin-framework.git test case for #3183 svn changeset:8484/svn branch:6.1 --- diff --git a/src/com/vaadin/tests/layouts/HiddenHorizontalLayout.java b/src/com/vaadin/tests/layouts/HiddenHorizontalLayout.java new file mode 100644 index 0000000000..e548d7dacc --- /dev/null +++ b/src/com/vaadin/tests/layouts/HiddenHorizontalLayout.java @@ -0,0 +1,57 @@ +package com.vaadin.tests.layouts; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.HorizontalLayout; +import com.vaadin.ui.Label; +import com.vaadin.ui.VerticalLayout; +import com.vaadin.ui.Button.ClickEvent; + +public class HiddenHorizontalLayout extends TestBase { + + @Override + protected String getDescription() { + return "Test to verify that toggling layout visibility works properly."; + } + + @Override + protected Integer getTicketNumber() { + return 3183; + } + + @Override + public void setup() { + + VerticalLayout vl = new VerticalLayout(); + vl.setSizeFull(); + getLayout().addComponent(vl); + + final HorizontalLayout hl = new HorizontalLayout(); + hl.setWidth("100%"); + hl.setHeight("30px"); + hl.addComponent(new Label("label1")); + hl.addComponent(new Label("label2")); + hl.addComponent(new Label("label3")); + hl.addComponent(new Label("label4")); + vl.addComponent(hl); + + Label l = new Label("Steps to reproduce with Vaadin 6.0.1:
" + + "1. set browser size smaller than fullscreen
" + + "2. Refresh page with browser
" + + "3. Click \"toggle layout visibility\"
" + + "4. Resize browser window to full
" + + "5. Click \"toggle layout visibility\"
", + Label.CONTENT_XHTML); + vl.addComponent(l); + Button b = new Button("toggle layout visibility", + new Button.ClickListener() { + + public void buttonClick(ClickEvent event) { + hl.setVisible(!hl.isVisible()); + } + + }); + vl.addComponent(b); + } + +} \ No newline at end of file