summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2011-11-22 12:14:22 +0200
committerLeif Åstrand <leif@vaadin.com>2011-11-22 12:14:22 +0200
commite578248b13275b94c9985aaadc1bf16b4c8b20e5 (patch)
tree0a5aba877d47d538869fc061ee941f264a84af8d /tests
parent4b1d80a7b8906bd8ac72e762ea19e3cb55827f6b (diff)
parentb23d8dfaa5c27cd4bed0df1a654e59b0464707b5 (diff)
downloadvaadin-framework-e578248b13275b94c9985aaadc1bf16b4c8b20e5.tar.gz
vaadin-framework-e578248b13275b94c9985aaadc1bf16b4c8b20e5.zip
Merge remote branch 'origin/6.8'
Conflicts: tests/integration_tests.xml
Diffstat (limited to 'tests')
-rw-r--r--tests/integration_tests.xml16
-rw-r--r--tests/testbench/com/vaadin/tests/components/combobox/ComboBoxFiltering.html62
-rw-r--r--tests/testbench/com/vaadin/tests/components/combobox/ComboBoxIdenticalItems.html112
-rw-r--r--tests/testbench/com/vaadin/tests/components/combobox/ComboBoxIdenticalItems.java54
-rw-r--r--tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.htm48
-rw-r--r--tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.java50
-rw-r--r--tests/testbench/com/vaadin/tests/components/combobox/ComboBoxNullItem.html62
-rw-r--r--tests/testbench/com/vaadin/tests/components/combobox/ComboBoxSlow.java55
-rw-r--r--tests/testbench/com/vaadin/tests/components/combobox/Comboboxes.html29
-rw-r--r--tests/testbench/com/vaadin/tests/components/datefield/DateFieldTimezone.html3
-rw-r--r--tests/testbench/com/vaadin/tests/components/treetable/DisappearingComponents.java6
-rw-r--r--tests/testbench/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.html117
-rw-r--r--tests/testbench/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.java141
-rw-r--r--tests/testbench/com/vaadin/tests/dd/StartHtml5Drag.java65
-rw-r--r--tests/testbench/com/vaadin/tests/dd/html5drop.htm51
-rw-r--r--tests/testbench/com/vaadin/tests/integration/EmbedSizeTest.java55
16 files changed, 904 insertions, 22 deletions
diff --git a/tests/integration_tests.xml b/tests/integration_tests.xml
index 2a420553b7..2f10394ee0 100644
--- a/tests/integration_tests.xml
+++ b/tests/integration_tests.xml
@@ -9,7 +9,7 @@
<fail unless="test.integration.antfile" message="test.integration.antfile must be set for integration tests to run"/>
<!-- Test with these browsers -->
- <property name="test_browsers" value="winxp-safari5" />
+ <property name="test_browsers" value="winxp-firefox-latest" />
<!-- Path to key file. Default value -->
<property name="sshkey.file" value="id_dsa" />
@@ -217,6 +217,7 @@
<fileset dir="integration-testscripts" id="html-test-files" includes="GateIn-3/integration-test-GateIn-3.1.0-portlet2.html" />
<pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
<antcall target="run-generic-integration-test">
+ <param name="test_browsers" value="winxp-firefox36" />
<param name="target-server" value="gatein3" />
</antcall>
</target>
@@ -225,6 +226,7 @@
<fileset dir="integration-testscripts" id="html-test-files" includes="eXo-3/integration-test-eXo-3.0.3-portlet2.html" />
<pathconvert pathsep=" " property="testfiles" refid="html-test-files" />
<antcall target="run-generic-integration-test">
+ <param name="test_browsers" value="winxp-firefox36" />
<param name="target-server" value="exo3" />
</antcall>
</target>
@@ -336,6 +338,7 @@
</fileset>
</scp>
+ <!-- trycatch probably not needed any more as it just fails with the original message and doesn't do anything in the finally block -->
<trycatch property="error_message">
<try>
<!-- timeout in one hour (remote end should timeout in 55 minutes) -->
@@ -378,18 +381,17 @@
</antcall>
</then>
</if>
- </try>
- <catch>
- <fail message="${error_message}" />
- </catch>
- <finally>
+
<!-- timeout in five minutes -->
<sshexec host="${target-host}" outputproperty="stop-output" timeout="300000" username="${user}" keyfile="${sshkey.file}" trust="yes" command="ant -f deploy.xml shutdown-and-cleanup" failonerror="false" />
<antcall target="echo-prefix">
<param name="prefix" value="${target-server}: " />
<param name="message" value="${stop-output}" />
</antcall>
- </finally>
+ </try>
+ <catch>
+ <fail message="${error_message}" />
+ </catch>
</trycatch>
</target>
diff --git a/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxFiltering.html b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxFiltering.html
new file mode 100644
index 0000000000..3de221871d
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxFiltering.html
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.combobox.ComboBoxSlow?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxSlow::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>92,19</td>
+</tr>
+<tr>
+ <td>enterCharacter</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxSlow::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>1</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>filter-no-match</td>
+</tr>
+<tr>
+ <td>enterCharacter</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxSlow::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>Item 12</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>filter-11-matches-paging</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>filter-11-matches-page-2</td>
+</tr>
+<tr>
+ <td>enterCharacter</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxSlow::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>Item 100</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>filter-2-matches-no-paging</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxIdenticalItems.html b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxIdenticalItems.html
new file mode 100644
index 0000000000..6d18c60038
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxIdenticalItems.html
@@ -0,0 +1,112 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.combobox.ComboBoxIdenticalItems?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>66,8</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>down</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>down</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>enter</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::PID_SLog_row_0</td>
+ <td>1. Item one-1 selected</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>down</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>down</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>enter</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::PID_SLog_row_0</td>
+ <td>2. Item one-2 selected</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>down</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>down</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>enter</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::PID_SLog_row_0</td>
+ <td>3. Item two selected</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>up</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>up</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>up</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VFilterSelect[0]/domChild[0]</td>
+ <td>enter</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxIdenticalItems::PID_SLog_row_0</td>
+ <td>4. Item one-1 selected</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxIdenticalItems.java b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxIdenticalItems.java
new file mode 100644
index 0000000000..dcd4af58ad
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxIdenticalItems.java
@@ -0,0 +1,54 @@
+package com.vaadin.tests.components.combobox;
+
+import com.vaadin.data.Item;
+import com.vaadin.data.Property;
+import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.tests.util.Log;
+import com.vaadin.ui.ComboBox;
+
+public class ComboBoxIdenticalItems extends TestBase {
+
+ private Log log = new Log(5);
+
+ @Override
+ public void setup() {
+ final ComboBox select = new ComboBox("ComboBox");
+ select.addContainerProperty("caption", String.class, null);
+ Item item = select.addItem("one-1");
+ item.getItemProperty("caption").setValue("One");
+ item = select.addItem("one-2");
+ item.getItemProperty("caption").setValue("One");
+ item = select.addItem("two");
+ item.getItemProperty("caption").setValue("Two");
+ select.setItemCaptionPropertyId("caption");
+ select.setNullSelectionAllowed(false);
+ select.setImmediate(true);
+ select.addListener(new Property.ValueChangeListener() {
+ private static final long serialVersionUID = -7932700771673919620L;
+
+ public void valueChange(ValueChangeEvent event) {
+ log.log("Item " + select.getValue() + " selected");
+
+ }
+ });
+
+ addComponent(log);
+ addComponent(select);
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Keyboard selecting of a value is broken in combobox if two "
+ + "items have the same caption. The first item's id is \"One-1\" "
+ + "while the second one is \"One-2\". Selecting with mouse works "
+ + "as expected but selecting with keyboard always returns the "
+ + "object \"One-1\".";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ // TODO Auto-generated method stub
+ return null;
+ }
+}
diff --git a/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.htm b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.htm
new file mode 100644
index 0000000000..f943f912e4
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.htm
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.combobox.ComboBoxInPopup?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxInPopup::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[1]</td>
+ <td>12,13</td>
+</tr>
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxInPopup::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td>
+ <td>Yes</td>
+</tr>
+<tr>
+ <td>pressSpecialKey</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxInPopup::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td>
+ <td>esc</td>
+</tr>
+<!--ensure the sub window is still open but the popup is not-->
+<tr>
+ <td>assertText</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxInPopup::/VWindow[0]/FocusableScrollPanel[0]/VVerticalLayout[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td>
+ <td>A combo box</td>
+</tr>
+<tr>
+ <td>assertElementNotPresent</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxInPopup::Root/VFilterSelect$SuggestionPopup[0]/VFilterSelect$SuggestionMenu[0]#item1</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.java b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.java
new file mode 100644
index 0000000000..8160fb576e
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxInPopup.java
@@ -0,0 +1,50 @@
+package com.vaadin.tests.components.combobox;
+
+import com.vaadin.event.ShortcutAction.KeyCode;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.ComboBox;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.Window;
+
+public class ComboBoxInPopup extends TestBase {
+
+ @Override
+ protected void setup() {
+ final Window w = new Window();
+ w.getContent().setSizeUndefined();
+ w.addComponent(createComboBox());
+ Button close = new Button("Close window", new Button.ClickListener() {
+
+ public void buttonClick(ClickEvent event) {
+ w.getParent().removeWindow(w);
+ }
+ });
+ close.setClickShortcut(KeyCode.ESCAPE, null);
+ w.addComponent(close);
+
+ getLayout().getWindow().addWindow(w);
+
+ }
+
+ private Component createComboBox() {
+ ComboBox cb = new ComboBox("A combo box");
+
+ cb.addItem("Yes");
+ cb.addItem("No");
+ cb.addItem("Maybe");
+ return cb;
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Escape is a shortcut for the close button. Pressing escape when the popup is open should cause only the popup to close, not the window.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 6978;
+ }
+
+}
diff --git a/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxNullItem.html b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxNullItem.html
new file mode 100644
index 0000000000..3dc31f4a98
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxNullItem.html
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="http://arturwin.office.itmill.com:8888/" />
+<title>New Test</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">New Test</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.combobox.ComboBoxNavigation?restartApplication&amp;theme=chameleon</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxNavigation::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[1]</td>
+ <td>5,9</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>combobox-with-null-item-chameleon</td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.combobox.ComboBoxNavigation?restartApplication&amp;theme=runo</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxNavigation::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[1]</td>
+ <td>5,9</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>combobox-with-null-item-runo</td>
+</tr>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.components.combobox.ComboBoxNavigation?restartApplication&amp;theme=reindeer</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboBoxNavigation::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[1]</td>
+ <td>5,9</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>combobox-with-null-item-reindeer</td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxSlow.java b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxSlow.java
new file mode 100644
index 0000000000..15742cc783
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/components/combobox/ComboBoxSlow.java
@@ -0,0 +1,55 @@
+package com.vaadin.tests.components.combobox;
+
+import java.util.Map;
+
+import com.vaadin.data.Property.ValueChangeEvent;
+import com.vaadin.data.Property.ValueChangeListener;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.tests.util.Log;
+import com.vaadin.ui.ComboBox;
+
+public class ComboBoxSlow extends TestBase {
+
+ private Log log = new Log(5);
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 7949;
+ }
+
+ @Override
+ protected String getDescription() {
+ return "The ComboBox artificially introduces a server delay to more easily spot problems";
+ }
+
+ public class SlowComboBox extends ComboBox {
+ @Override
+ public void changeVariables(Object source, Map<String, Object> variables) {
+ try {
+ Thread.sleep(1000);
+ } catch (InterruptedException e) {
+ // TODO Auto-generated catch block
+ e.printStackTrace();
+ }
+ super.changeVariables(source, variables);
+ }
+ }
+
+ @Override
+ protected void setup() {
+ addComponent(log);
+ final SlowComboBox cb = new SlowComboBox();
+ cb.setImmediate(true);
+ for (int i = 0; i <= 1000; i++) {
+ cb.addItem("Item " + i);
+ }
+ cb.addListener(new ValueChangeListener() {
+
+ public void valueChange(ValueChangeEvent event) {
+ log.log("Value changed to " + cb.getValue());
+
+ }
+ });
+ addComponent(cb);
+ }
+}
diff --git a/tests/testbench/com/vaadin/tests/components/combobox/Comboboxes.html b/tests/testbench/com/vaadin/tests/components/combobox/Comboboxes.html
index 1affc9a8a9..4aa84a9453 100644
--- a/tests/testbench/com/vaadin/tests/components/combobox/Comboboxes.html
+++ b/tests/testbench/com/vaadin/tests/components/combobox/Comboboxes.html
@@ -250,30 +250,39 @@
</tr>
<tr>
<td>mouseClick</td>
- <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::PID_Scheckboxaction-Readonly/domChild[0]</td>
- <td>26,10</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::PID_Scheckboxaction-Required/domChild[0]</td>
+ <td>12,-8</td>
</tr>
<tr>
- <td>waitForVaadin</td>
- <td></td>
- <td></td>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::PID_Scheckboxaction-Error indicators/domChild[0]</td>
+ <td>7,-8</td>
</tr>
<tr>
<td>screenCapture</td>
<td></td>
- <td>error</td>
+ <td>readonly-required</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::PID_Scheckboxaction-Readonly/domChild[0]</td>
+ <td>26,10</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::PID_Scheckboxaction-Required/domChild[0]</td>
+ <td>3,-7</td>
</tr>
<tr>
<td>mouseClick</td>
<td>vaadin=runcomvaadintestscomponentscomboboxComboboxes::PID_Scheckboxaction-Error indicators/domChild[0]</td>
- <td>67,8</td>
+ <td>7,-8</td>
</tr>
<tr>
- <td>waitForVaadin</td>
- <td></td>
+ <td>screenCapture</td>
<td></td>
+ <td>error</td>
</tr>
-
</tbody></table>
</body>
</html>
diff --git a/tests/testbench/com/vaadin/tests/components/datefield/DateFieldTimezone.html b/tests/testbench/com/vaadin/tests/components/datefield/DateFieldTimezone.html
index ca354dd240..2a67b16170 100644
--- a/tests/testbench/com/vaadin/tests/components/datefield/DateFieldTimezone.html
+++ b/tests/testbench/com/vaadin/tests/components/datefield/DateFieldTimezone.html
@@ -22,7 +22,7 @@
<td>6,10</td>
</tr>
<tr>
- <td>type</td>
+ <td>enterCharacter</td>
<td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldTimezone::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[0]/VFilterSelect[0]/domChild[0]</td>
<td>Europe/Helsinki (Eastern European Time)</td>
</tr>
@@ -51,7 +51,6 @@
<td>vaadin=runcomvaadintestscomponentsdatefieldDateFieldTimezone::PID_SLog_row_0</td>
<td>2. Date changed to 12/31/09 11:00:00 PM UTC</td>
</tr>
-
</tbody></table>
</body>
</html>
diff --git a/tests/testbench/com/vaadin/tests/components/treetable/DisappearingComponents.java b/tests/testbench/com/vaadin/tests/components/treetable/DisappearingComponents.java
index 0b972f07b2..becae955ab 100644
--- a/tests/testbench/com/vaadin/tests/components/treetable/DisappearingComponents.java
+++ b/tests/testbench/com/vaadin/tests/components/treetable/DisappearingComponents.java
@@ -1,15 +1,15 @@
package com.vaadin.tests.components.treetable;
import com.vaadin.terminal.ExternalResource;
-import com.vaadin.tests.components.TestBase;
+import com.vaadin.tests.components.AbstractTestCase;
import com.vaadin.ui.Link;
import com.vaadin.ui.TreeTable;
import com.vaadin.ui.Window;
-public class DisappearingComponents extends TestBase {
+public class DisappearingComponents extends AbstractTestCase {
@Override
- protected void setup() {
+ public void init() {
Window mainWindow = new Window("Application");
final TreeTable tt = new TreeTable();
tt.setSizeUndefined();
diff --git a/tests/testbench/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.html b/tests/testbench/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.html
new file mode 100644
index 0000000000..b5ccd53df0
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.html
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head profile="http://selenium-ide.openqa.org/profiles/test-case">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
+<link rel="selenium.base" href="" />
+<title>FileSystemContainerInTreeTable</title>
+</head>
+<body>
+<table cellpadding="1" cellspacing="1" border="1">
+<thead>
+<tr><td rowspan="1" colspan="3">FileSystemContainerInTreeTable</td></tr>
+</thead><tbody>
+<tr>
+ <td>open</td>
+ <td>/run/com.vaadin.tests.containers.filesystemcontainer.FileSystemContainerInTreeTable?restartApplication</td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>initial</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscontainersfilesystemcontainerFileSystemContainerInTreeTable::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>added_not_yet_visible</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscontainersfilesystemcontainerFileSystemContainerInTreeTable::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTreeTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td>
+ <td>30,8</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>added_dir2_expanded</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscontainersfilesystemcontainerFileSystemContainerInTreeTable::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscontainersfilesystemcontainerFileSystemContainerInTreeTable::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTreeTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[2]/domChild[0]/domChild[0]/domChild[0]</td>
+ <td>32,6</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>deleted_dir2_collapsed</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscontainersfilesystemcontainerFileSystemContainerInTreeTable::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTreeTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td>
+ <td>32,4</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>deleted_dir2_expanded</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscontainersfilesystemcontainerFileSystemContainerInTreeTable::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[0]/VButton[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscontainersfilesystemcontainerFileSystemContainerInTreeTable::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTreeTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]</td>
+ <td>31,8</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>added_dir2_collapsed</td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscontainersfilesystemcontainerFileSystemContainerInTreeTable::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTreeTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td>
+ <td>29,5</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>added_dir1_expanded</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscontainersfilesystemcontainerFileSystemContainerInTreeTable::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[1]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+<tr>
+ <td>mouseClick</td>
+ <td>vaadin=runcomvaadintestscontainersfilesystemcontainerFileSystemContainerInTreeTable::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[1]/VTreeTable[0]/domChild[1]/domChild[0]/domChild[1]/domChild[0]/domChild[0]/domChild[0]/domChild[0]/domChild[0]</td>
+ <td>32,8</td>
+</tr>
+<tr>
+ <td>screenCapture</td>
+ <td></td>
+ <td>deleted_dir1_collapsed</td>
+</tr>
+<tr>
+ <td>click</td>
+ <td>vaadin=runcomvaadintestscontainersfilesystemcontainerFileSystemContainerInTreeTable::/VVerticalLayout[0]/ChildComponentContainer[1]/VVerticalLayout[0]/ChildComponentContainer[2]/VHorizontalLayout[0]/ChildComponentContainer[2]/VButton[0]/domChild[0]/domChild[0]</td>
+ <td></td>
+</tr>
+
+</tbody></table>
+</body>
+</html>
diff --git a/tests/testbench/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.java b/tests/testbench/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.java
new file mode 100644
index 0000000000..b3b5185505
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/containers/filesystemcontainer/FileSystemContainerInTreeTable.java
@@ -0,0 +1,141 @@
+package com.vaadin.tests.containers.filesystemcontainer;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.ArrayList;
+
+import com.vaadin.data.Container;
+import com.vaadin.data.Container.Ordered;
+import com.vaadin.data.util.FilesystemContainer;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.tests.util.Log;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.HorizontalLayout;
+import com.vaadin.ui.Table;
+import com.vaadin.ui.Tree.CollapseEvent;
+import com.vaadin.ui.Tree.CollapseListener;
+import com.vaadin.ui.Tree.ExpandEvent;
+import com.vaadin.ui.Tree.ExpandListener;
+import com.vaadin.ui.TreeTable;
+
+public class FileSystemContainerInTreeTable extends TestBase {
+
+ private Log log = new Log(5);
+ private TreeTable treeTable;
+
+ @Override
+ protected void setup() {
+ setTheme("reindeer-tests");
+
+ final File folder;
+ try {
+ File tempFile = File.createTempFile("fsc-tt", "");
+ tempFile.delete();
+ folder = new File(tempFile.getParent(), tempFile.getName());
+ folder.mkdir();
+ System.out.println(folder.getPath());
+ folder.deleteOnExit();
+
+ populate(folder, 3, 10);
+
+ FilesystemContainer fsc = new FilesystemContainer(folder);
+
+ treeTable = new TreeTable();
+ treeTable.addStyleName("table-equal-rowheight");
+ treeTable.setWidth("450px");
+ treeTable.setHeight("550px");
+ treeTable.setContainerDataSource(fsc);
+ treeTable.setItemIconPropertyId(FilesystemContainer.PROPERTY_ICON);
+ treeTable.setVisibleColumns(new String[] { "Name" });
+ treeTable.setColumnWidth("Name", 400);
+ treeTable.addListener(new ExpandListener() {
+
+ public void nodeExpand(ExpandEvent event) {
+ logExpandCollapse(event.getItemId(), "expanded");
+
+ }
+ });
+ treeTable.addListener(new CollapseListener() {
+
+ public void nodeCollapse(CollapseEvent event) {
+ logExpandCollapse(event.getItemId(), "collapsed");
+
+ }
+ });
+
+ addComponent(log);
+ addComponent(treeTable);
+
+ HorizontalLayout buttonLayout = new HorizontalLayout();
+ buttonLayout.setSpacing(true);
+ buttonLayout.addComponent(new Button("Create dir11",
+ new Button.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ new File(folder, "dir11").mkdir();
+ log.log("Row dir11 created");
+ }
+ }));
+ buttonLayout.addComponent(new Button("Delete dir11",
+ new Button.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ new File(folder, "dir11").delete();
+ log.log("Row dir11 deleted");
+ }
+ }));
+ // to clean up explicitly before ending an automated test
+ buttonLayout.addComponent(new Button("Clean all files",
+ new Button.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ folder.delete();
+ }
+ }));
+ addComponent(buttonLayout);
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+
+ private void populate(File folder, int subDirectories, int files)
+ throws IOException {
+ for (int i = 1; i <= files; i++) {
+ File f = new File(folder, "file" + i + ".txt");
+ f.createNewFile();
+ }
+
+ for (int i = 1; i <= subDirectories; i++) {
+ File f = new File(folder, "dir" + i);
+ f.mkdir();
+ populate(f, 0, 2);
+ }
+ }
+
+ protected int indexOfId(Table source, Object itemId) {
+ Container.Ordered c = (Ordered) source.getContainerDataSource();
+ if (c instanceof Container.Indexed) {
+ return ((Container.Indexed) source).indexOfId(itemId);
+ } else {
+ ArrayList<Object> list = new ArrayList<Object>(source.getItemIds());
+ return list.indexOf(itemId);
+ }
+ }
+
+ protected void logExpandCollapse(Object itemId, String operation) {
+ File file = (File) itemId;
+ // do not use the variable part (path) of file name
+ log.log("Row " + file.getName() + " " + operation + ". Row index: "
+ + indexOfId(treeTable, itemId));
+
+ }
+
+ @Override
+ protected String getDescription() {
+ return "TreeTable partial updates can only be used with a container that notifies the TreeTable of item set changes";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 7837;
+ }
+
+} \ No newline at end of file
diff --git a/tests/testbench/com/vaadin/tests/dd/StartHtml5Drag.java b/tests/testbench/com/vaadin/tests/dd/StartHtml5Drag.java
new file mode 100644
index 0000000000..2cdef65d31
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/dd/StartHtml5Drag.java
@@ -0,0 +1,65 @@
+package com.vaadin.tests.dd;
+
+import com.vaadin.event.dd.DragAndDropEvent;
+import com.vaadin.event.dd.DropHandler;
+import com.vaadin.event.dd.acceptcriteria.AcceptAll;
+import com.vaadin.event.dd.acceptcriteria.AcceptCriterion;
+import com.vaadin.terminal.ClassResource;
+import com.vaadin.terminal.Sizeable;
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.ui.DragAndDropWrapper;
+import com.vaadin.ui.DragAndDropWrapper.DragStartMode;
+import com.vaadin.ui.DragAndDropWrapper.WrapperTransferable;
+import com.vaadin.ui.Embedded;
+import com.vaadin.ui.Label;
+
+public class StartHtml5Drag extends TestBase {
+
+ @Override
+ protected void setup() {
+ DragAndDropWrapper dragStart = new DragAndDropWrapper(new Label(
+ "Drag me"));
+ dragStart.setDragStartMode(DragStartMode.HTML5);
+ dragStart.setHTML5DataFlavor("Text", "HTML5!");
+ addComponent(dragStart);
+
+ DragAndDropWrapper dropTarget = new DragAndDropWrapper(new Label(
+ "over here"));
+ dropTarget.setDropHandler(new DropHandler() {
+
+ public AcceptCriterion getAcceptCriterion() {
+ return AcceptAll.get();
+ }
+
+ public void drop(DragAndDropEvent event) {
+ getWindows()
+ .iterator()
+ .next()
+ .showNotification(
+ ((WrapperTransferable) event.getTransferable())
+ .getText());
+ }
+ });
+ addComponent(dropTarget);
+
+ Embedded iframe = new Embedded("", new ClassResource("html5drop.htm",
+ this));
+ iframe.setType(Embedded.TYPE_BROWSER);
+ iframe.setWidth(400, Sizeable.UNITS_PIXELS);
+ iframe.setHeight(400, Sizeable.UNITS_PIXELS);
+ addComponent(iframe);
+
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Should work. Try to e.g. drag the 'Hello Vaadin user' "
+ + "label to native text editor application. In text "
+ + "editor app 'HTML5!' text should appear.";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return 7833;
+ }
+}
diff --git a/tests/testbench/com/vaadin/tests/dd/html5drop.htm b/tests/testbench/com/vaadin/tests/dd/html5drop.htm
new file mode 100644
index 0000000000..ed05fcedea
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/dd/html5drop.htm
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="UTF-8">
+<title>Insert title here</title>
+<script type="text/javascript">
+ if (window.addEventListener) {
+ window.addEventListener('load', init, false); //W3C
+ } else {
+ window.attachEvent('onload', init); //IE
+ }
+
+ function init(event) {
+ var el = document.getElementById("drop");
+ if (el.addEventListener) {
+ el.addEventListener("dragover", dragover, false);
+ el.addEventListener("dragenter", dragenter, false);
+ el.addEventListener("drop", drop, false);
+ } else if (el.attachEvent) {
+ el.attachEvent('ondragover', dragover);
+ el.attachEvent('ondragenter', dragenter);
+ el.attachEvent('ondrop', drop);
+ }
+ }
+
+ function dragover(event) {
+ event.dataTransfer.dropEffect = 'copy';
+ return cancel(event);
+ }
+
+ function drop(event) {
+ document.getElementById("drop").innerHTML = event.dataTransfer.getData('Text');
+ return cancel(event);
+ }
+
+ function dragenter(event) {
+ return cancel(event);
+ }
+
+ function cancel(event) {
+ if (event.preventDefault) {
+ event.preventDefault();
+ }
+ return false;
+ }
+</script>
+</head>
+<body>
+ <div id="drop">or over here</div>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/testbench/com/vaadin/tests/integration/EmbedSizeTest.java b/tests/testbench/com/vaadin/tests/integration/EmbedSizeTest.java
new file mode 100644
index 0000000000..479af4aa87
--- /dev/null
+++ b/tests/testbench/com/vaadin/tests/integration/EmbedSizeTest.java
@@ -0,0 +1,55 @@
+package com.vaadin.tests.integration;
+
+import com.vaadin.tests.components.TestBase;
+import com.vaadin.tests.util.Log;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Button.ClickEvent;
+import com.vaadin.ui.CheckBox;
+import com.vaadin.ui.Window;
+import com.vaadin.ui.Window.ResizeEvent;
+
+public class EmbedSizeTest extends TestBase {
+
+ private Log log = new Log(10);
+
+ @Override
+ protected void setup() {
+ Window mainWindow = getMainWindow();
+ mainWindow.setSizeUndefined();
+ mainWindow.getContent().setSizeUndefined();
+ mainWindow.setImmediate(true);
+
+ CheckBox lazyCheckBox = new CheckBox("Lazy resize",
+ new Button.ClickListener() {
+ public void buttonClick(ClickEvent event) {
+ boolean resizeLazy = Boolean.TRUE == event.getButton()
+ .getValue();
+ getMainWindow().setResizeLazy(resizeLazy);
+ log.log("Resize lazy: " + resizeLazy);
+ }
+ });
+ lazyCheckBox.setValue(Boolean.FALSE);
+ lazyCheckBox.setImmediate(true);
+ addComponent(lazyCheckBox);
+
+ addComponent(log);
+ mainWindow.addListener(new Window.ResizeListener() {
+ public void windowResized(ResizeEvent e) {
+ Window window = e.getWindow();
+ log.log("Resize event: " + window.getWidth() + " x "
+ + window.getHeight());
+ }
+ });
+ }
+
+ @Override
+ protected String getDescription() {
+ return "Resizing the browser window should send consistent resize events to the server even when the application is embedded";
+ }
+
+ @Override
+ protected Integer getTicketNumber() {
+ return Integer.valueOf(7923);
+ }
+
+}