summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/widgetset
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2013-04-17 11:46:19 +0300
committerJohn Ahlroos <john@vaadin.com>2013-04-17 14:46:21 +0300
commit0f75f202d333ac507fb3e5efb8e9bd4d4719e098 (patch)
treebd19061fbde6c5cf665b0bd4fcefd1c78567800d /uitest/src/com/vaadin/tests/widgetset
parent1c4adacdc2c59a4dd33633806902cb6224141954 (diff)
downloadvaadin-framework-0f75f202d333ac507fb3e5efb8e9bd4d4719e098.tar.gz
vaadin-framework-0f75f202d333ac507fb3e5efb8e9bd4d4719e098.zip
Added test for testing push with different transports #11494
Change-Id: I0296bdee1925ba93ca7e4e65c68215e025d072f6
Diffstat (limited to 'uitest/src/com/vaadin/tests/widgetset')
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/TestingWidgetSet.gwt.xml4
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/client/TestingPushConnection.java30
2 files changed, 34 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/widgetset/TestingWidgetSet.gwt.xml b/uitest/src/com/vaadin/tests/widgetset/TestingWidgetSet.gwt.xml
index 919a4a5d69..1b47a86113 100644
--- a/uitest/src/com/vaadin/tests/widgetset/TestingWidgetSet.gwt.xml
+++ b/uitest/src/com/vaadin/tests/widgetset/TestingWidgetSet.gwt.xml
@@ -7,5 +7,9 @@
<replace-with class="com.vaadin.tests.widgetset.client.CustomUIConnector">
<when-type-is class="com.vaadin.client.ui.ui.UIConnector" />
</replace-with>
+
+ <replace-with class="com.vaadin.tests.widgetset.client.TestingPushConnection">
+ <when-type-is class="com.vaadin.client.communication.PushConnection" />
+ </replace-with>
</module>
diff --git a/uitest/src/com/vaadin/tests/widgetset/client/TestingPushConnection.java b/uitest/src/com/vaadin/tests/widgetset/client/TestingPushConnection.java
new file mode 100644
index 0000000000..8453daabcd
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/widgetset/client/TestingPushConnection.java
@@ -0,0 +1,30 @@
+package com.vaadin.tests.widgetset.client;
+
+import com.google.gwt.user.client.Window;
+import com.vaadin.client.ApplicationConnection;
+import com.vaadin.client.communication.PushConnection;
+
+public class TestingPushConnection extends PushConnection {
+
+ private String transport;
+
+ @Override
+ public void init(ApplicationConnection connection) {
+ super.init(connection);
+ transport = Window.Location.getParameter("transport");
+ }
+
+ /*
+ * Force transport
+ */
+ @Override
+ protected AtmosphereConfiguration createConfig() {
+ AtmosphereConfiguration conf = super.createConfig();
+ if (transport != null) {
+ conf.setTransport(transport);
+ conf.setFallbackTransport(transport);
+ }
+ return conf;
+ }
+
+}