summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java')
-rw-r--r--uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java9
1 files changed, 4 insertions, 5 deletions
diff --git a/uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java b/uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java
index 1f5f0dc691..8cfed569dc 100644
--- a/uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java
+++ b/uitest/src/com/vaadin/tests/application/ApplicationCloseTest.java
@@ -1,6 +1,5 @@
package com.vaadin.tests.application;
-import com.vaadin.Application;
import com.vaadin.shared.ui.label.ContentMode;
import com.vaadin.tests.components.TestBase;
import com.vaadin.ui.Button;
@@ -15,9 +14,9 @@ public class ApplicationCloseTest extends TestBase {
protected void setup() {
Label applications = new Label("Applications in session: <br/>",
ContentMode.XHTML);
- for (Application a : getContext().getApplications()) {
- applications.setValue(applications.getValue() + "App: " + a
- + "<br/>");
+ if (getContext() != null) {
+ applications.setValue(applications.getValue() + "App: "
+ + getContext() + "<br/>");
}
applications.setValue(applications.getValue() + "<br/><br/>");
@@ -27,7 +26,7 @@ public class ApplicationCloseTest extends TestBase {
@Override
public void buttonClick(ClickEvent event) {
- event.getButton().getApplication().close();
+ event.getButton().getUI().getSession().close();
}
});