<liferay.portal.version>6.0.2</liferay.portal.version>
<vaadin.sass.version>0.9.13</vaadin.sass.version>
- <vaadin.gwt.version>2.7.0.vaadin3</vaadin.gwt.version>
+ <vaadin.gwt.version>2.7.0.vaadin4</vaadin.gwt.version>
<vaadin.plugin.version>7.7.0.alpha1</vaadin.plugin.version>
<javax.portlet.version>2.0</javax.portlet.version>
--- /dev/null
+package com.vaadin.tests.core;
+
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.tests.components.AbstractTestUI;
+import com.vaadin.ui.ComboBox;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.MenuBar;
+import com.vaadin.ui.MenuBar.MenuItem;
+import com.vaadin.ui.TextField;
+
+public class SpecialCharactersEncodingUI extends AbstractTestUI {
+
+ public static String textWithZwnj = "\ufeffछुट्याउनेछन् क्ष क्ष क्ष";
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ MenuBar menubar = new MenuBar();
+ menubar.setId("menubar");
+ addComponent(menubar);
+ menubar.addItem(textWithZwnj, null);
+
+ Label label = new Label(textWithZwnj);
+ label.setId("label");
+ addComponent(label);
+
+ TextField f = new TextField("Textfield", textWithZwnj);
+ f.setId("textfield");
+ addComponent(f);
+
+ }
+
+}
--- /dev/null
+package com.vaadin.tests.core;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.remote.DesiredCapabilities;
+
+import com.vaadin.testbench.By;
+import com.vaadin.testbench.elements.LabelElement;
+import com.vaadin.testbench.elements.MenuBarElement;
+import com.vaadin.testbench.elements.TextFieldElement;
+import com.vaadin.testbench.parallel.Browser;
+import com.vaadin.tests.tb3.MultiBrowserTest;
+import com.vaadin.tests.tb3.SingleBrowserTest;
+import com.vaadin.tests.tb3.SingleBrowserTestPhantomJS2;
+
+public class SpecialCharactersEncodingUITest extends SingleBrowserTest {
+
+ @Test
+ public void checkEncoding() {
+ openTestURL();
+ String textFieldValue = $(TextFieldElement.class).id("textfield")
+ .getValue();
+ Assert.assertEquals(SpecialCharactersEncodingUI.textWithZwnj,
+ textFieldValue);
+ LabelElement label = $(LabelElement.class).id("label");
+ String labelValue = getHtml(label); // getText() strips some characters
+ Assert.assertEquals(SpecialCharactersEncodingUI.textWithZwnj,
+ labelValue);
+
+ MenuBarElement menubar = $(MenuBarElement.class).first();
+ WebElement menuItem = menubar
+ .findElement(By.className("v-menubar-menuitem-caption"));
+ Assert.assertEquals(SpecialCharactersEncodingUI.textWithZwnj,
+ getHtml(menuItem));
+ }
+
+ private String getHtml(WebElement element) {
+ return element.getAttribute("innerHTML");
+ }
+}