summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2010-03-16 09:08:21 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2010-03-16 09:08:21 +0000
commit223902154b9db14ce533f8f914eb186d4d5f44a7 (patch)
tree22c1820d3f4e0b7e2b24bb2961e6fc20a5fb7f3d /tests
parent4081ed4d0e69e94edbbe4593f4839a009bc69e2c (diff)
downloadvaadin-framework-223902154b9db14ce533f8f914eb186d4d5f44a7.tar.gz
vaadin-framework-223902154b9db14ce533f8f914eb186d4d5f44a7.zip
added test case
svn changeset:11904/svn branch:6.3
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/vaadin/tests/layouts/CssLayoutSizeChangePropagation.java61
1 files changed, 61 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/layouts/CssLayoutSizeChangePropagation.java b/tests/src/com/vaadin/tests/layouts/CssLayoutSizeChangePropagation.java
new file mode 100644
index 0000000000..a464e9b5c9
--- /dev/null
+++ b/tests/src/com/vaadin/tests/layouts/CssLayoutSizeChangePropagation.java
@@ -0,0 +1,61 @@
+package com.vaadin.tests.layouts;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.CssLayout;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.VerticalLayout;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.Button.ClickListener;
+
+public class CssLayoutSizeChangePropagation extends TestBase {
+
+ @Override
+ protected void setup() {
+ getLayout().setSizeFull();
+ final VerticalLayout sp = new VerticalLayout();
+
+ sp.setHeight("100%");
+
+ final CssLayout cssLayout = new CssLayout() {
+ @Override
+ protected String getCss(Component c) {
+ return "background-color: yellow;";
+ }
+ };
+ cssLayout.setSizeFull();
+ Label l = new Label("bö");
+ l.setSizeFull();
+ cssLayout.addComponent(l);
+
+ sp.addComponent(cssLayout);
+
+ Button button = new Button("b");
+ button.addListener(new ClickListener() {
+ boolean bool = true;
+
+ public void buttonClick(ClickEvent event) {
+ sp.setExpandRatio(cssLayout, bool ? 1 : 0);
+ bool = !bool;
+ }
+ });
+
+ sp.addComponent(button);
+ sp.setExpandRatio(button, 1);
+
+ getLayout().addComponent(sp);
+
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Upper part of view should become yellow on button click.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 4351;
+ }
+
+}