diff options
author | Leif Åstrand <leif@vaadin.com> | 2012-09-20 13:52:22 +0300 |
---|---|---|
committer | Leif Åstrand <leif@vaadin.com> | 2012-09-20 13:52:37 +0300 |
commit | 6b28dc7bf41b8590fcab3d60afd5aa407f1f1401 (patch) | |
tree | 9f11e412e2dce3d6b495d29a9c954a70603aa036 /uitest | |
parent | d66d9b3f5d3a85fb8016eb75ae68267d50244cd9 (diff) | |
download | vaadin-framework-6b28dc7bf41b8590fcab3d60afd5aa407f1f1401.tar.gz vaadin-framework-6b28dc7bf41b8590fcab3d60afd5aa407f1f1401.zip |
Refactor how LegacyApplication and VaadinSession are "closed" (#9635)
Diffstat (limited to 'uitest')
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(); } }); |