From a3578d3ac293442b64cbc5f5feb4cb9106799fdb Mon Sep 17 00:00:00 2001 From: Fabian Lange Date: Thu, 3 Jul 2014 23:52:05 +0200 Subject: Avoid object creation in getAllChildrenIterable in most cases. (#14142) API change from: public static Iterable getAllChildrenIterable(final ClientConnector connector) to public static Iterable getAllChildrenIterable(final ClientConnector connector) avoids creating wrappers in case the component has either no subcomponents or no extensions. This covers the vast majority of components. Change-Id: I48ffd2f26f09c265fae6e1aaabdbaa655d52ffb8 --- .../com/vaadin/server/AbstractClientConnector.java | 118 ++++++++++----------- server/src/com/vaadin/ui/ConnectorTracker.java | 2 +- .../tests/server/TestClassesSerializable.java | 2 + 3 files changed, 59 insertions(+), 63 deletions(-) diff --git a/server/src/com/vaadin/server/AbstractClientConnector.java b/server/src/com/vaadin/server/AbstractClientConnector.java index bafecdabf4..03300b20e2 100644 --- a/server/src/com/vaadin/server/AbstractClientConnector.java +++ b/server/src/com/vaadin/server/AbstractClientConnector.java @@ -41,6 +41,7 @@ import com.vaadin.shared.communication.ClientRpc; import com.vaadin.shared.communication.ServerRpc; import com.vaadin.shared.communication.SharedState; import com.vaadin.shared.ui.ComponentStateUtil; +import com.vaadin.ui.Component; import com.vaadin.ui.Component.Event; import com.vaadin.ui.HasComponents; import com.vaadin.ui.LegacyComponent; @@ -339,31 +340,6 @@ public abstract class AbstractClientConnector implements ClientConnector, } } - private static final class AllChildrenIterable implements - Iterable, Serializable { - private final ClientConnector connector; - - private AllChildrenIterable(ClientConnector connector) { - this.connector = connector; - } - - @Override - public Iterator iterator() { - CombinedIterator iterator = new CombinedIterator(); - - if (connector instanceof HasComponents) { - HasComponents hasComponents = (HasComponents) connector; - iterator.addIterator(hasComponents.iterator()); - } - - Collection extensions = connector.getExtensions(); - if (extensions.size() > 0) { - iterator.addIterator(extensions.iterator()); - } - return iterator; - } - } - private class RpcInvocationHandler implements InvocationHandler, Serializable { @@ -493,41 +469,6 @@ public abstract class AbstractClientConnector implements ClientConnector, } } - private static final class CombinedIterator implements Iterator, - Serializable { - - private final Collection> iterators = new ArrayList>(); - - public void addIterator(Iterator iterator) { - iterators.add(iterator); - } - - @Override - public boolean hasNext() { - for (Iterator i : iterators) { - if (i.hasNext()) { - return true; - } - } - return false; - } - - @Override - public T next() { - for (Iterator i : iterators) { - if (i.hasNext()) { - return i.next(); - } - } - throw new NoSuchElementException(); - } - - @Override - public void remove() { - throw new UnsupportedOperationException(); - } - } - /** * Get an Iterable for iterating over all child connectors, including both * extensions and child components. @@ -536,9 +477,62 @@ public abstract class AbstractClientConnector implements ClientConnector, * the connector to get children for * @return an Iterable giving all child connectors. */ - public static Iterable getAllChildrenIterable( + public static Iterable getAllChildrenIterable( final ClientConnector connector) { - return new AllChildrenIterable(connector); + + Collection extensions = connector.getExtensions(); + boolean hasComponents = connector instanceof HasComponents; + boolean hasExtensions = extensions.size() > 0; + if (!hasComponents && !hasExtensions) { + // If has neither component nor extensions, return immutable empty + // list as iterable. + return Collections.emptyList(); + } + if (hasComponents && !hasExtensions) { + // only components + return (HasComponents) connector; + } + if (!hasComponents && hasExtensions) { + // only extensions + return extensions; + } + + // combine the iterators of extensions and components to a new iterable. + final Iterator componentsIterator = ((HasComponents) connector) + .iterator(); + final Iterator extensionsIterator = extensions.iterator(); + Iterable combinedIterable = new Iterable() { + + @Override + public Iterator iterator() { + return new Iterator() { + + @Override + public boolean hasNext() { + return componentsIterator.hasNext() + || extensionsIterator.hasNext(); + } + + @Override + public ClientConnector next() { + if (componentsIterator.hasNext()) { + return componentsIterator.next(); + } + if (extensionsIterator.hasNext()) { + return extensionsIterator.next(); + } + throw new NoSuchElementException(); + } + + @Override + public void remove() { + throw new UnsupportedOperationException(); + } + + }; + } + }; + return combinedIterable; } @Override diff --git a/server/src/com/vaadin/ui/ConnectorTracker.java b/server/src/com/vaadin/ui/ConnectorTracker.java index c0f973106b..b5a0227d99 100644 --- a/server/src/com/vaadin/ui/ConnectorTracker.java +++ b/server/src/com/vaadin/ui/ConnectorTracker.java @@ -366,7 +366,7 @@ public class ConnectorTracker implements Serializable { ClientConnector connector = stack.pop(); danglingConnectors.remove(connector); - Iterable children = AbstractClientConnector + Iterable children = AbstractClientConnector .getAllChildrenIterable(connector); for (ClientConnector child : children) { stack.add(child); diff --git a/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java b/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java index e938a1cd37..63f79504ff 100644 --- a/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java +++ b/server/tests/src/com/vaadin/tests/server/TestClassesSerializable.java @@ -63,6 +63,8 @@ public class TestClassesSerializable extends TestCase { "com\\.vaadin\\.sass.*", // "com\\.vaadin\\.testbench.*", // "com\\.vaadin\\.util\\.CurrentInstance\\$1", // + "com\\.vaadin\\.server\\.AbstractClientConnector\\$1", // + "com\\.vaadin\\.server\\.AbstractClientConnector\\$1\\$1", // "com\\.vaadin\\.server\\.JsonCodec\\$1", // "com\\.vaadin\\.server\\.communication\\.PushConnection", // "com\\.vaadin\\.server\\.communication\\.AtmospherePushConnection", // -- cgit v1.2.3 From 7b008eb818d2d27bd7034321bcbe07d24a6e60d8 Mon Sep 17 00:00:00 2001 From: Anthony Guerreiro Date: Tue, 1 Jul 2014 10:38:00 +0300 Subject: Modified test case to work around bug preventing popup to close in IE (#14086) Change-Id: Icb47d8a0c737e27a3d88078b4162c633ba08739c --- .../components/datefield/LocaleChangeTest.java | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/uitest/src/com/vaadin/tests/components/datefield/LocaleChangeTest.java b/uitest/src/com/vaadin/tests/components/datefield/LocaleChangeTest.java index cf756034a1..c80a74599d 100644 --- a/uitest/src/com/vaadin/tests/components/datefield/LocaleChangeTest.java +++ b/uitest/src/com/vaadin/tests/components/datefield/LocaleChangeTest.java @@ -34,7 +34,7 @@ public class LocaleChangeTest extends MultiBrowserTest { assertPopupOpen(true); // Close the popup and change the locale. - toggleDatePopup(); + toggleDatePopupWorkaroundClosePopupIE(); assertPopupOpen(false); driver.findElement(By.className("v-button")).click(); // Locale change. @@ -55,6 +55,26 @@ public class LocaleChangeTest extends MultiBrowserTest { driver.findElement(By.className("v-datefield-button")).click(); } + /* + * Work around bug reported in ticket #14086. Delete this method once fixed + * andd use toggleDatePopup() instead. + */ + private void toggleDatePopupWorkaroundClosePopupIE() { + if (!BrowserUtil.isIE(getDesiredCapabilities())) { + driver.findElement(By.className("v-datefield-button")).click(); + } else { + boolean popupOpen = driver.findElements( + By.className("v-datefield-popup")).size() == 1; + if (popupOpen) { + driver.findElement( + By.className("v-datefield-calendarpanel-day-selected")) + .click(); + } else { + driver.findElement(By.className("v-datefield-button")).click(); + } + } + } + private String getDateValue() { return driver.findElement(By.className("v-datefield-textfield")) .getAttribute("value"); -- cgit v1.2.3 From 0eb8b337a936d8b39fb9a8793bafb83a302c86f5 Mon Sep 17 00:00:00 2001 From: Bogdan Udrescu Date: Fri, 4 Jul 2014 16:23:26 +0300 Subject: Return a value on __gwtStatsEvent in Profiler (#11709) Calling GWT RPC throw an exception when __gwtStatsEvent doesn't return a boolean. This was in the Profiler.ensureNoLogger where the function assigned was empty. Change-Id: If97e15eb3c2c6512e80f3bde81ba180b8c95c947 --- WebContent/WEB-INF/web.xml | 11 +- client/src/com/vaadin/client/Profiler.java | 28 ++--- .../client/gwtrpc/GwtRpcButtonConnector.java | 123 +++++++++++++++++++++ .../widgetset/client/gwtrpc/GwtRpcServiceTest.java | 34 ++++++ .../client/gwtrpc/GwtRpcServiceTestAsync.java | 32 ++++++ .../tests/widgetset/server/gwtrpc/GwtRpc.java | 56 ++++++++++ .../widgetset/server/gwtrpc/GwtRpcButton.java | 30 +++++ .../widgetset/server/gwtrpc/GwtRpcServletTest.java | 35 ++++++ .../tests/widgetset/server/gwtrpc/GwtRpcTest.java | 43 +++++++ 9 files changed, 377 insertions(+), 15 deletions(-) create mode 100644 uitest/src/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcButtonConnector.java create mode 100644 uitest/src/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcServiceTest.java create mode 100644 uitest/src/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcServiceTestAsync.java create mode 100644 uitest/src/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpc.java create mode 100644 uitest/src/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcButton.java create mode 100644 uitest/src/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcServletTest.java create mode 100644 uitest/src/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcTest.java diff --git a/WebContent/WEB-INF/web.xml b/WebContent/WEB-INF/web.xml index 268fe1ea66..fb2ddbd998 100644 --- a/WebContent/WEB-INF/web.xml +++ b/WebContent/WEB-INF/web.xml @@ -43,6 +43,11 @@ true + + GwtRpcTest + com.vaadin.tests.widgetset.server.gwtrpc.GwtRpcServletTest + + UI provider app com.vaadin.server.VaadinServlet @@ -134,15 +139,19 @@ false + Embed App 1 /embed1/* - Embed App 2 /embed2/* + + GwtRpcTest + /VAADIN/widgetsets/com.vaadin.tests.widgetset.TestingWidgetSet/GwtRpcTest/* + UI provider app diff --git a/client/src/com/vaadin/client/Profiler.java b/client/src/com/vaadin/client/Profiler.java index 2174e00de1..6c0967099f 100644 --- a/client/src/com/vaadin/client/Profiler.java +++ b/client/src/com/vaadin/client/Profiler.java @@ -1,12 +1,12 @@ /* * Copyright 2000-2014 Vaadin Ltd. - * + * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the @@ -37,14 +37,14 @@ import com.vaadin.client.debug.internal.ProfilerSection.ProfilerResultConsumer; * zero overhead unless enabled. To enable profiling, add * <set-property name="vaadin.profiler" value="true" /> to * your .gwt.xml file. - * + * * @author Vaadin Ltd * @since 7.0.0 */ public class Profiler { /** * Class to include using deferred binding to enable the profiling. - * + * * @author Vaadin Ltd * @since 7.0.0 */ @@ -101,7 +101,7 @@ public class Profiler { /** * Checks whether the profiling gathering is enabled. - * + * * @return true if the profiling is enabled, else * false */ @@ -115,7 +115,7 @@ public class Profiler { * Enters a named block. There should always be a matching invocation of * {@link #leave(String)} when leaving the block. Calls to this method will * be removed by the compiler unless profiling is enabled. - * + * * @param name * the name of the entered block */ @@ -129,7 +129,7 @@ public class Profiler { * Leaves a named block. There should always be a matching invocation of * {@link #enter(String)} when entering the block. Calls to this method will * be removed by the compiler unless profiling is enabled. - * + * * @param name * the name of the left block */ @@ -178,7 +178,7 @@ public class Profiler { * enabled because it will then remove a logger function that might have * been included in the HTML page and that would leak memory unless removed. *

- * + * * @since 7.0.2 */ public static void initialize() { @@ -281,7 +281,7 @@ public class Profiler { /** * Overridden in {@link EnabledProfiler} to make {@link #isEnabled()} return * true if GWT.create returns that class. - * + * * @return true if the profiling is enabled, else * false */ @@ -352,7 +352,7 @@ public class Profiler { if (typeof $wnd.__gwtStatsEvent != 'function') { if (typeof $wnd.vaadin.gwtStatsEvents != 'object') { $wnd.vaadin.gwtStatsEvents = []; - } + } $wnd.__gwtStatsEvent = function(event) { $wnd.vaadin.gwtStatsEvents.push(event); return true; @@ -369,9 +369,9 @@ public class Profiler { if (typeof $wnd.vaadin.gwtStatsEvents == 'object') { delete $wnd.vaadin.gwtStatsEvents; if (typeof $wnd.__gwtStatsEvent == 'function') { - $wnd.__gwtStatsEvent = function(){}; + $wnd.__gwtStatsEvent = function() { return true; }; } - } + } }-*/; private static native JsArray clearEventsList() @@ -385,7 +385,7 @@ public class Profiler { *

* Warning! This is internal API and should not be used by * applications or add-ons. - * + * * @since 7.1.4 * @param profilerResultConsumer * the consumer that gets profiler data diff --git a/uitest/src/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcButtonConnector.java b/uitest/src/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcButtonConnector.java new file mode 100644 index 0000000000..43d96afd2b --- /dev/null +++ b/uitest/src/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcButtonConnector.java @@ -0,0 +1,123 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.widgetset.client.gwtrpc; + +import java.util.logging.Level; +import java.util.logging.Logger; + +import com.google.gwt.core.shared.GWT; +import com.google.gwt.event.dom.client.ClickEvent; +import com.google.gwt.event.dom.client.ClickHandler; +import com.google.gwt.user.client.rpc.AsyncCallback; +import com.google.gwt.user.client.ui.Button; +import com.google.gwt.user.client.ui.DialogBox; +import com.google.gwt.user.client.ui.Label; +import com.vaadin.client.ui.AbstractComponentConnector; +import com.vaadin.shared.ui.Connect; +import com.vaadin.tests.widgetset.server.gwtrpc.GwtRpcButton; + +/** + * Dummy connector to test our Vaadin/GWT RPC bug. In a Vaadin environment with + * DevMode enabled, a pure GWT RPC call would throw an exception. See #11709. + * + * @author Vaadin Ltd + */ +@SuppressWarnings("serial") +@Connect(GwtRpcButton.class) +public class GwtRpcButtonConnector extends AbstractComponentConnector { + + static Logger logger = Logger.getLogger(GwtRpcButtonConnector.class + .getName()); + static { + logger.setLevel(Level.ALL); + } + + @Override + public Button getWidget() { + return (Button) super.getWidget(); + } + + @Override + protected Button createWidget() { + return GWT.create(Button.class); + } + + private void log(String message) { + logger.log(Level.INFO, message); + } + + @Override + public void init() { + super.init(); + + log("GwtRpcButtonTestConnector init"); + + getWidget().setText("Click me"); + getWidget().addClickHandler(new ClickHandler() { + + @Override + public void onClick(ClickEvent event) { + doRPC(); + } + + }); + } + + /** + * The ID of the label in case the test is successful. + */ + public static final String SUCCESS_LABEL_ID = "yes"; + + /** + * The ID of the label in case the test failed. + */ + public static final String FAIL_LABEL_ID = "no"; + + /* + * Make an RPC to test our bug. + */ + private void doRPC() { + log("GwtRpcButtonTestConnector onClick"); + + GwtRpcServiceTestAsync service = GWT.create(GwtRpcServiceTest.class); + + service.giveMeThat("honey", "sugar", new AsyncCallback() { + + @Override + public void onSuccess(String result) { + showResult(result, SUCCESS_LABEL_ID); + } + + @Override + public void onFailure(Throwable caught) { + showResult(caught.getMessage(), FAIL_LABEL_ID); + } + + /* + * Show the result box. + */ + private void showResult(String result, String labelID) { + DialogBox box = new DialogBox(true); + Label label = new Label(result); + label.getElement().setId(labelID); + box.add(label); + box.center(); + box.show(); + } + + }); + } +} diff --git a/uitest/src/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcServiceTest.java b/uitest/src/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcServiceTest.java new file mode 100644 index 0000000000..16df928d77 --- /dev/null +++ b/uitest/src/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcServiceTest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.widgetset.client.gwtrpc; + +import com.google.gwt.user.client.rpc.RemoteService; +import com.google.gwt.user.client.rpc.RemoteServiceRelativePath; + +/** + * Test GWT RPC in Vaadin DevMode. + * + * @author Vaadin Ltd + */ +@RemoteServiceRelativePath("GwtRpcTest") +public interface GwtRpcServiceTest extends RemoteService { + + /* + * Dummy method to verify if RPC works. + */ + String giveMeThat(String that, String haveThis); + +} diff --git a/uitest/src/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcServiceTestAsync.java b/uitest/src/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcServiceTestAsync.java new file mode 100644 index 0000000000..93eda8ca34 --- /dev/null +++ b/uitest/src/com/vaadin/tests/widgetset/client/gwtrpc/GwtRpcServiceTestAsync.java @@ -0,0 +1,32 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.widgetset.client.gwtrpc; + +import com.google.gwt.user.client.rpc.AsyncCallback; + +/** + * Test GWT RPC in Vaadin DevMode. + * + * @author Vaadin Ltd + */ +public interface GwtRpcServiceTestAsync { + + /* + * Dummy async method to verify if RPC works. + */ + void giveMeThat(String that, String haveThis, AsyncCallback callback); + +} diff --git a/uitest/src/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpc.java b/uitest/src/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpc.java new file mode 100644 index 0000000000..c9f949c465 --- /dev/null +++ b/uitest/src/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpc.java @@ -0,0 +1,56 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.widgetset.server.gwtrpc; + +import com.vaadin.annotations.Widgetset; +import com.vaadin.server.VaadinRequest; +import com.vaadin.tests.components.AbstractTestUI; +import com.vaadin.tests.widgetset.TestingWidgetSet; + +/** + * Test the GWT RPC with Vaadin DevMode. See #11709. + * + * @author Vaadin Ltd + */ +@SuppressWarnings("serial") +@Widgetset(TestingWidgetSet.NAME) +public class GwtRpc extends AbstractTestUI { + + /** + * Id of the button triggering the test case. + */ + public final static String BUTTON_ID = "gwtRpcButton"; + + @Override + protected void setup(VaadinRequest request) { + GwtRpcButton button = new GwtRpcButton(); + button.setId(BUTTON_ID); + button.setCaption("Press me"); + + addComponent(button); + } + + @Override + protected String getTestDescription() { + return "Cannot call RPC in development mode"; + } + + @Override + protected Integer getTicketNumber() { + return 11709; + } + +} diff --git a/uitest/src/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcButton.java b/uitest/src/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcButton.java new file mode 100644 index 0000000000..c04800713d --- /dev/null +++ b/uitest/src/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcButton.java @@ -0,0 +1,30 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.widgetset.server.gwtrpc; + +import com.vaadin.ui.AbstractComponent; + +/** + * Dummy client connector to link with the client functionality where the GWT + * RPC is triggered. + * + * @since + * @author Vaadin Ltd + */ +@SuppressWarnings("serial") +public class GwtRpcButton extends AbstractComponent { + +} diff --git a/uitest/src/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcServletTest.java b/uitest/src/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcServletTest.java new file mode 100644 index 0000000000..df01b4dc81 --- /dev/null +++ b/uitest/src/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcServletTest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.widgetset.server.gwtrpc; + +import com.google.gwt.user.server.rpc.RemoteServiceServlet; +import com.vaadin.tests.widgetset.client.gwtrpc.GwtRpcServiceTest; + +/** + * Test GWT RPC in Vaadin DevMode. + * + * @author Vaadin Ltd + */ +@SuppressWarnings("serial") +public class GwtRpcServletTest extends RemoteServiceServlet implements + GwtRpcServiceTest { + + @Override + public String giveMeThat(String that, String haveThis) { + return "Take " + that + " for " + haveThis; + } + +} diff --git a/uitest/src/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcTest.java b/uitest/src/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcTest.java new file mode 100644 index 0000000000..d27884a13a --- /dev/null +++ b/uitest/src/com/vaadin/tests/widgetset/server/gwtrpc/GwtRpcTest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2000-2014 Vaadin Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy of + * the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + */ +package com.vaadin.tests.widgetset.server.gwtrpc; + +import org.junit.Test; +import org.openqa.selenium.By; + +import com.vaadin.tests.tb3.MultiBrowserTest; +import com.vaadin.tests.widgetset.client.gwtrpc.GwtRpcButtonConnector; + +/** + * Test the GWT RPC with Vaadin DevMode. See #11709. + * + * @author Vaadin Ltd + */ +public class GwtRpcTest extends MultiBrowserTest { + + @Test + public void testGwtRpc() { + openTestURL(); + + getDriver().findElement(By.id(GwtRpc.BUTTON_ID)).click(); + + By label = By.id(GwtRpcButtonConnector.SUCCESS_LABEL_ID); + + waitForElementToBePresent(label); + getDriver().findElement(label); + } + +} -- cgit v1.2.3 From 0452e0a58db9858c247dfe577588c66f44878a26 Mon Sep 17 00:00:00 2001 From: Dmitrii Rogozin Date: Mon, 7 Jul 2014 11:47:57 +0300 Subject: Fix shadow bug with menu in runo theme (#14162) Change-Id: I9f6486597c45180ef7f748ba128f3f287d28bd97 --- WebContent/VAADIN/themes/runo/common/common.scss | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/WebContent/VAADIN/themes/runo/common/common.scss b/WebContent/VAADIN/themes/runo/common/common.scss index c33b490411..207660c08e 100644 --- a/WebContent/VAADIN/themes/runo/common/common.scss +++ b/WebContent/VAADIN/themes/runo/common/common.scss @@ -41,9 +41,8 @@ .v-window .v-datefield-popup, .v-filterselect-suggestpopup, -.v-menubar-menuitem, -.v-slider-popup, -.v-tooltip-text, +.v-menubar-popup, +.v-slider-feedback, .v-popupview-popup, .v-contextmenu { box-shadow: 0 2px 5px 0 rgba(0,0,0, .28); -- cgit v1.2.3 From 38d8752d3c56b089b2e077f01bfe5eeed34bd93b Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Mon, 7 Jul 2014 13:00:16 +0300 Subject: Use Sass compiler version 0.9.8 Change-Id: I04996df90cbbb449d54e54c3affc74ff40fddeeb --- build.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.properties b/build.properties index a7871ad1ef..0c0e58cb53 100644 --- a/build.properties +++ b/build.properties @@ -5,6 +5,6 @@ vaadin.vendor=Vaadin Ltd vaadin.url=http://vaadin.com vaadin.java.version=1.6 vaadin.version=0.0.0.unversioned-development-build -vaadin.sass.version=0.9.7 +vaadin.sass.version=0.9.8 gwt.version=2.6.0.vaadin3 commons-io.version=2.4 -- cgit v1.2.3 From 8c36375edb9cadfec64a67f034d2a6828242df6f Mon Sep 17 00:00:00 2001 From: Dmitrii Rogozin Date: Fri, 4 Jul 2014 15:46:55 +0300 Subject: Fix background color in chameleon theme after removing shadow divs (#14145) Change-Id: I9b0566070af58afda7693936943237e70cea4a2f --- WebContent/VAADIN/themes/base/datefield/datefield.scss | 3 +++ WebContent/VAADIN/themes/chameleon/common/common.scss | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/WebContent/VAADIN/themes/base/datefield/datefield.scss b/WebContent/VAADIN/themes/base/datefield/datefield.scss index d094235c0f..57a691211d 100644 --- a/WebContent/VAADIN/themes/base/datefield/datefield.scss +++ b/WebContent/VAADIN/themes/base/datefield/datefield.scss @@ -95,6 +95,9 @@ } .#{$primaryStyleName}-popup { background: #fff; + .v-ie9 &, .v-ie10 &, .v-ie11 & { + box-shadow: 0 2px 10px 0 rgba(0, 0, 0, .5); + } } .#{$primaryStyleName}-popupcalendar input.#{$primaryStyleName}-textfield { -webkit-box-sizing: border-box; diff --git a/WebContent/VAADIN/themes/chameleon/common/common.scss b/WebContent/VAADIN/themes/chameleon/common/common.scss index b8233fc53b..7bee2f529c 100644 --- a/WebContent/VAADIN/themes/chameleon/common/common.scss +++ b/WebContent/VAADIN/themes/chameleon/common/common.scss @@ -91,8 +91,6 @@ $chameleon-line-height: 1.4; .v-contextmenu, .v-Notification, .v-menubar-submenu { - background: #fff url(../img/grad-light-top.png) repeat-x; - background-color: rgba(255,255,255,.85); border: 1px solid #adadad; border-color: rgba(0,0,0,.4); border-radius: 4px; @@ -100,7 +98,14 @@ $chameleon-line-height: 1.4; -moz-border-radius: 4px; overflow: hidden; } - + .v-window, + .v-popupview-popup, + .v-filterselect-suggestpopup, + .v-datefield-popup, + .v-contextmenu, + .v-menubar-submenu{ + background: rgba(232,232,232,.90) url(../img/grad-light-top.png) repeat-x; + } .v-filterselect-suggestpopup, .v-contextmenu, .v-menubar-submenu { -- cgit v1.2.3