diff options
author | Automerge <automerge@vaadin.com> | 2012-05-09 17:06:15 +0000 |
---|---|---|
committer | Automerge <automerge@vaadin.com> | 2012-05-09 17:06:15 +0000 |
commit | 0bcee7fad275880d2acf5ed4cca34ace42c7481b (patch) | |
tree | a14846767b5264ba79231928d4aa1f1ead392ee1 | |
parent | 2f9e56f46e59152d9bed498eb72586fb3f9e15dd (diff) | |
download | vaadin-framework-0bcee7fad275880d2acf5ed4cca34ace42c7481b.tar.gz vaadin-framework-0bcee7fad275880d2acf5ed4cca34ace42c7481b.zip |
[merge from 6.7] Test case for #8781
svn changeset:23699/svn branch:6.8
-rw-r--r-- | WebContent/statictestfiles/dummy.zip | bin | 0 -> 138 bytes | |||
-rw-r--r-- | tests/testbench/com/vaadin/tests/components/window/DownloadAndUpdate.java | 45 |
2 files changed, 45 insertions, 0 deletions
diff --git a/WebContent/statictestfiles/dummy.zip b/WebContent/statictestfiles/dummy.zip Binary files differnew file mode 100644 index 0000000000..e6e34282fe --- /dev/null +++ b/WebContent/statictestfiles/dummy.zip diff --git a/tests/testbench/com/vaadin/tests/components/window/DownloadAndUpdate.java b/tests/testbench/com/vaadin/tests/components/window/DownloadAndUpdate.java new file mode 100644 index 0000000000..ca9c31513f --- /dev/null +++ b/tests/testbench/com/vaadin/tests/components/window/DownloadAndUpdate.java @@ -0,0 +1,45 @@ +package com.vaadin.tests.components.window; + +import com.vaadin.terminal.ExternalResource; +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Table; + +public class DownloadAndUpdate extends TestBase { + + @Override + protected void setup() { + addComponent(new Button("Download and update", + new Button.ClickListener() { + public void buttonClick(ClickEvent event) { + downloadAndUpdate(); + } + })); + } + + protected void downloadAndUpdate() { + getMainWindow().open( + new ExternalResource("/statictestfiles/dummy.zip", "_new")); + + // Any component sending an UIDL request when rendered will likely do + Table table = new Table(); + table.addContainerProperty("A", String.class, ""); + for (int i = 0; i < 100; i++) { + table.addItem(new Object[] { Integer.toString(i) }, + Integer.valueOf(i)); + } + addComponent(table); + } + + @Override + protected String getDescription() { + return "There should be no problems downloading a file from the same request that triggers another request, even in webkit browsers."; + } + + @Override + protected Integer getTicketNumber() { + return Integer.valueOf(8781); + } + +} |