summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/src/com/vaadin/tests/components/textfield/TextChangeEventsEternalLoop.java32
1 files changed, 32 insertions, 0 deletions
diff --git a/tests/src/com/vaadin/tests/components/textfield/TextChangeEventsEternalLoop.java b/tests/src/com/vaadin/tests/components/textfield/TextChangeEventsEternalLoop.java
new file mode 100644
index 0000000000..22348bb5b5
--- /dev/null
+++ b/tests/src/com/vaadin/tests/components/textfield/TextChangeEventsEternalLoop.java
@@ -0,0 +1,32 @@
+package com.vaadin.tests.components.textfield;
+
+import com.vaadin.event.FieldEvents.TextChangeEvent;
+import com.vaadin.event.FieldEvents.TextChangeListener;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.TextField;
+
+public class TextChangeEventsEternalLoop extends TestBase {
+ @Override
+ protected void setup() {
+
+ final TextField tf = new TextField("Debug");
+ getLayout().addComponent(tf);
+
+ tf.addListener(new TextChangeListener() {
+ public void textChange(TextChangeEvent event) {
+ tf.setValue(event.getText());
+ }
+ });
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Moving current text to value in text change listener should not cause eternal loop.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 6376;
+ }
+
+} \ No newline at end of file