summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2012-02-03 22:10:15 +0200
committerArtur Signell <artur@vaadin.com>2012-02-03 22:10:15 +0200
commit7f757e99c6ceba7754589bd36ea7a6b1a8fadeda (patch)
treeb1e78cdfd7e5c119c56335a306a22b9ef6b93af6 /tests
parent05907f4850cb43b0b7f7cded74642549d4a9d041 (diff)
parentc8dbc2549267d3660a1cca04630391dc8d6fd014 (diff)
downloadvaadin-framework-7f757e99c6ceba7754589bd36ea7a6b1a8fadeda.tar.gz
vaadin-framework-7f757e99c6ceba7754589bd36ea7a6b1a8fadeda.zip
Merge commit 'c8dbc2549267d3660a1cca04630391dc8d6fd014'
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;
+ }
+
+}