aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/com/vaadin/tests/components/upload/TestImmediateUploadInFormLayout.java
diff options
context:
space:
mode:
Diffstat (limited to 'uitest/src/com/vaadin/tests/components/upload/TestImmediateUploadInFormLayout.java')
-rw-r--r--uitest/src/com/vaadin/tests/components/upload/TestImmediateUploadInFormLayout.java54
1 files changed, 54 insertions, 0 deletions
diff --git a/uitest/src/com/vaadin/tests/components/upload/TestImmediateUploadInFormLayout.java b/uitest/src/com/vaadin/tests/components/upload/TestImmediateUploadInFormLayout.java
new file mode 100644
index 0000000000..7607536357
--- /dev/null
+++ b/uitest/src/com/vaadin/tests/components/upload/TestImmediateUploadInFormLayout.java
@@ -0,0 +1,54 @@
+package com.vaadin.tests.components.upload;
+
+import java.io.ByteArrayOutputStream;
+import java.io.OutputStream;
+import java.util.Collections;
+import java.util.List;
+
+import com.vaadin.tests.components.ComponentTestCase;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.FormLayout;
+import com.vaadin.ui.Upload;
+import com.vaadin.ui.Upload.Receiver;
+
+public class TestImmediateUploadInFormLayout extends
+ ComponentTestCase<FormLayout> implements Receiver {
+
+ @Override
+ protected String getDescription() {
+ return "On Firefox 3.5 and Opera 10.10, clicking on an immediate upload in a wide FormLayout has no effect";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 4359;
+ }
+
+ @Override
+ protected Class<FormLayout> getTestClass() {
+ return FormLayout.class;
+ }
+
+ @Override
+ protected void initializeComponents() {
+
+ FormLayout formLayout = new FormLayout();
+ formLayout.setWidth("100%");
+ Upload u = new Upload("Upload in FormLayout", this);
+ u.setImmediate(true);
+ formLayout.addComponent(u);
+ addTestComponent(formLayout);
+
+ }
+
+ @Override
+ protected List<Component> createActions() {
+ return Collections.emptyList();
+ }
+
+ @Override
+ public OutputStream receiveUpload(String filename, String MIMEType) {
+ getMainWindow().showNotification("Receiving upload");
+ return new ByteArrayOutputStream();
+ }
+}