From 0e048a5ba6cf734485fc83cb3b264b8ff104ecb9 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 16 Sep 2013 15:49:35 +0300 Subject: Clarified error message (#12583) Change-Id: I542046158f6e78c8bb26aaee110bd5b123ae13e6 --- server/src/com/vaadin/ui/UI.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server/src/com/vaadin/ui/UI.java b/server/src/com/vaadin/ui/UI.java index 0746431302..27f04c39e1 100644 --- a/server/src/com/vaadin/ui/UI.java +++ b/server/src/com/vaadin/ui/UI.java @@ -402,9 +402,12 @@ public abstract class UI extends AbstractSingleComponentContainer implements * @see #getSession() */ public void setSession(VaadinSession session) { - if ((session == null) == (this.session == null)) { + if (session == null && this.session == null) { throw new IllegalStateException( - "VaadinServiceSession has already been set. Old session: " + "Session should never be set to null when UI.session is already null"); + } else if (session != null && this.session != null) { + throw new IllegalStateException( + "Session has already been set. Old session: " + getSessionDetails(this.session) + ". New session: " + getSessionDetails(session) + "."); -- cgit v1.2.3 From d0af7d103a94cc7c7817b2fd7cb7cc2ba3bcd519 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 4 Sep 2013 20:07:54 +0300 Subject: Add async-supported to all servlets to enable push testing (#12573) Change-Id: I8025c7d032f1a76244dbf085e76cb231c1a4459c --- WebContent/WEB-INF/web.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WebContent/WEB-INF/web.xml b/WebContent/WEB-INF/web.xml index ba948968e2..b93e0670fc 100644 --- a/WebContent/WEB-INF/web.xml +++ b/WebContent/WEB-INF/web.xml @@ -24,6 +24,7 @@ application com.vaadin.tests.components.button.Buttons + true Embed App 2 @@ -32,6 +33,7 @@ UI com.vaadin.tests.components.label.MarginsInLabels + true UI provider app @@ -44,6 +46,7 @@ UI com.vaadin.tests.VerifyAssertionsEnabled + true @@ -70,6 +73,7 @@ testParam 42 + true -- cgit v1.2.3 From 1de438915468e92ad0657ac4f22dc3e1b1580e63 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 4 Sep 2013 15:58:26 +0300 Subject: Use JUnit 4.11 in all modules (#12572) Change-Id: I244f4afdebe956166a9158d85dc69fd7746c5a47 --- client/ivy.xml | 2 +- server/ivy.xml | 2 +- theme-compiler/ivy.xml | 2 +- uitest/ivy.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/ivy.xml b/client/ivy.xml index 5d079537b9..ccc304be3d 100644 --- a/client/ivy.xml +++ b/client/ivy.xml @@ -32,7 +32,7 @@ - - diff --git a/theme-compiler/ivy.xml b/theme-compiler/ivy.xml index 5bcdbb54cb..7b99b2cdaa 100644 --- a/theme-compiler/ivy.xml +++ b/theme-compiler/ivy.xml @@ -40,7 +40,7 @@ rev="2.4" conf="build-provided->default" /> - diff --git a/uitest/ivy.xml b/uitest/ivy.xml index 7ff83324ae..e737165288 100644 --- a/uitest/ivy.xml +++ b/uitest/ivy.xml @@ -61,7 +61,7 @@ - Date: Mon, 10 Jun 2013 21:32:57 +0300 Subject: Include TestBench 3.1.1 in the project (#12572) * Jetty is updated to 8.1.9.v20130131 to avoid conflicts with TestBench dependencies * The new jetty dependens on servlet 3.0 Change-Id: Ibbbc8f5838feb4c132ee2b6f7d7f3f630e95dd68 --- ivysettings.xml | 4 +++ uitest/ivy.xml | 38 ++++++++++++++-------- .../vaadin/launcher/DevelopmentServerLauncher.java | 8 +++-- 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/ivysettings.xml b/ivysettings.xml index fa08f3d0bb..e18b2233d1 100644 --- a/ivysettings.xml +++ b/ivysettings.xml @@ -11,6 +11,8 @@ + @@ -23,6 +25,8 @@ + + +]> - + @@ -23,9 +26,6 @@ - - @@ -33,7 +33,9 @@ + rev="${vaadin.version}" conf="build->build"> + + + conf="build->build"> + + - + + + + rev="&jetty.version;" conf="ide, build-provided, jetty-run->default"> + + + rev="&jetty.version;" conf="ide, build-provided, jetty-run->default" /> + rev="&jetty.version;" conf="ide, jetty-run->default" /> + rev="&jetty.version;" conf="ide, build-provided, jetty-run->default" /> + rev="&jetty.version;" conf="ide, jetty-run->default"> + + @@ -71,6 +81,8 @@ + diff --git a/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java b/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java index 5ab2134cdb..a8d639cbc8 100644 --- a/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java +++ b/uitest/src/com/vaadin/launcher/DevelopmentServerLauncher.java @@ -24,10 +24,12 @@ import java.net.ServerSocket; import java.net.Socket; import java.text.SimpleDateFormat; import java.util.Calendar; +import java.util.EnumSet; import java.util.HashMap; import java.util.Map; import java.util.Map.Entry; +import javax.servlet.DispatcherType; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; @@ -181,7 +183,8 @@ public class DevelopmentServerLauncher { String[] paths = serverArgs.get("slowdown").split(","); for (String p : paths) { System.out.println("Slowing down: " + p); - webappcontext.addFilter(SlowFilter.class, p, 1); + webappcontext.addFilter(SlowFilter.class, p, + EnumSet.of(DispatcherType.REQUEST)); } } // --cache=/run/APP/PUBLISHED/*,/other/path/asd.jpg @@ -190,7 +193,8 @@ public class DevelopmentServerLauncher { String[] paths = serverArgs.get("cache").split(","); for (String p : paths) { System.out.println("Enabling cache for: " + p); - webappcontext.addFilter(CacheFilter.class, p, 1); + webappcontext.addFilter(CacheFilter.class, p, + EnumSet.of(DispatcherType.REQUEST)); } } -- cgit v1.2.3 From cdb9a49bd542fe28ed29c52b90ee9875e2556f67 Mon Sep 17 00:00:00 2001 From: Johannes Dahlström Date: Tue, 10 Sep 2013 15:36:51 +0300 Subject: Enable native scrolling in all iOS versions newer than 5, not just iOS 6 (#12324) Change-Id: I8f9ec7f34aefa5b48fd23f3f000f9455475edefa --- WebContent/VAADIN/themes/base/common/common.scss | 8 +++++--- client/src/com/vaadin/client/BrowserInfo.java | 8 ++++---- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/WebContent/VAADIN/themes/base/common/common.scss b/WebContent/VAADIN/themes/base/common/common.scss index cb3645c9d8..07e244a76f 100644 --- a/WebContent/VAADIN/themes/base/common/common.scss +++ b/WebContent/VAADIN/themes/base/common/common.scss @@ -227,11 +227,13 @@ input::-ms-clear { font-size: 0; line-height: normal; } - -/* Enable kinetic scrolling on iOS 6 */ -.v-ios6.v-webkit & .v-scrollable { +.v-ios.v-webkit & .v-scrollable { -webkit-overflow-scrolling: touch; } +/* Disable native scrolling on iOS 5 due to #8792 */ +.v-ios5.v-webkit & .v-scrollable { + -webkit-overflow-scrolling: none; +} &.v-overlay-container { width: 0; diff --git a/client/src/com/vaadin/client/BrowserInfo.java b/client/src/com/vaadin/client/BrowserInfo.java index 5d588f6f8b..84b6f14c34 100644 --- a/client/src/com/vaadin/client/BrowserInfo.java +++ b/client/src/com/vaadin/client/BrowserInfo.java @@ -207,8 +207,8 @@ public class BrowserInfo { return prefix + OS_ANDROID; } else if (browserDetails.isIOS()) { String iosClass = prefix + OS_IOS; - if (isIOS6()) { - iosClass += " " + prefix + OS_IOS + "6"; + if (getOperatingSystemMajorVersion() == 5) { + iosClass += " " + prefix + OS_IOS + "5"; } return iosClass; } else if (browserDetails.isWindows()) { @@ -392,9 +392,9 @@ public class BrowserInfo { if (isAndroid() && isWebkit() && getWebkitVersion() >= 534) { return false; } - // iOS 6 Safari supports native scrolling; iOS 5 suffers from #8792 + // iOS 6+ Safari supports native scrolling; iOS 5 suffers from #8792 // TODO Should test other iOS browsers - if (isIOS6() && isWebkit()) { + if (isIOS() && isWebkit() && getOperatingSystemMajorVersion() >= 6) { return false; } return true; -- cgit v1.2.3 From 0e2780a0ad6212a7bee9d204464504c6ed0e41a1 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 16 Sep 2013 14:33:54 +0300 Subject: Ensure string converter is always set Change-Id: I8c9146975397356e92fded0d0207b56d057ac6c5 --- .../tests/server/component/abstractfield/AbsFieldValueConversions.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversions.java b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversions.java index 9854296538..a5e825bddb 100644 --- a/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversions.java +++ b/server/tests/src/com/vaadin/tests/server/component/abstractfield/AbsFieldValueConversions.java @@ -249,6 +249,7 @@ public class AbsFieldValueConversions extends TestCase { @Test public void testNullConverter() { TextField tf = new TextField("foo"); + tf.setConverter(new StringToIntegerConverter()); tf.setPropertyDataSource(new ObjectProperty(12)); tf.setConverter((Converter) null); try { -- cgit v1.2.3 From cf796e281ec684c94117725ab27d4089859e0161 Mon Sep 17 00:00:00 2001 From: Johannes Dahlström Date: Thu, 19 Sep 2013 14:23:46 +0300 Subject: Add v-iosN classname for all iOS versions instead of just N=6 (#12324) Change-Id: Id06cfab1404facd612aa470d82757ae6dfe71641 --- client/src/com/vaadin/client/BrowserInfo.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/client/src/com/vaadin/client/BrowserInfo.java b/client/src/com/vaadin/client/BrowserInfo.java index 84b6f14c34..273964c889 100644 --- a/client/src/com/vaadin/client/BrowserInfo.java +++ b/client/src/com/vaadin/client/BrowserInfo.java @@ -207,10 +207,7 @@ public class BrowserInfo { return prefix + OS_ANDROID; } else if (browserDetails.isIOS()) { String iosClass = prefix + OS_IOS; - if (getOperatingSystemMajorVersion() == 5) { - iosClass += " " + prefix + OS_IOS + "5"; - } - return iosClass; + return iosClass + " " + iosClass + getOperatingSystemMajorVersion(); } else if (browserDetails.isWindows()) { return prefix + OS_WINDOWS; } else if (browserDetails.isLinux()) { -- cgit v1.2.3 From 46ac1e6fb9d2ecf27b3946bffdc7d2f83f691924 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Thu, 19 Sep 2013 00:18:19 +0300 Subject: Update release notes to more closely be like 7.0.x (#12544) * Fixed ticket link and removed duplicate link * Reordered sections to changes in this version comes before changes in old versions * Updated browser versions Change-Id: Ib3afc6257c93fe6481103fbb80aa5ebf9d2a5dd5 --- WebContent/release-notes.html | 54 +++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 25 deletions(-) diff --git a/WebContent/release-notes.html b/WebContent/release-notes.html index 387a5121cb..a11e526c3f 100644 --- a/WebContent/release-notes.html +++ b/WebContent/release-notes.html @@ -41,10 +41,10 @@ -

ChangeLog

- -

This release includes the following closed issues:

- -
    @release-notes-tickets@ -
- -

- The full - list of the closed issues can also be found at - dev.vaadin.com - . -

-

Vaadin Installation

@@ -573,11 +577,11 @@

    -
  • Mozilla Firefox 18-23
  • +
  • Mozilla Firefox 18-24
  • Mozilla Firefox 17 ESR
  • Internet Explorer 8-10
  • Safari 6
  • -
  • Opera 12
  • +
  • Opera 12,16
  • Google Chrome 23-29
@@ -587,7 +591,7 @@

    -
  • iOS 5-6
  • +
  • iOS 5-7
  • Android 2.3-4
-- cgit v1.2.3 From d9f204fda6b56429b6dfe2dda0b79203ff2ef99e Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Thu, 12 Sep 2013 10:13:12 +0300 Subject: PostLayoutListener javadocs (#12562) Change-Id: Icdc39630a8d48f87ca4765f4513c9871d49f5d76 --- .../src/com/vaadin/client/ui/PostLayoutListener.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/client/src/com/vaadin/client/ui/PostLayoutListener.java b/client/src/com/vaadin/client/ui/PostLayoutListener.java index d60360747c..3da2358b0c 100644 --- a/client/src/com/vaadin/client/ui/PostLayoutListener.java +++ b/client/src/com/vaadin/client/ui/PostLayoutListener.java @@ -15,6 +15,24 @@ */ package com.vaadin.client.ui; +import com.vaadin.client.ComponentConnector; +import com.vaadin.client.LayoutManager; + +/** + * Interface implemented by {@link ComponentConnector} implementations that want + * to know whenever a layout phase has ended. At the end of each layout phase, + * {@link LayoutManager} invokes the {@link #postLayout()} method for all + * registered component connectors implementing this interface. + * + * @since 7.0 + * @author Vaadin Ltd + */ public interface PostLayoutListener { + /** + * Method invoked by {@link LayoutManager} to notify the connector that a + * layout phase has ended. This method can be used to finalize internal + * layouting, but it is not allowed to change the its own external size or + * modify the conditions for any children. + */ public void postLayout(); } -- cgit v1.2.3 From c7aaa0413f63d938791e760b23fb3f609f285aa0 Mon Sep 17 00:00:00 2001 From: Jonatan Kronqvist Date: Fri, 20 Sep 2013 15:32:12 +0300 Subject: Don't try to cast a connector to Widget. Fixes #12619 Change-Id: I0fe98ca90ed3969f1af1be60668b4c1c561675eb --- .../com/vaadin/client/ui/dd/VTargetInSubtree.java | 4 +- uitest/src/com/vaadin/tests/dd/DnDOnSubtree.html | 51 ++++++++++++++++++++++ 2 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 uitest/src/com/vaadin/tests/dd/DnDOnSubtree.html diff --git a/client/src/com/vaadin/client/ui/dd/VTargetInSubtree.java b/client/src/com/vaadin/client/ui/dd/VTargetInSubtree.java index e9061114aa..c3f56b410d 100644 --- a/client/src/com/vaadin/client/ui/dd/VTargetInSubtree.java +++ b/client/src/com/vaadin/client/ui/dd/VTargetInSubtree.java @@ -32,7 +32,7 @@ final public class VTargetInSubtree extends VAcceptCriterion { protected boolean accept(VDragEvent drag, UIDL configuration) { VTree tree = (VTree) VDragAndDropManager.get().getCurrentDropHandler() - .getConnector(); + .getConnector().getWidget(); TreeNode treeNode = tree.getNodeByKey((String) drag.getDropDetails() .get("itemIdOver")); if (treeNode != null) { @@ -53,4 +53,4 @@ final public class VTargetInSubtree extends VAcceptCriterion { return false; } -} \ No newline at end of file +} diff --git a/uitest/src/com/vaadin/tests/dd/DnDOnSubtree.html b/uitest/src/com/vaadin/tests/dd/DnDOnSubtree.html new file mode 100644 index 0000000000..844636cb02 --- /dev/null +++ b/uitest/src/com/vaadin/tests/dd/DnDOnSubtree.html @@ -0,0 +1,51 @@ + + + + + + + DnDOnSubtree + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
New Test
open/run/com.vaadin.tests.dd.DDTest8?restartApplication
dragvaadin=runcomvaadintestsddDDTest8::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTree[0]#n[3]11,8
dropvaadin=runcomvaadintestsddDDTest8::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTree[0]#n[6]34,9
mouseClick + vaadin=runcomvaadintestsddDDTest8::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTree[0]#n[5]/expand + 10,8
assertElementPresent + vaadin=runcomvaadintestsddDDTest8::/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[0]/VTree[0]#n[5]/n[0] +
+ + -- cgit v1.2.3 From 7f7dc316e3593bc4823f2cbc8e6f4814f233ce03 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Mon, 16 Sep 2013 08:50:16 +0300 Subject: Base files for TB3 tests (#12572) * Converted LabelModes to TB3 for validation Change-Id: Ic9e69d46623a16986961bdc8cc050b375622a91d --- uitest/eclipse-run-selected-test.properties | 26 +- .../vaadin/tests/components/label/LabelModes.html | 27 -- .../vaadin/tests/components/label/LabelModes.java | 9 + .../src/com/vaadin/tests/tb3/AbstractTB3Test.java | 516 +++++++++++++++++++++ .../src/com/vaadin/tests/tb3/MultiBrowserTest.java | 81 ++++ .../com/vaadin/tests/tb3/ParallelScheduler.java | 60 +++ .../vaadin/tests/tb3/PrivateTB3Configuration.java | 123 +++++ .../com/vaadin/tests/tb3/ScreenshotTB3Test.java | 392 ++++++++++++++++ .../vaadin/tests/tb3/SimpleMultiBrowserTest.java | 49 ++ uitest/src/com/vaadin/tests/tb3/TB3Runner.java | 167 +++++++ 10 files changed, 1415 insertions(+), 35 deletions(-) delete mode 100644 uitest/src/com/vaadin/tests/components/label/LabelModes.html create mode 100644 uitest/src/com/vaadin/tests/tb3/AbstractTB3Test.java create mode 100644 uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java create mode 100644 uitest/src/com/vaadin/tests/tb3/ParallelScheduler.java create mode 100644 uitest/src/com/vaadin/tests/tb3/PrivateTB3Configuration.java create mode 100644 uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java create mode 100644 uitest/src/com/vaadin/tests/tb3/SimpleMultiBrowserTest.java create mode 100644 uitest/src/com/vaadin/tests/tb3/TB3Runner.java diff --git a/uitest/eclipse-run-selected-test.properties b/uitest/eclipse-run-selected-test.properties index f6cb2551e9..cbd1ab1cef 100644 --- a/uitest/eclipse-run-selected-test.properties +++ b/uitest/eclipse-run-selected-test.properties @@ -1,14 +1,23 @@ -; Location where vaadin-testbench jar can be found -com.vaadin.testbench.lib.dir= - -; Deployment url to use for testing. Context path must be / -com.vaadin.testbench.deployment.url=http://:8888/ +; +; For both TestBench 2 and 3 +; ; Location of the screenshot directory. ; This is the directory that contains the "references" directory com.vaadin.testbench.screenshot.directory= -; Run the whole test even if + +; +; For only TestBench 2 +; + +; Location where TestBench 2 jar can be found +com.vaadin.testbench.lib.dir= + +; Deployment url to use for testing. Context path must be / +com.vaadin.testbench.deployment.url=http://:8888/ + +; Run the whole test even if a screenshot comparison fails com.vaadin.testbench.screenshot.softfail=true ; Screen capture at the end if the test fails @@ -23,7 +32,8 @@ com.vaadin.testbench.screenshot.cursor=true ; Uncomment to limit to certain browsers or override in launch configuration ; browsers=winxp-opera10 -; Claim that the server has started succesfully. Needed for the tests to run +; Claim that the server has started succesfully. Needed for TB2 tests to be executed server.start.succeeded=1 -test-output-dir=../build/test-output \ No newline at end of file +; Directory where temporary Java classes are created +test-output-dir=../build/test-output diff --git a/uitest/src/com/vaadin/tests/components/label/LabelModes.html b/uitest/src/com/vaadin/tests/components/label/LabelModes.html deleted file mode 100644 index 356688b456..0000000000 --- a/uitest/src/com/vaadin/tests/components/label/LabelModes.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - -New Test - - - - - - - - - - - - - - - - - -
New Test
open/run/com.vaadin.tests.components.label.LabelModes?restartApplication
screenCapturelabelmodes
- - diff --git a/uitest/src/com/vaadin/tests/components/label/LabelModes.java b/uitest/src/com/vaadin/tests/components/label/LabelModes.java index e5bc539f36..1959447a4b 100644 --- a/uitest/src/com/vaadin/tests/components/label/LabelModes.java +++ b/uitest/src/com/vaadin/tests/components/label/LabelModes.java @@ -2,10 +2,19 @@ package com.vaadin.tests.components.label; import com.vaadin.shared.ui.label.ContentMode; import com.vaadin.tests.components.ComponentTestCase; +import com.vaadin.tests.tb3.SimpleMultiBrowserTest; import com.vaadin.ui.Label; public class LabelModes extends ComponentTestCase