summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2012-10-04 18:21:03 +0300
committerJohannes Dahlström <johannesd@vaadin.com>2012-10-05 14:10:03 +0300
commite80c00ebd8f2c72f197074c4d1192d702539c8d0 (patch)
treea955befdc9e7fa65bd80467256b7b1318823657a /uitest
parentff4ee18e0f26515cfa818ab9d249932a3bbf0955 (diff)
downloadvaadin-framework-e80c00ebd8f2c72f197074c4d1192d702539c8d0.tar.gz
vaadin-framework-e80c00ebd8f2c72f197074c4d1192d702539c8d0.zip
Add Page.getLocation() (#9249)
* Send the whole window location, not just fragment, in bootstrap and when the fragment changes * BrowserDetails now has URI getLocation() instead of String getUriFragment() * Keep FragmentChangeListeners as-is, should perhaps change to LocationChangeListeners at some point * Implement Page.getFragment() by means of Page.getLocation() * Differentiate between no fragment (null) and empty fragment ("") as java.net.URI does Change-Id: I1da1ea0664304d0c121a57e85d127fe48605e940
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java2
-rw-r--r--uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java4
-rw-r--r--uitest/src/com/vaadin/tests/navigator/NavigatorTest.java3
3 files changed, 5 insertions, 4 deletions
diff --git a/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java b/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java
index 4d4d96a465..4648529db7 100644
--- a/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java
+++ b/uitest/src/com/vaadin/tests/components/ui/LazyInitUIs.java
@@ -78,7 +78,7 @@ public class LazyInitUIs extends AbstractTestUIProvider {
info += "<br />pathInfo: " + request.getRequestPathInfo();
info += "<br />parameters: " + request.getParameterMap().keySet();
info += "<br />uri fragment: "
- + request.getBrowserDetails().getUriFragment();
+ + request.getBrowserDetails().getLocation().getFragment();
return new Label(info, ContentMode.HTML);
}
diff --git a/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java b/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java
index 9d494f7858..db8b261628 100644
--- a/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java
+++ b/uitest/src/com/vaadin/tests/minitutorials/v7a1/UsingUriFragments.java
@@ -36,7 +36,7 @@ public class UsingUriFragments extends UI {
@Override
protected void init(VaadinRequest request) {
Label label = new Label("Hello, your fragment is "
- + request.getBrowserDetails().getUriFragment());
+ + request.getBrowserDetails().getLocation().getFragment());
getContent().addComponent(label);
// React to fragment changes
@@ -48,7 +48,7 @@ public class UsingUriFragments extends UI {
});
// Handle the fragment received in the initial request
- handleFragment(request.getBrowserDetails().getUriFragment());
+ handleFragment(request.getBrowserDetails().getLocation().getFragment());
addComponent(new Button("Show and set fragment",
new Button.ClickListener() {
diff --git a/uitest/src/com/vaadin/tests/navigator/NavigatorTest.java b/uitest/src/com/vaadin/tests/navigator/NavigatorTest.java
index 146b4df02f..97c4e9fd4f 100644
--- a/uitest/src/com/vaadin/tests/navigator/NavigatorTest.java
+++ b/uitest/src/com/vaadin/tests/navigator/NavigatorTest.java
@@ -135,7 +135,8 @@ public class NavigatorTest extends UI {
addComponent(log);
addComponent(naviLayout);
} catch (Exception e) {
- log.log("Exception: " + e.getMessage());
+ e.printStackTrace();
+ log.log("Exception: " + e);
}
}
}