summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-09-20 13:52:22 +0300
committerLeif Åstrand <leif@vaadin.com>2012-09-20 13:52:37 +0300
commit6b28dc7bf41b8590fcab3d60afd5aa407f1f1401 (patch)
tree9f11e412e2dce3d6b495d29a9c954a70603aa036 /uitest
parentd66d9b3f5d3a85fb8016eb75ae68267d50244cd9 (diff)
downloadvaadin-framework-6b28dc7bf41b8590fcab3d60afd5aa407f1f1401.tar.gz
vaadin-framework-6b28dc7bf41b8590fcab3d60afd5aa407f1f1401.zip
Refactor how LegacyApplication and VaadinSession are "closed" (#9635)
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java2
-rw-r--r--uitest/src/com/vaadin/tests/TestForUpload.java4
-rw-r--r--uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java4
-rw-r--r--uitest/src/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java2
4 files changed, 8 insertions, 4 deletions
diff --git a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java
index f31b17333a..c27e92626a 100644
--- a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java
+++ b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java
@@ -129,7 +129,7 @@ public class ApplicationRunnerServlet extends LegacyVaadinServlet {
}
@Override
- protected boolean shouldCreateApplication(WrappedHttpServletRequest request)
+ protected boolean shouldCreateApplication(HttpServletRequest request)
throws ServletException {
try {
return LegacyApplication.class.isAssignableFrom(getClassToRun());
diff --git a/uitest/src/com/vaadin/tests/TestForUpload.java b/uitest/src/com/vaadin/tests/TestForUpload.java
index 7146b1a4ff..31298aa392 100644
--- a/uitest/src/com/vaadin/tests/TestForUpload.java
+++ b/uitest/src/com/vaadin/tests/TestForUpload.java
@@ -43,6 +43,7 @@ import com.vaadin.ui.Panel;
import com.vaadin.ui.ProgressIndicator;
import com.vaadin.ui.Select;
import com.vaadin.ui.TextField;
+import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.Upload;
import com.vaadin.ui.Upload.FinishedEvent;
import com.vaadin.ui.Upload.StartedEvent;
@@ -244,7 +245,8 @@ public class TestForUpload extends CustomComponent implements
@Override
public void buttonClick(ClickEvent event) {
- getSession().close();
+ LegacyWindow window = (LegacyWindow) event.getButton().getUI();
+ window.getApplication().close();
}
});
main.addComponent(restart);
diff --git a/uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java b/uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java
index e4f8552af1..151b58ed67 100644
--- a/uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java
+++ b/uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java
@@ -5,6 +5,7 @@ import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Label;
+import com.vaadin.ui.UI.LegacyWindow;
public class ApplicationCloseTest extends TestBase {
@@ -26,7 +27,8 @@ public class ApplicationCloseTest extends TestBase {
@Override
public void buttonClick(ClickEvent event) {
- event.getButton().getUI().getSession().close();
+ LegacyWindow ui = (LegacyWindow) event.getButton().getUI();
+ ui.getApplication().close();
}
});
diff --git a/uitest/src/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java b/uitest/src/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java
index fecac38697..3a22a46e68 100644
--- a/uitest/src/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java
+++ b/uitest/src/com/vaadin/tests/layouts/ComplexGLColumnExpansionWithColSpan.java
@@ -73,7 +73,7 @@ public class ComplexGLColumnExpansionWithColSpan extends AbstractTestCase {
restart.addListener(new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
- mainLayout.getUI().getSession().close();
+ close();
}
});