diff options
author | Anna Koskinen <anna@vaadin.com> | 2013-01-09 16:17:37 +0200 |
---|---|---|
committer | Anna Koskinen <anna@vaadin.com> | 2013-01-09 16:17:37 +0200 |
commit | 5e27f326fdb4470d4ffe601e1cd4c9a7eae501d7 (patch) | |
tree | 40398ee966d24b828759dfe3ba16dbbfc5ccb57d /uitest/src | |
parent | 488259c57d55e5cfdc82f2e0197da3746f4413e1 (diff) | |
download | vaadin-framework-5e27f326fdb4470d4ffe601e1cd4c9a7eae501d7.tar.gz vaadin-framework-5e27f326fdb4470d4ffe601e1cd4c9a7eae501d7.zip |
Merge of (#8004) to Vaadin 7.
Empty RichTextArea returns "<br>" as getValue().
Change-Id: I5190d55b0e1d32ed4dd181434006820db9220ada
Diffstat (limited to 'uitest/src')
-rw-r--r-- | uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaEmptyString.java | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaEmptyString.java b/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaEmptyString.java new file mode 100644 index 0000000000..5eddf9dc6d --- /dev/null +++ b/uitest/src/com/vaadin/tests/components/richtextarea/RichTextAreaEmptyString.java @@ -0,0 +1,42 @@ +package com.vaadin.tests.components.richtextarea; + +import com.vaadin.shared.ui.label.ContentMode; +import com.vaadin.tests.components.TestBase; +import com.vaadin.ui.Button; +import com.vaadin.ui.Button.ClickEvent; +import com.vaadin.ui.Button.ClickListener; +import com.vaadin.ui.Label; +import com.vaadin.ui.RichTextArea; + +public class RichTextAreaEmptyString extends TestBase { + + @Override + protected String getDescription() { + return "Test the value of a rich text area. Visually empty area should return \"\""; + } + + @Override + protected Integer getTicketNumber() { + return 8004; + } + + @Override + protected void setup() { + final RichTextArea area = new RichTextArea(); + + final Label l = new Label(area.getValue(), ContentMode.PREFORMATTED); + l.setCaption("Value recieved from RichTextArea:"); + + final Button b = new Button("get area value", new ClickListener() { + + public void buttonClick(ClickEvent event) { + l.setValue(area.getValue()); + } + }); + + addComponent(area); + addComponent(b); + addComponent(l); + } + +} |