diff options
author | Henri Sara <henri.sara@itmill.com> | 2011-11-16 10:39:05 +0000 |
---|---|---|
committer | Henri Sara <henri.sara@itmill.com> | 2011-11-16 10:39:05 +0000 |
commit | d8e680ed8f80d912c172171e4d2d42ac5531fe28 (patch) | |
tree | 79b02a88e3a2b8136e9960b3386ddd8af01f797f /tests | |
parent | 30ba9123951b2362e5e1efadcca169f8683de5d9 (diff) | |
download | vaadin-framework-d8e680ed8f80d912c172171e4d2d42ac5531fe28.tar.gz vaadin-framework-d8e680ed8f80d912c172171e4d2d42ac5531fe28.zip |
Merged some changes from 6.7 to 6.8
svn changeset:22016/svn branch:6.8
Diffstat (limited to 'tests')
-rw-r--r-- | tests/integration_tests.xml | 16 | ||||
-rw-r--r-- | tests/testbench/com/vaadin/tests/integration/EmbedSizeTest.java | 55 |
2 files changed, 64 insertions, 7 deletions
diff --git a/tests/integration_tests.xml b/tests/integration_tests.xml index 834c5fe608..46b6653a23 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-firefox36" />
+ <property name="test_browsers" value="winxp-firefox-latest" />
<!-- Path to key file. Default value -->
<property name="sshkey.file" value="id_dsa" />
@@ -231,6 +231,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>
@@ -239,6 +240,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>
@@ -352,6 +354,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) -->
@@ -394,18 +397,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/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); + } + +} |