e77e73c Update copyright year to 2014
Conflicts:
client-compiler/src/com/vaadin/server/widgetsetutils/metadata/ConnectorBundle.java
client/src/com/vaadin/client/ApplicationConnection.java
server/src/com/vaadin/data/util/converter/StringToNumberConverter.java
shared/src/com/vaadin/shared/ui/ui/PageState.java
shared/src/com/vaadin/shared/ui/window/WindowState.java
theme-compiler/src/com/vaadin/sass/SassCompiler.java
theme-compiler/src/com/vaadin/sass/internal/ScssStylesheet.java
theme-compiler/src/com/vaadin/sass/internal/expression/ArithmeticExpressionEvaluator.java
theme-compiler/src/com/vaadin/sass/internal/expression/BinaryExpression.java
theme-compiler/src/com/vaadin/sass/internal/expression/BinaryOperator.java
theme-compiler/src/com/vaadin/sass/internal/expression/exception/ArithmeticException.java
theme-compiler/src/com/vaadin/sass/internal/expression/exception/IncompatibleUnitsException.java
theme-compiler/src/com/vaadin/sass/internal/handler/SCSSDocumentHandler.java
theme-compiler/src/com/vaadin/sass/internal/handler/SCSSDocumentHandlerImpl.java
theme-compiler/src/com/vaadin/sass/internal/handler/SCSSErrorHandler.java
theme-compiler/src/com/vaadin/sass/internal/parser/CharStream.java
theme-compiler/src/com/vaadin/sass/internal/parser/Generic_CharStream.java
theme-compiler/src/com/vaadin/sass/internal/parser/LexicalUnitImpl.java
theme-compiler/src/com/vaadin/sass/internal/parser/LocatorImpl.java
theme-compiler/src/com/vaadin/sass/internal/parser/MediaListImpl.java
theme-compiler/src/com/vaadin/sass/internal/parser/ParseException.java
theme-compiler/src/com/vaadin/sass/internal/parser/Parser.java
theme-compiler/src/com/vaadin/sass/internal/parser/ParserConstants.java
theme-compiler/src/com/vaadin/sass/internal/parser/ParserTokenManager.java
theme-compiler/src/com/vaadin/sass/internal/parser/SCSSLexicalUnit.java
theme-compiler/src/com/vaadin/sass/internal/parser/SCSSParseException.java
theme-compiler/src/com/vaadin/sass/internal/parser/SelectorListImpl.java
theme-compiler/src/com/vaadin/sass/internal/parser/Selectors.java
theme-compiler/src/com/vaadin/sass/internal/parser/ThrowedParseException.java
theme-compiler/src/com/vaadin/sass/internal/parser/Token.java
theme-compiler/src/com/vaadin/sass/internal/parser/TokenMgrError.java
theme-compiler/src/com/vaadin/sass/internal/resolver/ClassloaderResolver.java
theme-compiler/src/com/vaadin/sass/internal/resolver/FilesystemResolver.java
theme-compiler/src/com/vaadin/sass/internal/resolver/ScssStylesheetResolver.java
theme-compiler/src/com/vaadin/sass/internal/resolver/VaadinResolver.java
theme-compiler/src/com/vaadin/sass/internal/selector/SelectorUtil.java
theme-compiler/src/com/vaadin/sass/internal/tree/BlockNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/ExtendNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/ForNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/FunctionNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/ImportNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/KeyframesNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/ListContainsNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/ListModifyNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/ListRemoveNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/MediaNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/MicrosoftRuleNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/MixinDefNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/MixinNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/NestPropertiesNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/Node.java
theme-compiler/src/com/vaadin/sass/internal/tree/RuleNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/SimpleNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/VariableNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/controldirective/EachDefNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/controldirective/IfElseDefNode.java
theme-compiler/src/com/vaadin/sass/internal/tree/controldirective/IfNode.java
theme-compiler/src/com/vaadin/sass/internal/util/ColorUtil.java
theme-compiler/src/com/vaadin/sass/internal/util/DeepCopy.java
theme-compiler/src/com/vaadin/sass/internal/util/FastByteArrayInputStream.java
theme-compiler/src/com/vaadin/sass/internal/util/FastByteArrayOutputStream.java
theme-compiler/src/com/vaadin/sass/internal/util/StringUtil.java
theme-compiler/src/com/vaadin/sass/internal/visitor/BlockNodeHandler.java
theme-compiler/src/com/vaadin/sass/internal/visitor/EachNodeHandler.java
theme-compiler/src/com/vaadin/sass/internal/visitor/ExtendNodeHandler.java
theme-compiler/src/com/vaadin/sass/internal/visitor/IfElseNodeHandler.java
theme-compiler/src/com/vaadin/sass/internal/visitor/ImportNodeHandler.java
theme-compiler/src/com/vaadin/sass/internal/visitor/MixinNodeHandler.java
theme-compiler/src/com/vaadin/sass/internal/visitor/NestedNodeHandler.java
theme-compiler/src/com/vaadin/sass/internal/visitor/VariableNodeHandler.java
theme-compiler/tests/src/com/vaadin/sass/AbstractTestBase.java
theme-compiler/tests/src/com/vaadin/sass/internal/expression/ArithmeticExpressionEvaluatorTest.java
theme-compiler/tests/src/com/vaadin/sass/parser/ParserTest.java
theme-compiler/tests/src/com/vaadin/sass/resolvers/VaadinResolverTest.java
theme-compiler/tests/src/com/vaadin/sass/testcases/css/Interpolation.java
theme-compiler/tests/src/com/vaadin/sass/testcases/css/Selectors.java
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AbstractDirectoryScanningSassTests.java
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/AutomaticSassTests.java
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Comments.java
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ControlDirectives.java
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Extends.java
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Functions.java
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Imports.java
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Mixins.java
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/NestedProperties.java
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Nesting.java
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ParentImports.java
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/ParentSelector.java
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassLangTests.java
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassLangTestsBroken.java
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/SassTestRunner.java
theme-compiler/tests/src/com/vaadin/sass/testcases/scss/Variables.java
theme-compiler/tests/src/com/vaadin/sass/tree/ImportNodeTest.java
uitest/src/com/vaadin/tests/push/BasicPushTest.java
uitest/src/com/vaadin/tests/push/PushConfigurationTest.java
uitest/src/com/vaadin/tests/push/PushReconnectTest.java
Change-Id: Ic08c4f9aecd4c684ce74408de4e0b0d0ff617273
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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.buildhelpers;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.CommandLineParser;
+import org.apache.commons.cli.HelpFormatter;
+import org.apache.commons.cli.Options;
+import org.apache.commons.cli.ParseException;
+import org.apache.commons.cli.PosixParser;
+
+import com.vaadin.sass.internal.ScssStylesheet;
+
+/**
+ * Helper to combine css divided into separate per component dirs into one to
+ * optimize http requests.
+ */
+public class CompileTheme {
+
+ /**
+ * @param args
+ * @throws IOException
+ * @throws ParseException
+ */
+ public static void main(String[] args) throws IOException, ParseException {
+ Options options = new Options();
+ options.addOption("t", "theme", true, "the theme to compile");
+ options.addOption("f", "theme-folder", true,
+ "the folder containing the theme");
+ options.addOption("v", "version", true,
+ "the Vaadin version to compile for");
+ CommandLineParser parser = new PosixParser();
+ CommandLine params = parser.parse(options, args);
+ if (!params.hasOption("theme") || !params.hasOption("theme-folder")
+ || !params.hasOption("version")) {
+ // automatically generate the help statement
+ HelpFormatter formatter = new HelpFormatter();
+ formatter.printHelp(CompileTheme.class.getName(), options);
+ return;
+ }
+ String themeName = params.getOptionValue("theme");
+ String themeFolder = params.getOptionValue("theme-folder");
+ String version = params.getOptionValue("version");
+
+ // Regular theme
+ try {
+ processSassTheme(themeFolder, themeName, "styles", version);
+ System.out.println("Compiling theme " + themeName
+ + " styles successful");
+ } catch (Exception e) {
+ System.err.println("Compiling theme " + themeName
+ + " styles failed");
+ e.printStackTrace();
+ }
+ // Legacy theme w/o .themename{} wrapping
+ try {
+ processSassTheme(themeFolder, themeName, "legacy-styles", version);
+ System.out.println("Compiling theme " + themeName
+ + " legacy-styles successful");
+ } catch (Exception e) {
+ System.err.println("Compiling theme " + themeName
+ + " legacy-styles failed");
+ e.printStackTrace();
+ }
+ }
+
+ private static void processSassTheme(String themeFolder, String themeName,
+ String variant, String version) throws Exception {
+
+ StringBuffer cssHeader = new StringBuffer();
+
+ String stylesCssDir = themeFolder + File.separator + themeName
+ + File.separator;
+
+ String stylesCssName = stylesCssDir + variant + ".css";
+
+ // Process as SASS file
+ String sassFile = stylesCssDir + variant + ".scss";
+
+ ScssStylesheet scss = ScssStylesheet.get(sassFile);
+ if (scss == null) {
+ throw new IllegalArgumentException("SASS file: " + sassFile
+ + " not found");
+ }
+ scss.compile();
+ String filteredScss = scss.printState().replace("@version@", version);
+
+ BufferedWriter out = new BufferedWriter(new FileWriter(stylesCssName));
+ out.write(cssHeader.toString());
+ out.write(filteredScss);
+ out.close();
+
+ System.out.println("Compiled CSS to " + stylesCssName + " ("
+ + filteredScss.length() + " bytes)");
+
+ createSprites(themeFolder, themeName);
+ File oldCss = new File(stylesCssName);
+ File newCss = new File(stylesCssDir + variant + "-sprite.css");
+
+ if (newCss.exists()) {
+ // Theme contained sprites. Renamed "styles-sprite.css" ->
+ // "styles.css"
+ oldCss.delete();
+
+ boolean ok = newCss.renameTo(oldCss);
+ if (!ok) {
+ throw new RuntimeException("Rename " + newCss + " -> " + oldCss
+ + " failed");
+ }
+ }
+
+ }
+
+ private static void createSprites(String themeFolder, String themeName)
+ throws FileNotFoundException, IOException {
+ try {
+ // Try loading the class separately from using it to avoid
+ // hiding other classpath issues
+ Class<?> smartSpritesClass = org.carrot2.labs.smartsprites.SmartSprites.class;
+ } catch (NoClassDefFoundError e) {
+ System.err
+ .println("Could not find smartsprites. No sprites were generated. The theme should still work.");
+ return;
+ }
+
+ String[] parameters = new String[] { "--sprite-png-depth", "AUTO",
+ "--css-file-suffix", "-sprite", "--css-file-encoding", "UTF-8",
+ "--root-dir-path", themeFolder + File.separator + themeName,
+ "--log-level", "WARN" };
+
+ org.carrot2.labs.smartsprites.SmartSprites.main(parameters);
+ System.out.println("Generated sprites");
+
+ }
+}
-/*
+/*
- * Copyright 2000-2013 Vaadin Ltd.
+ * 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
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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.client.event;
+
+import com.vaadin.client.event.PointerEvent.EventType;
+
+/**
+ * Pointer event support class for IE 10 ("ms" prefixed pointer events)
+ *
+ * @since 7.2
+ * @author Vaadin Ltd
+ */
+public class PointerEventSupportImplIE10 extends
+ PointerEventSupportImplModernIE {
+
+ @Override
+ public String getNativeEventName(EventType eventName) {
+ return "MS" + eventName;
+ }
+
+}
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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.server;
+
+import java.io.Serializable;
+
+/**
+ * Listener that gets notified when the {@link VaadinService} to which it has
+ * been registered is destroyed.
+ *
+ * @see VaadinService#addServiceDestroyListener(ServiceDestroyListener)
+ * @see VaadinService#removeServiceDestroyListener(ServiceDestroyListener)
+ *
+ * @since 7.2
+ * @author Vaadin Ltd
+ */
+public interface ServiceDestroyListener extends Serializable {
+ /**
+ * Invoked when a service is destroyed
+ *
+ * @param event
+ * the event
+ */
+ public void serviceDestroy(ServiceDestroyEvent event);
+}
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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.server.communication;
+
+import java.lang.reflect.Type;
+import java.util.Date;
+
+import com.vaadin.ui.ConnectorTracker;
+
+/**
+ * Server side serializer/deserializer for java.util.Date
+ *
+ * @since 7.2
+ * @author Vaadin Ltd
+ */
+public class DateSerializer implements JSONSerializer<Date> {
+
+ @Override
+ public Date deserialize(Type type, Object jsonValue,
+ ConnectorTracker connectorTracker) {
+ return new Date(Long.valueOf(String.valueOf(jsonValue)));
+ }
+
+ @Override
+ public Object serialize(Date value, ConnectorTracker connectorTracker) {
+ return value.getTime();
+ }
+
+}
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+import org.junit.Ignore;
+
+/*
++ * 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.
+ */
+
+/**
+ *
+ * This class is test data. Don't delete it.
+ *
+ * @author Vaadin Ltd
+ * @since 7.2
+ */
+@Ignore
+public class ClassInDefaultPackage {
+
+}
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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.server;
+
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+/**
+ *
+ * @author Vaadin Ltd
+ */
+public class MockVaadinSession extends VaadinSession {
+
+ public MockVaadinSession(VaadinService service) {
+ super(service);
+ }
+
+ @Override
+ public void close() {
+ super.close();
+ closeCount++;
+ }
+
+ public int getCloseCount() {
+ return closeCount;
+ }
+
+ @Override
+ public Lock getLockInstance() {
+ return lock;
+ }
+
+ private int closeCount;
+
+ private ReentrantLock lock = new ReentrantLock();
+}
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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.shared.ui.tabsheet;
+
+import com.vaadin.shared.communication.ServerRpc;
+
+/**
+ * Client to server RPC methods for the TabSheet.
+ *
+ * @since 7.2
+ * @author Vaadin Ltd
+ */
+public interface TabsheetServerRpc extends ServerRpc {
+
+ /**
+ * Tell server that a tab has been selected by the user.
+ *
+ * @param key
+ * internal key of the tab
+ */
+ void setSelected(String key);
+
+ /**
+ * Tell server that a tab has been closed by the user.
+ *
+ * @param key
+ * internal key of the tab
+ */
+ void closeTab(String key);
+
+}
* True if the page has browser window resize listeners.
*/
public boolean hasResizeListeners = false;
- }
+
+ /**
+ * Non-null if the title is set. Null means Vaadin does not touch the title.
+ */
+ public String title = null;
+ }
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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.shared.ui.window;
+
+/**
+ * Available WAI-ARIA roles for a window.
+ *
+ * @since 7.2
+ */
+public enum WindowRole {
+ ALERTDIALOG, DIALOG
+}
public int positionX = -1;
public int positionY = -1;
public WindowMode windowMode = WindowMode.NORMAL;
- }
+
+ public String assistivePrefix = "";
+ public String assistivePostfix = "";
+ public Connector[] contentDescription = new Connector[0];
+ public WindowRole role = WindowRole.DIALOG;
+ public boolean assistiveTabStop = false;
+ public String assistiveTabStopTopText = "Top of dialog";
+ public String assistiveTabStopBottomText = "Bottom of Dialog";
+ }
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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.components.customfield;
+
+import java.io.IOException;
+
+import org.junit.Test;
+
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
+/**
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class CustomFieldSizeTest extends MultiBrowserTest {
+
+ @Test
+ public void checkScreenshot() throws IOException {
+ openTestURL();
+ compareScreen("size");
+ }
+}
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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.components.page;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
+public class PageTitleTest extends MultiBrowserTest {
+
+ @Test
+ public void nullTitle() {
+ driver.get(getTestUrl());
+ Assert.assertEquals(PageTitle.class.getName(), driver.getTitle());
+ }
+
+ @Test
+ public void fooTitle() {
+ driver.get(getTestUrl() + "?title=foo");
+ Assert.assertEquals("foo", driver.getTitle());
+ }
+}
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
- }
++ * 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.components.tabsheet;
+
+import org.junit.Test;
+
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
+public class EmptyTabSheetTest extends MultiBrowserTest {
+ @Test
+ public void emptyTabSheet() throws Exception {
+ openTestURL();
+
+ compareScreen("empty");
+ }
+
++}
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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.fonticon;
+
+import java.io.IOException;
+
+import org.junit.Test;
+
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
+/**
+ *
+ * @since
+ * @author Vaadin Ltd
+ */
+public class FontIconsTest extends MultiBrowserTest {
+
+ @Test
+ public void checkScreenshot() throws IOException {
+ openTestURL();
+ compareScreen("all");
+ }
+}
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
- }
++ * 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.push;
+
+public class BasicPushLongPollingTest extends BasicPushTest {
++}
return t.vaadinElementById(BasicPush.INCREMENT_BUTTON_ID);
}
- }
+ private void waitUntilClientCounterChanges(final int expectedValue) {
+ waitUntil(new ExpectedCondition<Boolean>() {
+
+ @Override
+ public Boolean apply(WebDriver input) {
+ return BasicPushTest.getClientCounter(BasicPushTest.this) == expectedValue;
+ }
+ }, 10);
+ }
+
+ private void waitUntilServerCounterChanges() {
+ final int counter = BasicPushTest.getServerCounter(this);
+ waitUntil(new ExpectedCondition<Boolean>() {
+
+ @Override
+ public Boolean apply(WebDriver input) {
+ return BasicPushTest.getServerCounter(BasicPushTest.this) > counter;
+ }
+ }, 10);
+ }
+
+ }
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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.push;
+
+public class ExtremelyLongPushTimeLongPollingTest extends
+ ExtremelyLongPushTimeTest {
+
+}
return Integer.parseInt(getServerCounterElement().getText());
}
- private WebElement getServerCounterElement() {
+ protected WebElement getServerCounterElement() {
return vaadinElement("/VVerticalLayout[0]/Slot[1]/VVerticalLayout[0]/Slot[5]/VLabel[0]");
}
- }
+
+ protected void waitForServerCounterToUpdate() {
+ int counter = getServerCounter();
+ final int waitCounter = counter + 2;
+ waitUntil(new ExpectedCondition<Boolean>() {
+
+ @Override
+ public Boolean apply(WebDriver input) {
+ return (getServerCounter() >= waitCounter);
+ }
+ });
+ }
+ }
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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.push;
+
+import com.vaadin.annotations.Push;
+import com.vaadin.server.VaadinRequest;
+import com.vaadin.shared.ui.ui.Transport;
+import com.vaadin.shared.ui.ui.UIState.PushConfigurationState;
+
+@Push(transport = Transport.LONG_POLLING)
+public class PushLargeDataLongPolling extends PushLargeData {
+
+ @Override
+ protected void setup(VaadinRequest request) {
+ super.setup(request);
+ getPushConfiguration().setParameter(
+ PushConfigurationState.FALLBACK_TRANSPORT_PARAM, "none");
+ }
+}
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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.push;
+
+
+public class ReconnectLongPollingTest extends ReconnectTest {
+
+ @Override
+ protected Class<?> getUIClass() {
+ return BasicPushLongPolling.class;
+ }
+
+}
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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.push;
+
+
+public class ReconnectStreamingTest extends ReconnectTest {
+
+ @Override
+ protected Class<?> getUIClass() {
+ return BasicPushStreaming.class;
+ }
+
+}
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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.push;
+
+import java.util.List;
+
+import org.openqa.selenium.remote.DesiredCapabilities;
+
+import com.vaadin.tests.tb3.WebsocketTest;
+
+public class ReconnectWebsocketTest extends ReconnectTest {
+
+ @Override
+ public List<DesiredCapabilities> getBrowsersToTest() {
+ return WebsocketTest.getWebsocketBrowsers();
+ }
+
+ @Override
+ protected Class<?> getUIClass() {
+ return BasicPushWebsocket.class;
+ }
+
+}
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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.serialization;
+
+import org.junit.Assert;
+import org.junit.Test;
+import org.openqa.selenium.WebElement;
+
+import com.vaadin.tests.tb3.MultiBrowserTest;
+
+public class GenericWidgetHandlingTest extends MultiBrowserTest {
+
+ @Test
+ public void testWidgetInit() {
+ openTestURL();
+ WebElement label = vaadinElementById("label");
+
+ Assert.assertEquals("The generic text is strong in this one",
+ label.getText());
+ }
+
+}
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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;
+
+import com.vaadin.client.ui.AbstractComponentConnector;
+import com.vaadin.shared.ui.Connect;
+import com.vaadin.tests.widgetset.server.GenericWidgetComponent;
+
+@Connect(GenericWidgetComponent.class)
+public class GenericWidgetConnector extends AbstractComponentConnector {
+ @Override
+ public GenericWidget<String> getWidget() {
+ return (GenericWidget<String>) super.getWidget();
+ }
+
+ @Override
+ public GenericWidgetState getState() {
+ return (GenericWidgetState) super.getState();
+ }
+}
--- /dev/null
- * Copyright 2000-2013 Vaadin Ltd.
+/*
++ * 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;
+
+import com.vaadin.tests.widgetset.client.GenericWidgetState;
+import com.vaadin.ui.AbstractComponent;
+
+public class GenericWidgetComponent extends AbstractComponent {
+
+ @Override
+ protected GenericWidgetState getState() {
+ return (GenericWidgetState) super.getState();
+ }
+
+ public void setGenericText(String genericText) {
+ getState().genericText = genericText;
+ }
+}