summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-04-03 18:54:21 +0300
committerArtur Signell <artur@vaadin.com>2012-04-05 00:09:16 +0300
commit69ea130cd3cf57ed1373adf7899fb1f4c9184a32 (patch)
tree5a6a4e5601281f47d4e8e2502392fa9e64d87b8f /tests
parent6ac1b1580596b1fcac28cb6b16f1c431300fe32e (diff)
downloadvaadin-framework-69ea130cd3cf57ed1373adf7899fb1f4c9184a32.tar.gz
vaadin-framework-69ea130cd3cf57ed1373adf7899fb1f4c9184a32.zip
Moved margins to AbstractLayoutState
Diffstat (limited to 'tests')
-rw-r--r--tests/testbench/com/vaadin/tests/components/splitpanel/AbstractSplitPanelTest.java5
-rw-r--r--tests/testbench/com/vaadin/tests/layouts/CssLayoutCustomCss.java18
-rw-r--r--tests/testbench/com/vaadin/tests/tickets/Ticket1983.java1
3 files changed, 21 insertions, 3 deletions
diff --git a/tests/testbench/com/vaadin/tests/components/splitpanel/AbstractSplitPanelTest.java b/tests/testbench/com/vaadin/tests/components/splitpanel/AbstractSplitPanelTest.java
index 861bdc1aab..1f7b6b7cbe 100644
--- a/tests/testbench/com/vaadin/tests/components/splitpanel/AbstractSplitPanelTest.java
+++ b/tests/testbench/com/vaadin/tests/components/splitpanel/AbstractSplitPanelTest.java
@@ -2,13 +2,14 @@ package com.vaadin.tests.components.splitpanel;
import com.vaadin.terminal.Sizeable;
import com.vaadin.terminal.Sizeable.Unit;
-import com.vaadin.tests.components.AbstractLayoutTest;
+import com.vaadin.tests.components.AbstractComponentContainerTest;
import com.vaadin.ui.AbstractSplitPanel;
import com.vaadin.ui.AbstractSplitPanel.SplitterClickEvent;
import com.vaadin.ui.AbstractSplitPanel.SplitterClickListener;
public abstract class AbstractSplitPanelTest<T extends AbstractSplitPanel>
- extends AbstractLayoutTest<T> implements SplitterClickListener {
+ extends AbstractComponentContainerTest<T> implements
+ SplitterClickListener {
private Command<T, Boolean> splitterClickListenerCommand = new Command<T, Boolean>() {
diff --git a/tests/testbench/com/vaadin/tests/layouts/CssLayoutCustomCss.java b/tests/testbench/com/vaadin/tests/layouts/CssLayoutCustomCss.java
index b2712fc54c..5ddf196bcc 100644
--- a/tests/testbench/com/vaadin/tests/layouts/CssLayoutCustomCss.java
+++ b/tests/testbench/com/vaadin/tests/layouts/CssLayoutCustomCss.java
@@ -3,10 +3,13 @@ package com.vaadin.tests.layouts;
import java.util.HashMap;
import java.util.Map;
+import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
+import com.vaadin.ui.CheckBox;
import com.vaadin.ui.Component;
import com.vaadin.ui.CssLayout;
import com.vaadin.ui.NativeButton;
@@ -31,6 +34,21 @@ public class CssLayoutCustomCss extends TestBase implements ClickListener {
layout.addComponent(createButton("color:red"));
layout.addComponent(createButton("color: blue"));
layout.addComponent(createButton("color: green"));
+
+ layout.addComponent(createMarginsToggle());
+ }
+
+ private Component createMarginsToggle() {
+ final CheckBox cb = new CheckBox("Margins");
+ cb.setImmediate(true);
+ cb.addListener(new ValueChangeListener() {
+
+ public void valueChange(ValueChangeEvent event) {
+ layout.setMargin(cb.getValue());
+ }
+ });
+
+ return cb;
}
private Component createButton(String string) {
diff --git a/tests/testbench/com/vaadin/tests/tickets/Ticket1983.java b/tests/testbench/com/vaadin/tests/tickets/Ticket1983.java
index c68ccf08f9..5bd0cd2ae6 100644
--- a/tests/testbench/com/vaadin/tests/tickets/Ticket1983.java
+++ b/tests/testbench/com/vaadin/tests/tickets/Ticket1983.java
@@ -34,7 +34,6 @@ public class Ticket1983 extends Application.LegacyApplication {
public TestLayout() {
setSplitPosition(200, Sizeable.UNITS_PIXELS);
- setMargin(false);
setLocked(true);
final HorizontalSplitPanel leftSide = initLeftSide();