summaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/push/SendMultibyteCharactersTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/src/com/vaadin/tests/push/SendMultibyteCharactersTest.java')
-rw-r--r--uitest/src/com/vaadin/tests/push/SendMultibyteCharactersTest.java42
1 files changed, 42 insertions, 0 deletions
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