From f4f4783d7f3e65c5395a519778f231c3e528cb6c Mon Sep 17 00:00:00 2001 From: Automerge Date: Fri, 27 Apr 2012 11:39:27 +0000 Subject: [merge from 6.7] Fix and test case for #8619: Add sanity checks to GridLayout to handle cases where the size of a relative-size child unexpectedly changes svn changeset:23656/svn branch:6.8 --- .../combobox/GridLayoutComboBoxZoomOut.java | 61 ++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 tests/testbench/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java (limited to 'tests') diff --git a/tests/testbench/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java b/tests/testbench/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java new file mode 100644 index 0000000000..a192f1a3a6 --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/combobox/GridLayoutComboBoxZoomOut.java @@ -0,0 +1,61 @@ +package com.vaadin.tests.components.combobox; + +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.ComboBox; +import com.vaadin.ui.GridLayout; +import com.vaadin.ui.Label; +import com.vaadin.ui.Layout; +import com.vaadin.ui.Select; +import com.vaadin.ui.Window; + +@SuppressWarnings("serial") +public class GridLayoutComboBoxZoomOut extends TestBase { + + @Override + public void setup() { + Window mainWindow = new Window("Gridlayoutbug Application"); + setMainWindow(mainWindow); + + Label description = new Label( + "Open this application in Chrome, zoom out (cmd + \"-\") and " + + "open the ComboBox for weird behaviour."); + mainWindow.addComponent(description); + + Layout formLayout = new GridLayout(2, 1); + // formLayout.setWidth("100%"); + formLayout.setWidth("1000px"); + + Select countryField = new ComboBox(); + countryField.addItem("Finland"); + countryField.addItem("Sweden"); + countryField.addItem("Canada"); + countryField.addItem("USA"); + countryField.setCaption("Country"); + countryField.setWidth("100%"); + formLayout.addComponent(countryField); + + Select statusField = new ComboBox(); + statusField.addItem("Available"); + statusField.addItem("On vacation"); + statusField.addItem("Busy"); + statusField.addItem("Left the building"); + statusField.setCaption("Status"); + statusField.setWidth("100%"); + formLayout.addComponent(statusField); + + mainWindow.addComponent(formLayout); + } + + @Override + protected String getDescription() { + // TODO Auto-generated method stub + return null; + } + + @Override + protected Integer getTicketNumber() { + // TODO Auto-generated method stub + return null; + } + +} -- cgit v1.2.3