aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2012-09-03 11:45:27 +0300
committerJohannes Dahlström <johannesd@vaadin.com>2012-09-03 11:46:36 +0300
commitbd2e7a495b10fe903d1473ca1c5c6cbff9bf7011 (patch)
tree61541349d2619ecb129376ed2ee135a9a7fbe378 /uitest/src
parent54190550f969edc47901ba9a32239707231703f1 (diff)
downloadvaadin-framework-bd2e7a495b10fe903d1473ca1c5c6cbff9bf7011.tar.gz
vaadin-framework-bd2e7a495b10fe903d1473ca1c5c6cbff9bf7011.zip
Test case for #9452
Diffstat (limited to 'uitest/src')
-rw-r--r--uitest/src/com/vaadin/tests/components/panel/PanelConcurrentModificationException.java46
1 files changed, 46 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/panel/PanelConcurrentModificationException.java b/uitest/src/com/vaadin/tests/components/panel/PanelConcurrentModificationException.java
new file mode 100644
index 0000000000..9235eb3cfc
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/panel/PanelConcurrentModificationException.java
@@ -0,0 +1,46 @@
+package com.vaadin.tests.components.panel;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.ComponentContainer;
+import com.vaadin.ui.Label;
+import com.vaadin.ui.Notification;
+import com.vaadin.ui.Panel;
+
+public class PanelConcurrentModificationException extends TestBase {
+
+ private final ComponentContainer panel = new Panel();
+
+ @Override
+ protected void setup() {
+ addComponent(new Button("Click here for exception",
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ panel.addComponent(new Label("Label"));
+ }
+ }));
+ addComponent(new Button("Or click here first",
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(ClickEvent event) {
+ Notification
+ .show("It is now safe to click the other button");
+ }
+ }));
+ addComponent(panel);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Modifying Panel content causes Internal Error (ConcurrentModificationException)";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+
+}