aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/applicationcontext/CloseSession.java
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/src/com/vaadin/tests/applicationcontext/CloseSession.java')
-rw-r--r--uitest/src/com/vaadin/tests/applicationcontext/CloseSession.java16
1 files changed, 15 insertions, 1 deletions
diff --git a/uitest/src/com/vaadin/tests/applicationcontext/CloseSession.java b/uitest/src/com/vaadin/tests/applicationcontext/CloseSession.java
index 446638f8a2..cca76cc9e3 100644
--- a/uitest/src/com/vaadin/tests/applicationcontext/CloseSession.java
+++ b/uitest/src/com/vaadin/tests/applicationcontext/CloseSession.java
@@ -18,13 +18,16 @@ package com.vaadin.tests.applicationcontext;
import javax.servlet.http.HttpSession;
+import com.vaadin.server.Page;
import com.vaadin.server.VaadinRequest;
import com.vaadin.server.VaadinService;
+import com.vaadin.server.VaadinSession;
import com.vaadin.server.WrappedHttpSession;
import com.vaadin.tests.components.AbstractTestUI;
import com.vaadin.tests.util.Log;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.UI;
public class CloseSession extends AbstractTestUI {
private static final String OLD_HASH_PARAM = "oldHash";
@@ -158,6 +161,17 @@ public class CloseSession extends AbstractTestUI {
@Override
public void detach() {
super.detach();
- System.out.println("UI " + getUIId() + " detached");
+ log.log("Detach of " + this + " (" + getUIId() + ")");
+ boolean correctUI = (UI.getCurrent() == this);
+ boolean correctPage = (Page.getCurrent() == getPage());
+ boolean correctVaadinSession = (VaadinSession.getCurrent() == getSession());
+ boolean correctVaadinService = (VaadinService.getCurrent() == getSession()
+ .getService());
+ log.log("UI.current correct in detach: " + correctUI);
+ log.log("Page.current correct in detach: " + correctPage);
+ log.log("VaadinSession.current correct in detach: "
+ + correctVaadinSession);
+ log.log("VaadinService.current correct in detach: "
+ + correctVaadinService);
}
}