From c11f26fc7899639c019fba5b41c71f46e7399566 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 23 Feb 2010 08:35:32 +0000 Subject: [PATCH] Test case for #4206 svn changeset:11480/svn branch:6.3 --- .../components/window/WindowScrollingUp.java | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 tests/src/com/vaadin/tests/components/window/WindowScrollingUp.java diff --git a/tests/src/com/vaadin/tests/components/window/WindowScrollingUp.java b/tests/src/com/vaadin/tests/components/window/WindowScrollingUp.java new file mode 100644 index 0000000000..a97341d8b9 --- /dev/null +++ b/tests/src/com/vaadin/tests/components/window/WindowScrollingUp.java @@ -0,0 +1,39 @@ +package com.vaadin.tests.components.window; + +import com.vaadin.tests.components.AbstractTestCase; +import com.vaadin.ui.Button; +import com.vaadin.ui.Table; +import com.vaadin.ui.Window; +import com.vaadin.ui.Button.ClickEvent; + +public class WindowScrollingUp extends AbstractTestCase { + + @Override + protected String getDescription() { + return "Scroll down, click 'up' and the view should scroll to the top"; + } + + @Override + protected Integer getTicketNumber() { + return 4206; + } + + @Override + public void init() { + Table table = new Table(); + table.setPageLength(50); + + final Button up = new Button("up"); + up.addListener(new Button.ClickListener() { + + public void buttonClick(ClickEvent event) { + up.getWindow().setScrollTop(0); + } + }); + + setMainWindow(new Window("")); + getMainWindow().addComponent(table); + getMainWindow().addComponent(up); + + } +} -- 2.39.5