package com.vaadin.tests.integration;
+import java.io.ByteArrayOutputStream;
+import java.io.OutputStream;
import java.util.Iterator;
import java.util.Map;
import com.vaadin.ui.Root;
import com.vaadin.ui.Root.LegacyWindow;
import com.vaadin.ui.TextField;
+import com.vaadin.ui.Upload;
+import com.vaadin.ui.Upload.Receiver;
/**
* Adapted from old PortletDemo to support integration testing.
portletMax.setEnabled(false);
main.addComponent(portletMax);
+ Upload upload = new Upload("Upload a file", new Receiver() {
+
+ public OutputStream receiveUpload(String filename, String mimeType) {
+ return new ByteArrayOutputStream();
+ }
+ });
+ main.addComponent(upload);
+
if (getContext() instanceof PortletApplicationContext2) {
PortletApplicationContext2 ctx = (PortletApplicationContext2) getContext();
ctx.addPortletListener(this, new DemoPortletListener());