summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-02-01 12:54:37 +0000
committerJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-02-01 12:54:37 +0000
commit5f5a0ac89695f25a7aa79a013a90f0595aced240 (patch)
tree0de48a364d3285b18087553f7475b57e5078e75b /tests
parentfbd4d8617b759ba7c35992c09a43a220ac151d29 (diff)
downloadvaadin-framework-5f5a0ac89695f25a7aa79a013a90f0595aced240.tar.gz
vaadin-framework-5f5a0ac89695f25a7aa79a013a90f0595aced240.zip
Test case for #8321
svn changeset:22849/svn branch:6.7
Diffstat (limited to 'tests')
-rw-r--r--tests/testbench/com/vaadin/tests/components/select/FocusListenerBreaksDropdownMenu.java37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/testbench/com/vaadin/tests/components/select/FocusListenerBreaksDropdownMenu.java b/tests/testbench/com/vaadin/tests/components/select/FocusListenerBreaksDropdownMenu.java
new file mode 100644
index 0000000000..dd2a8bb1a8
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/select/FocusListenerBreaksDropdownMenu.java
@@ -0,0 +1,37 @@
+package com.vaadin.tests.components.select;
+
+import com.vaadin.event.FieldEvents;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.ComboBox;
+
+public class FocusListenerBreaksDropdownMenu extends TestBase {
+
+ @Override
+ protected void setup() {
+ final ComboBox comboBox = new ComboBox();
+ for (int i = 0; i < 5; ++i) {
+ comboBox.addItem("Item " + i);
+ }
+
+ comboBox.addListener(new FieldEvents.FocusListener() {
+ public void focus(FieldEvents.FocusEvent event) {
+ comboBox.addItem();
+ }
+ });
+
+ comboBox.setImmediate(true);
+ addComponent(comboBox);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Clicking the dropdown arrow on a not-already-focused ComboBox "
+ + "breaks the dropdown list if a FocusListener adds or removes items";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 8321;
+ }
+
+}