summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorHenri Sara <hesara@vaadin.com>2012-11-29 12:50:50 +0000
committerVaadin Code Review <review@vaadin.com>2012-11-29 12:50:50 +0000
commit2e3be58af26743504d8563b38128a1c3f33ee5bc (patch)
tree2d4c8c2af30918c4a2152c6a899a7751afde113b /uitest
parent393a5faf1e0e21212ee0f9fed756244d7c3dc807 (diff)
parent5ed529dfe9ce6f81975cb1072aaca974e63e4b26 (diff)
downloadvaadin-framework-2e3be58af26743504d8563b38128a1c3f33ee5bc.tar.gz
vaadin-framework-2e3be58af26743504d8563b38128a1c3f33ee5bc.zip
Merge "Add fragment and parameter support to BrowserWindowOpener (#10093)"
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/extensions/BrowserPopupExtensionTest.java26
1 files changed, 23 insertions, 3 deletions
diff --git a/uitest/src/com/vaadin/tests/extensions/BrowserPopupExtensionTest.java b/uitest/src/com/vaadin/tests/extensions/BrowserPopupExtensionTest.java
index 196592d376..732b1aca74 100644
--- a/uitest/src/com/vaadin/tests/extensions/BrowserPopupExtensionTest.java
+++ b/uitest/src/com/vaadin/tests/extensions/BrowserPopupExtensionTest.java
@@ -33,9 +33,19 @@ import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.Label;
import com.vaadin.ui.Link;
import com.vaadin.ui.NativeButton;
+import com.vaadin.ui.UI;
public class BrowserPopupExtensionTest extends AbstractTestUI {
+ public static class ShowParamsUI extends UI {
+ @Override
+ protected void init(VaadinRequest request) {
+ setContent(new Label("Query: "
+ + getPage().getLocation().getRawQuery() + ", Fragment: "
+ + getPage().getLocation().getFragment()));
+ }
+ }
+
@Override
protected void setup(VaadinRequest request) {
List<Class<? extends Component>> components = new ArrayList<Class<? extends Component>>();
@@ -44,7 +54,7 @@ public class BrowserPopupExtensionTest extends AbstractTestUI {
components.add(Link.class);
components.add(CssLayout.class);
components.add(Label.class);
- addComponents(components, "http://vaadin.com/download/nightly/");
+ addComponents(components, "/statictestfiles/static.html");
Button uiClassButton = new Button("Open UI class");
new BrowserWindowOpener(ReopenPopupView.class).extend(uiClassButton);
@@ -55,12 +65,22 @@ public class BrowserPopupExtensionTest extends AbstractTestUI {
.extend(uiWithPath);
addComponent(uiWithPath);
- Button withPopupFeaturesButton = new Button("Open with features");
+ Button withPopupFeaturesButton = new Button(
+ "Open with features and fragment");
BrowserWindowOpener featuresPopup = new BrowserWindowOpener(
- "http://vaadin.com/download/nightly/");
+ "/statictestfiles/static.html#originalfragment");
featuresPopup.setFeatures("width=400,height=400");
featuresPopup.extend(withPopupFeaturesButton);
+ featuresPopup.setUriFragment("myFragment");
addComponent(withPopupFeaturesButton);
+
+ Button withParametersButton = new Button("Open UI with parameters");
+ BrowserWindowOpener parametersOpener = new BrowserWindowOpener(
+ ShowParamsUI.class);
+ parametersOpener.setUriFragment("myfragment");
+ parametersOpener.setParameter("my&param", "my=param#value");
+ parametersOpener.extend(withParametersButton);
+ addComponent(withParametersButton);
}
public void addComponents(List<Class<? extends Component>> components,