From 0f75f202d333ac507fb3e5efb8e9bd4d4719e098 Mon Sep 17 00:00:00 2001 From: John Ahlroos Date: Wed, 17 Apr 2013 11:46:19 +0300 Subject: Added test for testing push with different transports #11494 Change-Id: I0296bdee1925ba93ca7e4e65c68215e025d072f6 --- .../tests/widgetset/TestingWidgetSet.gwt.xml | 4 +++ .../widgetset/client/TestingPushConnection.java | 30 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 uitest/src/com/vaadin/tests/widgetset/client/TestingPushConnection.java (limited to 'uitest/src/com/vaadin/tests/widgetset') 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 @@ + + + + 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; + } + +} -- cgit v1.2.3