aboutsummaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2014-10-15 13:24:37 +0300
committerVaadin Code Review <review@vaadin.com>2014-10-21 06:37:13 +0000
commitf3f89d66b1792ef862342aaee3366575713987ce (patch)
tree689cba99d21c726cd5fe2b16ecbf1572be2bb12c /uitest
parent28570bb979f408c474745bf15afb5b66ede37cf4 (diff)
downloadvaadin-framework-f3f89d66b1792ef862342aaee3366575713987ce.tar.gz
vaadin-framework-f3f89d66b1792ef862342aaee3366575713987ce.zip
Update atmosphere-runtime to 2.1.2.vaadin6. (#14674, #14861)
Change-Id: Ie239bf110909f8acb47f2141431965061f9ac407
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/push/BasicPushWebsocketTest.java2
-rw-r--r--uitest/src/com/vaadin/tests/push/ExtremelyLongPushTimeWebsocketTest.java2
-rw-r--r--uitest/src/com/vaadin/tests/push/IdlePushChannelWebsocketTest.java2
-rw-r--r--uitest/src/com/vaadin/tests/push/ReconnectWebsocketTest.java2
-rw-r--r--uitest/src/com/vaadin/tests/push/RefreshCloseConnectionTest.java2
-rw-r--r--uitest/src/com/vaadin/tests/push/SendMultibyteCharacters.java23
-rw-r--r--uitest/src/com/vaadin/tests/push/SendMultibyteCharactersLongPollingTest.java9
-rw-r--r--uitest/src/com/vaadin/tests/push/SendMultibyteCharactersStreamingTest.java9
-rw-r--r--uitest/src/com/vaadin/tests/push/SendMultibyteCharactersTest.java42
-rw-r--r--uitest/src/com/vaadin/tests/push/SendMultibyteCharactersWebSocketTest.java19
-rw-r--r--uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java10
-rw-r--r--uitest/src/com/vaadin/tests/tb3/WebsocketTest.java24
12 files changed, 119 insertions, 27 deletions
diff --git a/uitest/src/com/vaadin/tests/push/BasicPushWebsocketTest.java b/uitest/src/com/vaadin/tests/push/BasicPushWebsocketTest.java
index 093ee348b8..cd779a7318 100644
--- a/uitest/src/com/vaadin/tests/push/BasicPushWebsocketTest.java
+++ b/uitest/src/com/vaadin/tests/push/BasicPushWebsocketTest.java
@@ -24,6 +24,6 @@ import com.vaadin.tests.tb3.WebsocketTest;
public class BasicPushWebsocketTest extends BasicPushTest {
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
- return WebsocketTest.getWebsocketBrowsers();
+ return getBrowsersSupportingWebSocket();
}
}
diff --git a/uitest/src/com/vaadin/tests/push/ExtremelyLongPushTimeWebsocketTest.java b/uitest/src/com/vaadin/tests/push/ExtremelyLongPushTimeWebsocketTest.java
index c0b188bbab..54775d572d 100644
--- a/uitest/src/com/vaadin/tests/push/ExtremelyLongPushTimeWebsocketTest.java
+++ b/uitest/src/com/vaadin/tests/push/ExtremelyLongPushTimeWebsocketTest.java
@@ -26,6 +26,6 @@ public class ExtremelyLongPushTimeWebsocketTest extends
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
- return WebsocketTest.getWebsocketBrowsers();
+ return getBrowsersSupportingWebSocket();
}
}
diff --git a/uitest/src/com/vaadin/tests/push/IdlePushChannelWebsocketTest.java b/uitest/src/com/vaadin/tests/push/IdlePushChannelWebsocketTest.java
index 644dbd7580..7559d22264 100644
--- a/uitest/src/com/vaadin/tests/push/IdlePushChannelWebsocketTest.java
+++ b/uitest/src/com/vaadin/tests/push/IdlePushChannelWebsocketTest.java
@@ -30,6 +30,6 @@ public class IdlePushChannelWebsocketTest extends IdlePushChannelTest {
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
- return WebsocketTest.getWebsocketBrowsers();
+ return getBrowsersSupportingWebSocket();
}
}
diff --git a/uitest/src/com/vaadin/tests/push/ReconnectWebsocketTest.java b/uitest/src/com/vaadin/tests/push/ReconnectWebsocketTest.java
index efaf5d493e..bad00eba47 100644
--- a/uitest/src/com/vaadin/tests/push/ReconnectWebsocketTest.java
+++ b/uitest/src/com/vaadin/tests/push/ReconnectWebsocketTest.java
@@ -25,7 +25,7 @@ public class ReconnectWebsocketTest extends ReconnectTest {
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
- return WebsocketTest.getWebsocketBrowsers();
+ return getBrowsersSupportingWebSocket();
}
@Override
diff --git a/uitest/src/com/vaadin/tests/push/RefreshCloseConnectionTest.java b/uitest/src/com/vaadin/tests/push/RefreshCloseConnectionTest.java
index ef461ab0da..42babb00d0 100644
--- a/uitest/src/com/vaadin/tests/push/RefreshCloseConnectionTest.java
+++ b/uitest/src/com/vaadin/tests/push/RefreshCloseConnectionTest.java
@@ -42,6 +42,6 @@ public class RefreshCloseConnectionTest extends MultiBrowserTest {
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
- return WebsocketTest.getWebsocketBrowsers();
+ return getBrowsersSupportingWebSocket();
}
}
diff --git a/uitest/src/com/vaadin/tests/push/SendMultibyteCharacters.java b/uitest/src/com/vaadin/tests/push/SendMultibyteCharacters.java
new file mode 100644
index 0000000000..e41f769724
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/push/SendMultibyteCharacters.java
@@ -0,0 +1,23 @@
+package com.vaadin.tests.push;
+
+import com.vaadin.annotations.Push;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.TextArea;
+
+@Push
+public class SendMultibyteCharacters extends AbstractTestUI {
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ TextArea textArea = new TextArea();
+ textArea.setImmediate(true);
+
+ addComponent(textArea);
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 14674;
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersLongPollingTest.java b/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersLongPollingTest.java
new file mode 100644
index 0000000000..fd89982253
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersLongPollingTest.java
@@ -0,0 +1,9 @@
+package com.vaadin.tests.push;
+
+public class SendMultibyteCharactersLongPollingTest extends SendMultibyteCharactersTest {
+
+ @Override
+ protected String getTransport() {
+ return "long-polling";
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersStreamingTest.java b/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersStreamingTest.java
new file mode 100644
index 0000000000..7b9ec38487
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersStreamingTest.java
@@ -0,0 +1,9 @@
+package com.vaadin.tests.push;
+
+public class SendMultibyteCharactersStreamingTest extends SendMultibyteCharactersTest {
+
+ @Override
+ protected String getTransport() {
+ return "streaming";
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersTest.java b/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersTest.java
new file mode 100644
index 0000000000..1ced2fb506
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersTest.java
@@ -0,0 +1,42 @@
+package com.vaadin.tests.push;
+
+import com.vaadin.testbench.By;
+import com.vaadin.testbench.elements.TextAreaElement;
+import com.vaadin.tests.annotations.TestCategory;
+import com.vaadin.tests.tb3.MultiBrowserTest;
+import org.junit.Test;
+
+@TestCategory("push")
+public abstract class SendMultibyteCharactersTest extends MultiBrowserTest {
+
+ @Override
+ protected Class<?> getUIClass() {
+ return SendMultibyteCharacters.class;
+ }
+
+ protected abstract String getTransport();
+
+ @Test
+ public void transportSupportsMultibyteCharacters() {
+ setDebug(true);
+ openTestURL("transport=" + getTransport());
+ openDebugLogTab();
+
+ TextAreaElement textArea = $(TextAreaElement.class).first();
+
+ StringBuilder text = new StringBuilder();
+ for(int i=0;i < 20;i++) {
+ text.append("之は日本語です、テストです。");
+ }
+
+ textArea.sendKeys(text.toString());
+
+ clearDebugMessages();
+
+ findElement(By.tagName("body")).click();
+
+ waitForDebugMessage("Variable burst to be sent to server:", 5);
+ waitForDebugMessage("Handling message from server", 10);
+ }
+
+} \ No newline at end of file
diff --git a/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersWebSocketTest.java b/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersWebSocketTest.java
new file mode 100644
index 0000000000..f37fb2efcb
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersWebSocketTest.java
@@ -0,0 +1,19 @@
+package com.vaadin.tests.push;
+
+
+import org.openqa.selenium.remote.DesiredCapabilities;
+
+import java.util.List;
+
+public class SendMultibyteCharactersWebSocketTest extends SendMultibyteCharactersTest {
+
+ @Override
+ public List<DesiredCapabilities> getBrowsersToTest() {
+ return getBrowsersSupportingWebSocket();
+ }
+
+ @Override
+ protected String getTransport() {
+ return "websocket";
+ }
+}
diff --git a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java
index d6eed3e5c8..ebcb02002e 100644
--- a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java
+++ b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java
@@ -40,6 +40,16 @@ import org.openqa.selenium.remote.DesiredCapabilities;
*/
public abstract class MultiBrowserTest extends PrivateTB3Configuration {
+ protected List<DesiredCapabilities> getBrowsersSupportingWebSocket() {
+ List<DesiredCapabilities> browsers = new ArrayList<DesiredCapabilities>(getAllBrowsers());
+
+ browsers.remove(Browser.IE8.getDesiredCapabilities());
+ browsers.remove(Browser.IE9.getDesiredCapabilities());
+ browsers.remove(Browser.PHANTOMJS.getDesiredCapabilities());
+
+ return browsers;
+ }
+
protected List<DesiredCapabilities> getBrowsersExcludingPhantomJS() {
List<DesiredCapabilities> browsers = new ArrayList<DesiredCapabilities>(getAllBrowsers());
diff --git a/uitest/src/com/vaadin/tests/tb3/WebsocketTest.java b/uitest/src/com/vaadin/tests/tb3/WebsocketTest.java
index 778c8b9113..ddcc6d5d76 100644
--- a/uitest/src/com/vaadin/tests/tb3/WebsocketTest.java
+++ b/uitest/src/com/vaadin/tests/tb3/WebsocketTest.java
@@ -35,30 +35,10 @@ import com.vaadin.tests.tb3.MultiBrowserTest.Browser;
* @author Vaadin Ltd
*/
@TestCategory("push")
-public abstract class WebsocketTest extends PrivateTB3Configuration {
- private static List<DesiredCapabilities> websocketBrowsers = new ArrayList<DesiredCapabilities>();
- static {
- websocketBrowsers.addAll(MultiBrowserTest.getAllBrowsers());
- websocketBrowsers.remove(Browser.IE8.getDesiredCapabilities());
- websocketBrowsers.remove(Browser.IE9.getDesiredCapabilities());
- websocketBrowsers.remove(Browser.PHANTOMJS.getDesiredCapabilities());
- }
-
- /**
- * @return All supported browsers which are actively tested and support
- * websockets
- */
- public static List<DesiredCapabilities> getWebsocketBrowsers() {
- return Collections.unmodifiableList(websocketBrowsers);
- }
+public abstract class WebsocketTest extends MultiBrowserTest {
- /*
- * (non-Javadoc)
- *
- * @see com.vaadin.tests.tb3.AbstractTB3Test#getBrowserToRunOn()
- */
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
- return new ArrayList<DesiredCapabilities>(getWebsocketBrowsers());
+ return new ArrayList<DesiredCapabilities>(getBrowsersSupportingWebSocket());
}
}