summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2013-02-05 14:33:40 +0000
committerVaadin Code Review <review@vaadin.com>2013-02-05 14:33:40 +0000
commit67c43d12cdc3295aa66b1e2e4b9ce3eb78e9a0e1 (patch)
tree40dbd55ae1c84da14b9137944fedf7ec20c30b3d /uitest
parenta90ab60d8f6a7bcdfad46a3d1c323c225d711d68 (diff)
parent25ac8c743a551034703e8458aae23972102a46f1 (diff)
downloadvaadin-framework-67c43d12cdc3295aa66b1e2e4b9ce3eb78e9a0e1.tar.gz
vaadin-framework-67c43d12cdc3295aa66b1e2e4b9ce3eb78e9a0e1.zip
Merge "Merge of (#9197) to Vaadin 7." into 7.0
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/table/TableInSubWindowMemoryLeak.java68
1 files changed, 68 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/table/TableInSubWindowMemoryLeak.java b/uitest/src/com/vaadin/tests/components/table/TableInSubWindowMemoryLeak.java
new file mode 100644
index 0000000000..dcaabf98d6
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/table/TableInSubWindowMemoryLeak.java
@@ -0,0 +1,68 @@
+package com.vaadin.tests.components.table;
+
+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.Label;
+import com.vaadin.ui.Table;
+import com.vaadin.ui.UI;
+import com.vaadin.ui.Window;
+import com.vaadin.ui.Window.CloseEvent;
+import com.vaadin.ui.Window.CloseListener;
+
+public class TableInSubWindowMemoryLeak extends TestBase {
+
+ @Override
+ public void setup() {
+ final Label label = new Label("Hello Vaadin user");
+ addComponent(label);
+ final Button openButton = new Button("open me");
+ openButton.addClickListener(new ClickListener() {
+
+ public void buttonClick(final ClickEvent event) {
+ final Window window = new Window("Simple Window");
+ window.setModal(true);
+ window.setHeight("200px");
+ window.setWidth("200px");
+ final Table table = new Table();
+ window.setContent(table);
+ UI.getCurrent().addWindow(window);
+ window.addCloseListener(new CloseListener() {
+ public void windowClose(final CloseEvent e) {
+ window.setContent(new Label());
+ UI.getCurrent().removeWindow(window);
+ }
+ });
+ }
+ });
+ addComponent(openButton);
+
+ final Button openButton2 = new Button("open me without Table");
+ openButton2.addClickListener(new ClickListener() {
+ public void buttonClick(final ClickEvent event) {
+ final Window window = new Window("Simple Window");
+ window.setModal(true);
+ window.setHeight("200px");
+ window.setWidth("200px");
+ UI.getCurrent().addWindow(window);
+ window.addCloseListener(new CloseListener() {
+ public void windowClose(final CloseEvent e) {
+ UI.getCurrent().removeWindow(window);
+ }
+ });
+ }
+ });
+ addComponent(openButton2);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "IE 8 leaks memory with a subwindow containing a Table";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 9197;
+ }
+}