From bfbfdd51a0563d212d1e811a3eb534122847d206 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Wed, 29 Aug 2012 11:21:56 +0300 Subject: Renamed com.vaadin.terminal.gwt.client to com.vaadin.client (#9432) --- .../ApplicationConnectionTestURLGeneration.java | 77 ++++ .../com/vaadin/client/DateTimeServiceTest.java | 111 +++++ .../client/TestVBrowserDetailsUserAgentParser.java | 487 +++++++++++++++++++++ .../ApplicationConnectionTestURLGeneration.java | 77 ---- .../terminal/gwt/client/DateTimeServiceTest.java | 111 ----- .../client/TestVBrowserDetailsUserAgentParser.java | 487 --------------------- .../terminal/gwt/server/JSONSerializerTest.java | 4 +- .../vaadin/data/util/AbstractContainerTest.java | 224 +++++----- .../data/util/TestHierarchicalContainer.java | 54 +-- .../com/vaadin/tests/VaadinClasses.java | 2 +- .../com/vaadin/tests/server/SourceFileChecker.java | 2 +- .../com/vaadin/tests/dd/MyDragSourceConnector.java | 8 +- .../com/vaadin/tests/dd/MyDropTargetConnector.java | 8 +- .../com/vaadin/tests/dd/VMyDragSource.java | 4 +- .../com/vaadin/tests/dd/VMyDropTarget.java | 10 +- .../minitutorials/v7a2/MyPickerConnector.java | 8 +- .../client/BasicExtensionTestConnector.java | 6 +- .../tests/widgetset/client/DelegateConnector.java | 2 +- .../widgetset/client/DummyLabelConnector.java | 6 +- .../MissingFromDefaultWidgetsetConnector.java | 4 +- .../widgetset/client/SerializerTestConnector.java | 6 +- .../HelloWorldExtensionConnector.java | 10 +- .../v7a2/ComponentInStateStateConnector.java | 6 +- .../minitutorials/v7a2/MyComponentConnector.java | 8 +- .../v7a2/ResourceInStateConnector.java | 4 +- .../v7a2/WidgetContainerConnector.java | 6 +- 26 files changed, 866 insertions(+), 866 deletions(-) create mode 100644 tests/client-side/com/vaadin/client/ApplicationConnectionTestURLGeneration.java create mode 100755 tests/client-side/com/vaadin/client/DateTimeServiceTest.java create mode 100644 tests/client-side/com/vaadin/client/TestVBrowserDetailsUserAgentParser.java delete mode 100644 tests/client-side/com/vaadin/terminal/gwt/client/ApplicationConnectionTestURLGeneration.java delete mode 100755 tests/client-side/com/vaadin/terminal/gwt/client/DateTimeServiceTest.java delete mode 100644 tests/client-side/com/vaadin/terminal/gwt/client/TestVBrowserDetailsUserAgentParser.java (limited to 'tests') diff --git a/tests/client-side/com/vaadin/client/ApplicationConnectionTestURLGeneration.java b/tests/client-side/com/vaadin/client/ApplicationConnectionTestURLGeneration.java new file mode 100644 index 0000000000..da5970d64d --- /dev/null +++ b/tests/client-side/com/vaadin/client/ApplicationConnectionTestURLGeneration.java @@ -0,0 +1,77 @@ +package com.vaadin.client; + +import static org.junit.Assert.assertEquals; + +import org.junit.Test; + +import com.vaadin.client.ApplicationConnection; + +public class ApplicationConnectionTestURLGeneration { + + private static final String[] URIS = new String[] { + "http://demo.vaadin.com/", // + "https://demo.vaadin.com/", + "http://demo.vaadin.com/foo", + "http://demo.vaadin.com/foo?f", + "http://demo.vaadin.com/foo?f=1", + "http://demo.vaadin.com:1234/foo?a", + "http://demo.vaadin.com:1234/foo#frag?fakeparam", + // Jetspeed + "http://localhost:8080/jetspeed/portal/_ns:Z3RlbXBsYXRlLXRvcDJfX3BhZ2UtdGVtcGxhdGVfX2RwLTFfX1AtMTJjNTRkYjdlYjUtMTAwMDJ8YzB8ZDF8aVVJREx8Zg__", + // Liferay generated url + "http://vaadin.com/directory?p_p_id=Directory_WAR_Directory&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=UIDL&p_p_cacheability=cacheLevelPage&p_p_col_id=row-1&p_p_col_count=1", + + }; + private static final String[] URIS_WITH_ABCD_PARAM = new String[] { + "http://demo.vaadin.com/?a=b&c=d", + "https://demo.vaadin.com/?a=b&c=d", + "http://demo.vaadin.com/foo?a=b&c=d", + "http://demo.vaadin.com/foo?f&a=b&c=d", + "http://demo.vaadin.com/foo?f=1&a=b&c=d", + "http://demo.vaadin.com:1234/foo?a&a=b&c=d", + "http://demo.vaadin.com:1234/foo?a=b&c=d#frag?fakeparam", + "http://localhost:8080/jetspeed/portal/_ns:Z3RlbXBsYXRlLXRvcDJfX3BhZ2UtdGVtcGxhdGVfX2RwLTFfX1AtMTJjNTRkYjdlYjUtMTAwMDJ8YzB8ZDF8aVVJREx8Zg__?a=b&c=d", + "http://vaadin.com/directory?p_p_id=Directory_WAR_Directory&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=UIDL&p_p_cacheability=cacheLevelPage&p_p_col_id=row-1&p_p_col_count=1&a=b&c=d", + + }; + + private static final String[] URIS_WITH_ABCD_PARAM_AND_FRAGMENT = new String[] { + "http://demo.vaadin.com/?a=b&c=d#fragment", + "https://demo.vaadin.com/?a=b&c=d#fragment", + "http://demo.vaadin.com/foo?a=b&c=d#fragment", + "http://demo.vaadin.com/foo?f&a=b&c=d#fragment", + "http://demo.vaadin.com/foo?f=1&a=b&c=d#fragment", + "http://demo.vaadin.com:1234/foo?a&a=b&c=d#fragment", + "", + "http://localhost:8080/jetspeed/portal/_ns:Z3RlbXBsYXRlLXRvcDJfX3BhZ2UtdGVtcGxhdGVfX2RwLTFfX1AtMTJjNTRkYjdlYjUtMTAwMDJ8YzB8ZDF8aVVJREx8Zg__?a=b&c=d#fragment", + "http://vaadin.com/directory?p_p_id=Directory_WAR_Directory&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=UIDL&p_p_cacheability=cacheLevelPage&p_p_col_id=row-1&p_p_col_count=1&a=b&c=d#fragment", + + }; + + @Test + public void testParameterAdding() { + for (int i = 0; i < URIS.length; i++) { + // Adding nothing + assertEquals(URIS[i], + ApplicationConnection.addGetParameters(URIS[i], "")); + + // Adding a=b&c=d + assertEquals(URIS_WITH_ABCD_PARAM[i], + ApplicationConnection.addGetParameters(URIS[i], "a=b&c=d")); + + // Fragments + if (URIS_WITH_ABCD_PARAM_AND_FRAGMENT[i].length() > 0) { + assertEquals( + URIS_WITH_ABCD_PARAM_AND_FRAGMENT[i], + ApplicationConnection.addGetParameters(URIS[i] + + "#fragment", "a=b&c=d")); + + // Empty fragment + assertEquals(URIS_WITH_ABCD_PARAM_AND_FRAGMENT[i].replace( + "#fragment", "#"), + ApplicationConnection.addGetParameters(URIS[i] + "#", + "a=b&c=d")); + } + } + } +} diff --git a/tests/client-side/com/vaadin/client/DateTimeServiceTest.java b/tests/client-side/com/vaadin/client/DateTimeServiceTest.java new file mode 100755 index 0000000000..6852e9ec3f --- /dev/null +++ b/tests/client-side/com/vaadin/client/DateTimeServiceTest.java @@ -0,0 +1,111 @@ +package com.vaadin.client; + +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +import junit.framework.TestCase; + +import com.vaadin.client.DateTimeService; + +public class DateTimeServiceTest extends TestCase { + + final long MILLISECONDS_PER_DAY = 24 * 3600 * 1000; + + static Map isoWeekNumbers = new HashMap(); + static { + isoWeekNumbers.put(getDate(2005, 02, 02), 5); + + isoWeekNumbers.put(getDate(2005, 1, 1), 53); + isoWeekNumbers.put(getDate(2005, 1, 2), 53); + isoWeekNumbers.put(getDate(2005, 1, 3), 1); + isoWeekNumbers.put(getDate(2005, 1, 4), 1); + isoWeekNumbers.put(getDate(2005, 1, 5), 1); + isoWeekNumbers.put(getDate(2005, 1, 6), 1); + isoWeekNumbers.put(getDate(2005, 1, 7), 1); + isoWeekNumbers.put(getDate(2005, 1, 8), 1); + isoWeekNumbers.put(getDate(2005, 1, 9), 1); + isoWeekNumbers.put(getDate(2005, 1, 10), 2); + isoWeekNumbers.put(getDate(2005, 12, 31), 52); + isoWeekNumbers.put(getDate(2005, 12, 30), 52); + isoWeekNumbers.put(getDate(2005, 12, 29), 52); + isoWeekNumbers.put(getDate(2005, 12, 28), 52); + isoWeekNumbers.put(getDate(2005, 12, 27), 52); + isoWeekNumbers.put(getDate(2005, 12, 26), 52); + isoWeekNumbers.put(getDate(2005, 12, 25), 51); + isoWeekNumbers.put(getDate(2007, 1, 1), 1); + isoWeekNumbers.put(getDate(2007, 12, 30), 52); + isoWeekNumbers.put(getDate(2007, 12, 31), 1); + isoWeekNumbers.put(getDate(2008, 1, 1), 1); + isoWeekNumbers.put(getDate(2008, 12, 28), 52); + isoWeekNumbers.put(getDate(2008, 12, 29), 1); + isoWeekNumbers.put(getDate(2008, 12, 30), 1); + isoWeekNumbers.put(getDate(2008, 12, 31), 1); + isoWeekNumbers.put(getDate(2009, 1, 1), 1); + isoWeekNumbers.put(getDate(2009, 12, 31), 53); + isoWeekNumbers.put(getDate(2010, 1, 1), 53); + isoWeekNumbers.put(getDate(2010, 1, 2), 53); + isoWeekNumbers.put(getDate(2010, 1, 3), 53); + isoWeekNumbers.put(getDate(2010, 1, 4), 1); + isoWeekNumbers.put(getDate(2010, 1, 5), 1); + isoWeekNumbers.put(getDate(2010, 10, 10), 40); + + } + + /** + * Test all dates from 1990-1992 + some more and see that {@link Calendar} + * calculates the ISO week number like we do. + * + */ + public void testISOWeekNumbers() { + Calendar c = Calendar.getInstance(); + c.set(1990, 1, 1); + long start = c.getTimeInMillis(); + + for (int i = 0; i < 1000; i++) { + Date d = new Date(start + i * MILLISECONDS_PER_DAY); + int expected = getCalendarISOWeekNr(d); + int calculated = DateTimeService.getISOWeekNumber(d); + assertEquals(d + " should be week " + expected, expected, + calculated); + + } + } + + /** + * Verify that special cases are handled correctly by us (and + * {@link Calendar}). + * + */ + public void testSampleISOWeekNumbers() { + for (Date d : isoWeekNumbers.keySet()) { + // System.out.println("Sample: " + d); + int expected = isoWeekNumbers.get(d); + int calculated = DateTimeService.getISOWeekNumber(d); + assertEquals(d + " should be week " + expected + + " (Java Calendar is wrong?)", expected, + getCalendarISOWeekNr(d)); + assertEquals(d + " should be week " + expected, expected, + calculated); + + } + } + + private int getCalendarISOWeekNr(Date d) { + Calendar c = Calendar.getInstance(); + c.setFirstDayOfWeek(Calendar.MONDAY); + c.setMinimalDaysInFirstWeek(4); + c.setTime(d); + + return c.get(Calendar.WEEK_OF_YEAR); + } + + private static Date getDate(int year, int month, int date) { + Calendar c = Calendar.getInstance(); + c.clear(); + c.set(year, month - 1, date); + return c.getTime(); + } + +} diff --git a/tests/client-side/com/vaadin/client/TestVBrowserDetailsUserAgentParser.java b/tests/client-side/com/vaadin/client/TestVBrowserDetailsUserAgentParser.java new file mode 100644 index 0000000000..04e8be699b --- /dev/null +++ b/tests/client-side/com/vaadin/client/TestVBrowserDetailsUserAgentParser.java @@ -0,0 +1,487 @@ +package com.vaadin.client; + +import com.vaadin.shared.VBrowserDetails; + +import junit.framework.TestCase; + +public class TestVBrowserDetailsUserAgentParser extends TestCase { + + private static final String FIREFOX30_WINDOWS = "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6"; + private static final String FIREFOX30_LINUX = "Mozilla/5.0 (X11; U; Linux x86_64; es-ES; rv:1.9.0.12) Gecko/2009070811 Ubuntu/9.04 (jaunty) Firefox/3.0.12"; + private static final String FIREFOX35_WINDOWS = "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8 (.NET CLR 3.5.30729) FirePHP/0.4"; + private static final String FIREFOX36_WINDOWS = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)"; + private static final String FIREFOX36B_MAC = "UAString mozilla/5.0 (macintosh; u; intel mac os x 10.6; en-us; rv:1.9.2) gecko/20100115 firefox/3.6"; + private static final String FIREFOX_30B5_MAC = "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9b5) Gecko/2008032619 Firefox/3.0b5"; + private static final String FIREFOX_40B7_WIN = "Mozilla/5.0 (Windows NT 5.1; rv:2.0b7) Gecko/20100101 Firefox/4.0b7"; + private static final String FIREFOX_40B11_WIN = "Mozilla/5.0 (Windows NT 5.1; rv:2.0b11) Gecko/20100101 Firefox/4.0b11"; + private static final String KONQUEROR_LINUX = "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.5 (like Gecko) (Exabot-Thumbnails)"; + + private static final String IE6_WINDOWS = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"; + private static final String IE7_WINDOWS = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"; + + private static final String IE8_WINDOWS = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2)"; + private static final String IE8_IN_IE7_MODE_WINDOWS = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2)"; + + private static final String IE9_BETA_IN_IE7_MODE_WINDOWS_7 = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)"; + private static final String IE9_BETA_IN_IE8_MODE_WINDOWS_7 = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)"; + private static final String IE9_BETA_WINDOWS_7 = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"; + + // "Version/" was added in 10.00 + private static final String OPERA964_WINDOWS = "Opera/9.64(Windows NT 5.1; U; en) Presto/2.1.1"; + private static final String OPERA1010_WINDOWS = "Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.10"; + private static final String OPERA1050_WINDOWS = "Opera/9.80 (Windows NT 5.1; U; en) Presto/2.5.22 Version/10.50"; + + private static final String CHROME3_MAC = "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.198 Safari/532.0"; + private static final String CHROME4_WINDOWS = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.89 Safari/532.5"; + + private static final String SAFARI3_WINDOWS = "Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ) AppleWebKit/525.28.3 (KHTML, like Gecko) Version/3.2.3 Safari/525.29"; + private static final String SAFARI4_MAC = "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_8; en-us) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7"; + + private static final String IPHONE_IOS_5_1 = "Mozilla/5.0 (iPhone; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B179 Safari/7534.48.3"; + private static final String IPHONE_IOS_4_0 = "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7"; + private static final String IPAD_IOS_4_3_1 = "Mozilla/5.0 (iPad; U; CPU OS 4_3_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8G4 Safari/6533.18.5"; + + private static final String ANDROID_HTC_2_1 = "Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; ADR6300 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17"; + private static final String ANDROID_GOOGLE_NEXUS_2_2 = "Mozilla/5.0 (Linux; U; Android 2.2; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"; + private static final String ANDROID_MOTOROLA_3_0 = "Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13"; + private static final String ANDROID_GALAXY_NEXUS_4_0_4_CHROME = "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19"; + + public void testSafari3() { + VBrowserDetails bd = new VBrowserDetails(SAFARI3_WINDOWS); + assertWebKit(bd); + assertSafari(bd); + assertBrowserMajorVersion(bd, 3); + assertBrowserMinorVersion(bd, 2); + assertEngineVersion(bd, 525.0f); + assertWindows(bd); + } + + public void testSafari4() { + VBrowserDetails bd = new VBrowserDetails(SAFARI4_MAC); + assertWebKit(bd); + assertSafari(bd); + assertBrowserMajorVersion(bd, 4); + assertBrowserMinorVersion(bd, 0); + assertEngineVersion(bd, 531f); + assertMacOSX(bd); + } + + public void testIPhoneIOS5() { + VBrowserDetails bd = new VBrowserDetails(IPHONE_IOS_5_1); + assertWebKit(bd); + assertSafari(bd); + assertBrowserMajorVersion(bd, 5); + assertBrowserMinorVersion(bd, 1); + assertEngineVersion(bd, 534f); + assertIOS(bd, 5, 1); + } + + public void testIPhoneIOS4() { + VBrowserDetails bd = new VBrowserDetails(IPHONE_IOS_4_0); + assertWebKit(bd); + assertSafari(bd); + assertBrowserMajorVersion(bd, 4); + assertBrowserMinorVersion(bd, 0); + assertEngineVersion(bd, 532f); + assertIOS(bd, 4, 0); + } + + public void testIPadIOS4() { + VBrowserDetails bd = new VBrowserDetails(IPAD_IOS_4_3_1); + assertWebKit(bd); + assertSafari(bd); + assertBrowserMajorVersion(bd, 5); + assertBrowserMinorVersion(bd, 0); + assertEngineVersion(bd, 533f); + assertIOS(bd, 4, 3); + } + + public void testAndroid21() { + VBrowserDetails bd = new VBrowserDetails(ANDROID_HTC_2_1); + assertWebKit(bd); + assertSafari(bd); + assertBrowserMajorVersion(bd, 4); + assertBrowserMinorVersion(bd, 0); + assertEngineVersion(bd, 530f); + assertAndroid(bd, 2, 1); + + } + + public void testAndroid22() { + VBrowserDetails bd = new VBrowserDetails(ANDROID_GOOGLE_NEXUS_2_2); + assertWebKit(bd); + assertSafari(bd); + assertBrowserMajorVersion(bd, 4); + assertBrowserMinorVersion(bd, 0); + assertEngineVersion(bd, 533f); + assertAndroid(bd, 2, 2); + } + + public void testAndroid30() { + VBrowserDetails bd = new VBrowserDetails(ANDROID_MOTOROLA_3_0); + assertWebKit(bd); + assertSafari(bd); + assertBrowserMajorVersion(bd, 4); + assertBrowserMinorVersion(bd, 0); + assertEngineVersion(bd, 534f); + assertAndroid(bd, 3, 0); + } + + public void testAndroid40Chrome() { + VBrowserDetails bd = new VBrowserDetails( + ANDROID_GALAXY_NEXUS_4_0_4_CHROME); + assertWebKit(bd); + assertChrome(bd); + assertBrowserMajorVersion(bd, 18); + assertBrowserMinorVersion(bd, 0); + assertEngineVersion(bd, 535f); + assertAndroid(bd, 4, 0); + } + + private void assertOSMajorVersion(VBrowserDetails bd, int i) { + assertEquals(i, bd.getOperatingSystemMajorVersion()); + } + + private void assertOSMinorVersion(VBrowserDetails bd, int i) { + assertEquals(i, bd.getOperatingSystemMinorVersion()); + } + + public void testChrome3() { + VBrowserDetails bd = new VBrowserDetails(CHROME3_MAC); + assertWebKit(bd); + assertChrome(bd); + assertBrowserMajorVersion(bd, 3); + assertBrowserMinorVersion(bd, 0); + assertEngineVersion(bd, 532.0f); + assertMacOSX(bd); + } + + public void testChrome4() { + VBrowserDetails bd = new VBrowserDetails(CHROME4_WINDOWS); + assertWebKit(bd); + assertChrome(bd); + assertBrowserMajorVersion(bd, 4); + assertBrowserMinorVersion(bd, 0); + assertEngineVersion(bd, 532f); + assertWindows(bd); + } + + public void testFirefox3() { + VBrowserDetails bd = new VBrowserDetails(FIREFOX30_WINDOWS); + assertGecko(bd); + assertFirefox(bd); + assertBrowserMajorVersion(bd, 3); + assertBrowserMinorVersion(bd, 0); + assertEngineVersion(bd, 1.9f); + assertWindows(bd); + + bd = new VBrowserDetails(FIREFOX30_LINUX); + assertGecko(bd); + assertFirefox(bd); + assertBrowserMajorVersion(bd, 3); + assertBrowserMinorVersion(bd, 0); + assertEngineVersion(bd, 1.9f); + assertLinux(bd); + } + + public void testFirefox35() { + VBrowserDetails bd = new VBrowserDetails(FIREFOX35_WINDOWS); + assertGecko(bd); + assertFirefox(bd); + assertBrowserMajorVersion(bd, 3); + assertBrowserMinorVersion(bd, 5); + assertEngineVersion(bd, 1.9f); + assertWindows(bd); + } + + public void testFirefox36() { + VBrowserDetails bd = new VBrowserDetails(FIREFOX36_WINDOWS); + assertGecko(bd); + assertFirefox(bd); + assertBrowserMajorVersion(bd, 3); + assertBrowserMinorVersion(bd, 6); + assertEngineVersion(bd, 1.9f); + assertWindows(bd); + } + + public void testFirefox30b5() { + VBrowserDetails bd = new VBrowserDetails(FIREFOX_30B5_MAC); + assertGecko(bd); + assertFirefox(bd); + assertBrowserMajorVersion(bd, 3); + assertBrowserMinorVersion(bd, 0); + assertEngineVersion(bd, 1.9f); + assertMacOSX(bd); + } + + public void testFirefox40b11() { + VBrowserDetails bd = new VBrowserDetails(FIREFOX_40B11_WIN); + assertGecko(bd); + assertFirefox(bd); + assertBrowserMajorVersion(bd, 4); + assertBrowserMinorVersion(bd, 0); + assertEngineVersion(bd, 2.0f); + assertWindows(bd); + } + + public void testFirefox40b7() { + VBrowserDetails bd = new VBrowserDetails(FIREFOX_40B7_WIN); + assertGecko(bd); + assertFirefox(bd); + assertBrowserMajorVersion(bd, 4); + assertBrowserMinorVersion(bd, 0); + assertEngineVersion(bd, 2.0f); + assertWindows(bd); + } + + public void testKonquerorLinux() { + // Just ensure detection does not crash + VBrowserDetails bd = new VBrowserDetails(KONQUEROR_LINUX); + assertLinux(bd); + } + + public void testFirefox36b() { + VBrowserDetails bd = new VBrowserDetails(FIREFOX36B_MAC); + assertGecko(bd); + assertFirefox(bd); + assertBrowserMajorVersion(bd, 3); + assertBrowserMinorVersion(bd, 6); + assertEngineVersion(bd, 1.9f); + assertMacOSX(bd); + } + + public void testOpera964() { + VBrowserDetails bd = new VBrowserDetails(OPERA964_WINDOWS); + assertPresto(bd); + assertOpera(bd); + assertBrowserMajorVersion(bd, 9); + assertBrowserMinorVersion(bd, 64); + assertWindows(bd); + } + + public void testOpera1010() { + VBrowserDetails bd = new VBrowserDetails(OPERA1010_WINDOWS); + assertPresto(bd); + assertOpera(bd); + assertBrowserMajorVersion(bd, 10); + assertBrowserMinorVersion(bd, 10); + assertWindows(bd); + } + + public void testOpera1050() { + VBrowserDetails bd = new VBrowserDetails(OPERA1050_WINDOWS); + assertPresto(bd); + assertOpera(bd); + assertBrowserMajorVersion(bd, 10); + assertBrowserMinorVersion(bd, 50); + assertWindows(bd); + } + + public void testIE6() { + VBrowserDetails bd = new VBrowserDetails(IE6_WINDOWS); + // assertTrident(bd); + assertIE(bd); + assertBrowserMajorVersion(bd, 6); + assertBrowserMinorVersion(bd, 0); + assertWindows(bd); + } + + public void testIE7() { + VBrowserDetails bd = new VBrowserDetails(IE7_WINDOWS); + // assertTrident(bd); + assertIE(bd); + assertBrowserMajorVersion(bd, 7); + assertBrowserMinorVersion(bd, 0); + assertWindows(bd); + } + + public void testIE8() { + VBrowserDetails bd = new VBrowserDetails(IE8_WINDOWS); + // assertTrident(bd); + assertIE(bd); + assertBrowserMajorVersion(bd, 8); + assertBrowserMinorVersion(bd, 0); + assertWindows(bd); + } + + public void testIE8CompatibilityMode() { + VBrowserDetails bd = new VBrowserDetails(IE8_IN_IE7_MODE_WINDOWS); + bd.setIEMode(7); + + // assertTrident(bd); + assertIE(bd); + assertBrowserMajorVersion(bd, 7); + assertBrowserMinorVersion(bd, 0); + + assertWindows(bd); + } + + public void testIE9() { + VBrowserDetails bd = new VBrowserDetails(IE9_BETA_WINDOWS_7); + // assertTrident(bd); + assertIE(bd); + assertBrowserMajorVersion(bd, 9); + assertBrowserMinorVersion(bd, 0); + assertWindows(bd); + } + + public void testIE9InIE7CompatibilityMode() { + VBrowserDetails bd = new VBrowserDetails(IE9_BETA_IN_IE7_MODE_WINDOWS_7); + // bd.setIE8InCompatibilityMode(); + + // assertTrident(bd); + assertIE(bd); + assertBrowserMajorVersion(bd, 7); + assertBrowserMinorVersion(bd, 0); + + assertWindows(bd); + } + + public void testIE9InIE8CompatibilityMode() { + VBrowserDetails bd = new VBrowserDetails(IE9_BETA_IN_IE8_MODE_WINDOWS_7); + // bd.setIE8InCompatibilityMode(); + + // assertTrident(bd); + assertIE(bd); + assertBrowserMajorVersion(bd, 8); + assertBrowserMinorVersion(bd, 0); + + assertWindows(bd); + } + + /* + * Helper methods below + */ + + private void assertEngineVersion(VBrowserDetails browserDetails, + float version) { + assertEquals(version, browserDetails.getBrowserEngineVersion()); + + } + + private void assertBrowserMajorVersion(VBrowserDetails browserDetails, + int version) { + assertEquals(version, browserDetails.getBrowserMajorVersion()); + + } + + private void assertBrowserMinorVersion(VBrowserDetails browserDetails, + int version) { + assertEquals(version, browserDetails.getBrowserMinorVersion()); + + } + + private void assertGecko(VBrowserDetails browserDetails) { + // Engine + assertTrue(browserDetails.isGecko()); + assertFalse(browserDetails.isWebKit()); + assertFalse(browserDetails.isPresto()); + } + + private void assertPresto(VBrowserDetails browserDetails) { + // Engine + assertFalse(browserDetails.isGecko()); + assertFalse(browserDetails.isWebKit()); + assertTrue(browserDetails.isPresto()); + } + + private void assertWebKit(VBrowserDetails browserDetails) { + // Engine + assertFalse(browserDetails.isGecko()); + assertTrue(browserDetails.isWebKit()); + assertFalse(browserDetails.isPresto()); + } + + private void assertFirefox(VBrowserDetails browserDetails) { + // Browser + assertTrue(browserDetails.isFirefox()); + assertFalse(browserDetails.isChrome()); + assertFalse(browserDetails.isIE()); + assertFalse(browserDetails.isOpera()); + assertFalse(browserDetails.isSafari()); + } + + private void assertChrome(VBrowserDetails browserDetails) { + // Browser + assertFalse(browserDetails.isFirefox()); + assertTrue(browserDetails.isChrome()); + assertFalse(browserDetails.isIE()); + assertFalse(browserDetails.isOpera()); + assertFalse(browserDetails.isSafari()); + } + + private void assertIE(VBrowserDetails browserDetails) { + // Browser + assertFalse(browserDetails.isFirefox()); + assertFalse(browserDetails.isChrome()); + assertTrue(browserDetails.isIE()); + assertFalse(browserDetails.isOpera()); + assertFalse(browserDetails.isSafari()); + } + + private void assertOpera(VBrowserDetails browserDetails) { + // Browser + assertFalse(browserDetails.isFirefox()); + assertFalse(browserDetails.isChrome()); + assertFalse(browserDetails.isIE()); + assertTrue(browserDetails.isOpera()); + assertFalse(browserDetails.isSafari()); + } + + private void assertSafari(VBrowserDetails browserDetails) { + // Browser + assertFalse(browserDetails.isFirefox()); + assertFalse(browserDetails.isChrome()); + assertFalse(browserDetails.isIE()); + assertFalse(browserDetails.isOpera()); + assertTrue(browserDetails.isSafari()); + } + + private void assertMacOSX(VBrowserDetails browserDetails) { + assertFalse(browserDetails.isLinux()); + assertFalse(browserDetails.isWindows()); + assertTrue(browserDetails.isMacOSX()); + assertFalse(browserDetails.isAndroid()); + } + + private void assertAndroid(VBrowserDetails browserDetails, + int majorVersion, int minorVersion) { + assertFalse(browserDetails.isLinux()); + assertFalse(browserDetails.isWindows()); + assertFalse(browserDetails.isMacOSX()); + assertFalse(browserDetails.isIOS()); + assertTrue(browserDetails.isAndroid()); + + assertOSMajorVersion(browserDetails, majorVersion); + assertOSMinorVersion(browserDetails, minorVersion); + } + + private void assertIOS(VBrowserDetails browserDetails, int majorVersion, + int minorVersion) { + assertFalse(browserDetails.isLinux()); + assertFalse(browserDetails.isWindows()); + assertFalse(browserDetails.isMacOSX()); + assertTrue(browserDetails.isIOS()); + assertFalse(browserDetails.isAndroid()); + + assertOSMajorVersion(browserDetails, majorVersion); + assertOSMinorVersion(browserDetails, minorVersion); + } + + private void assertWindows(VBrowserDetails browserDetails) { + assertFalse(browserDetails.isLinux()); + assertTrue(browserDetails.isWindows()); + assertFalse(browserDetails.isMacOSX()); + assertFalse(browserDetails.isIOS()); + assertFalse(browserDetails.isAndroid()); + } + + private void assertLinux(VBrowserDetails browserDetails) { + assertTrue(browserDetails.isLinux()); + assertFalse(browserDetails.isWindows()); + assertFalse(browserDetails.isMacOSX()); + assertFalse(browserDetails.isIOS()); + assertFalse(browserDetails.isAndroid()); + } + +} diff --git a/tests/client-side/com/vaadin/terminal/gwt/client/ApplicationConnectionTestURLGeneration.java b/tests/client-side/com/vaadin/terminal/gwt/client/ApplicationConnectionTestURLGeneration.java deleted file mode 100644 index 3535d50529..0000000000 --- a/tests/client-side/com/vaadin/terminal/gwt/client/ApplicationConnectionTestURLGeneration.java +++ /dev/null @@ -1,77 +0,0 @@ -package com.vaadin.terminal.gwt.client; - -import static org.junit.Assert.assertEquals; - -import org.junit.Test; - -import com.vaadin.terminal.gwt.client.ApplicationConnection; - -public class ApplicationConnectionTestURLGeneration { - - private static final String[] URIS = new String[] { - "http://demo.vaadin.com/", // - "https://demo.vaadin.com/", - "http://demo.vaadin.com/foo", - "http://demo.vaadin.com/foo?f", - "http://demo.vaadin.com/foo?f=1", - "http://demo.vaadin.com:1234/foo?a", - "http://demo.vaadin.com:1234/foo#frag?fakeparam", - // Jetspeed - "http://localhost:8080/jetspeed/portal/_ns:Z3RlbXBsYXRlLXRvcDJfX3BhZ2UtdGVtcGxhdGVfX2RwLTFfX1AtMTJjNTRkYjdlYjUtMTAwMDJ8YzB8ZDF8aVVJREx8Zg__", - // Liferay generated url - "http://vaadin.com/directory?p_p_id=Directory_WAR_Directory&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=UIDL&p_p_cacheability=cacheLevelPage&p_p_col_id=row-1&p_p_col_count=1", - - }; - private static final String[] URIS_WITH_ABCD_PARAM = new String[] { - "http://demo.vaadin.com/?a=b&c=d", - "https://demo.vaadin.com/?a=b&c=d", - "http://demo.vaadin.com/foo?a=b&c=d", - "http://demo.vaadin.com/foo?f&a=b&c=d", - "http://demo.vaadin.com/foo?f=1&a=b&c=d", - "http://demo.vaadin.com:1234/foo?a&a=b&c=d", - "http://demo.vaadin.com:1234/foo?a=b&c=d#frag?fakeparam", - "http://localhost:8080/jetspeed/portal/_ns:Z3RlbXBsYXRlLXRvcDJfX3BhZ2UtdGVtcGxhdGVfX2RwLTFfX1AtMTJjNTRkYjdlYjUtMTAwMDJ8YzB8ZDF8aVVJREx8Zg__?a=b&c=d", - "http://vaadin.com/directory?p_p_id=Directory_WAR_Directory&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=UIDL&p_p_cacheability=cacheLevelPage&p_p_col_id=row-1&p_p_col_count=1&a=b&c=d", - - }; - - private static final String[] URIS_WITH_ABCD_PARAM_AND_FRAGMENT = new String[] { - "http://demo.vaadin.com/?a=b&c=d#fragment", - "https://demo.vaadin.com/?a=b&c=d#fragment", - "http://demo.vaadin.com/foo?a=b&c=d#fragment", - "http://demo.vaadin.com/foo?f&a=b&c=d#fragment", - "http://demo.vaadin.com/foo?f=1&a=b&c=d#fragment", - "http://demo.vaadin.com:1234/foo?a&a=b&c=d#fragment", - "", - "http://localhost:8080/jetspeed/portal/_ns:Z3RlbXBsYXRlLXRvcDJfX3BhZ2UtdGVtcGxhdGVfX2RwLTFfX1AtMTJjNTRkYjdlYjUtMTAwMDJ8YzB8ZDF8aVVJREx8Zg__?a=b&c=d#fragment", - "http://vaadin.com/directory?p_p_id=Directory_WAR_Directory&p_p_lifecycle=2&p_p_state=normal&p_p_mode=view&p_p_resource_id=UIDL&p_p_cacheability=cacheLevelPage&p_p_col_id=row-1&p_p_col_count=1&a=b&c=d#fragment", - - }; - - @Test - public void testParameterAdding() { - for (int i = 0; i < URIS.length; i++) { - // Adding nothing - assertEquals(URIS[i], - ApplicationConnection.addGetParameters(URIS[i], "")); - - // Adding a=b&c=d - assertEquals(URIS_WITH_ABCD_PARAM[i], - ApplicationConnection.addGetParameters(URIS[i], "a=b&c=d")); - - // Fragments - if (URIS_WITH_ABCD_PARAM_AND_FRAGMENT[i].length() > 0) { - assertEquals( - URIS_WITH_ABCD_PARAM_AND_FRAGMENT[i], - ApplicationConnection.addGetParameters(URIS[i] - + "#fragment", "a=b&c=d")); - - // Empty fragment - assertEquals(URIS_WITH_ABCD_PARAM_AND_FRAGMENT[i].replace( - "#fragment", "#"), - ApplicationConnection.addGetParameters(URIS[i] + "#", - "a=b&c=d")); - } - } - } -} diff --git a/tests/client-side/com/vaadin/terminal/gwt/client/DateTimeServiceTest.java b/tests/client-side/com/vaadin/terminal/gwt/client/DateTimeServiceTest.java deleted file mode 100755 index b111faf5bc..0000000000 --- a/tests/client-side/com/vaadin/terminal/gwt/client/DateTimeServiceTest.java +++ /dev/null @@ -1,111 +0,0 @@ -package com.vaadin.terminal.gwt.client; - -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; - -import junit.framework.TestCase; - -import com.vaadin.terminal.gwt.client.DateTimeService; - -public class DateTimeServiceTest extends TestCase { - - final long MILLISECONDS_PER_DAY = 24 * 3600 * 1000; - - static Map isoWeekNumbers = new HashMap(); - static { - isoWeekNumbers.put(getDate(2005, 02, 02), 5); - - isoWeekNumbers.put(getDate(2005, 1, 1), 53); - isoWeekNumbers.put(getDate(2005, 1, 2), 53); - isoWeekNumbers.put(getDate(2005, 1, 3), 1); - isoWeekNumbers.put(getDate(2005, 1, 4), 1); - isoWeekNumbers.put(getDate(2005, 1, 5), 1); - isoWeekNumbers.put(getDate(2005, 1, 6), 1); - isoWeekNumbers.put(getDate(2005, 1, 7), 1); - isoWeekNumbers.put(getDate(2005, 1, 8), 1); - isoWeekNumbers.put(getDate(2005, 1, 9), 1); - isoWeekNumbers.put(getDate(2005, 1, 10), 2); - isoWeekNumbers.put(getDate(2005, 12, 31), 52); - isoWeekNumbers.put(getDate(2005, 12, 30), 52); - isoWeekNumbers.put(getDate(2005, 12, 29), 52); - isoWeekNumbers.put(getDate(2005, 12, 28), 52); - isoWeekNumbers.put(getDate(2005, 12, 27), 52); - isoWeekNumbers.put(getDate(2005, 12, 26), 52); - isoWeekNumbers.put(getDate(2005, 12, 25), 51); - isoWeekNumbers.put(getDate(2007, 1, 1), 1); - isoWeekNumbers.put(getDate(2007, 12, 30), 52); - isoWeekNumbers.put(getDate(2007, 12, 31), 1); - isoWeekNumbers.put(getDate(2008, 1, 1), 1); - isoWeekNumbers.put(getDate(2008, 12, 28), 52); - isoWeekNumbers.put(getDate(2008, 12, 29), 1); - isoWeekNumbers.put(getDate(2008, 12, 30), 1); - isoWeekNumbers.put(getDate(2008, 12, 31), 1); - isoWeekNumbers.put(getDate(2009, 1, 1), 1); - isoWeekNumbers.put(getDate(2009, 12, 31), 53); - isoWeekNumbers.put(getDate(2010, 1, 1), 53); - isoWeekNumbers.put(getDate(2010, 1, 2), 53); - isoWeekNumbers.put(getDate(2010, 1, 3), 53); - isoWeekNumbers.put(getDate(2010, 1, 4), 1); - isoWeekNumbers.put(getDate(2010, 1, 5), 1); - isoWeekNumbers.put(getDate(2010, 10, 10), 40); - - } - - /** - * Test all dates from 1990-1992 + some more and see that {@link Calendar} - * calculates the ISO week number like we do. - * - */ - public void testISOWeekNumbers() { - Calendar c = Calendar.getInstance(); - c.set(1990, 1, 1); - long start = c.getTimeInMillis(); - - for (int i = 0; i < 1000; i++) { - Date d = new Date(start + i * MILLISECONDS_PER_DAY); - int expected = getCalendarISOWeekNr(d); - int calculated = DateTimeService.getISOWeekNumber(d); - assertEquals(d + " should be week " + expected, expected, - calculated); - - } - } - - /** - * Verify that special cases are handled correctly by us (and - * {@link Calendar}). - * - */ - public void testSampleISOWeekNumbers() { - for (Date d : isoWeekNumbers.keySet()) { - // System.out.println("Sample: " + d); - int expected = isoWeekNumbers.get(d); - int calculated = DateTimeService.getISOWeekNumber(d); - assertEquals(d + " should be week " + expected - + " (Java Calendar is wrong?)", expected, - getCalendarISOWeekNr(d)); - assertEquals(d + " should be week " + expected, expected, - calculated); - - } - } - - private int getCalendarISOWeekNr(Date d) { - Calendar c = Calendar.getInstance(); - c.setFirstDayOfWeek(Calendar.MONDAY); - c.setMinimalDaysInFirstWeek(4); - c.setTime(d); - - return c.get(Calendar.WEEK_OF_YEAR); - } - - private static Date getDate(int year, int month, int date) { - Calendar c = Calendar.getInstance(); - c.clear(); - c.set(year, month - 1, date); - return c.getTime(); - } - -} diff --git a/tests/client-side/com/vaadin/terminal/gwt/client/TestVBrowserDetailsUserAgentParser.java b/tests/client-side/com/vaadin/terminal/gwt/client/TestVBrowserDetailsUserAgentParser.java deleted file mode 100644 index 34b64606a5..0000000000 --- a/tests/client-side/com/vaadin/terminal/gwt/client/TestVBrowserDetailsUserAgentParser.java +++ /dev/null @@ -1,487 +0,0 @@ -package com.vaadin.terminal.gwt.client; - -import com.vaadin.shared.VBrowserDetails; - -import junit.framework.TestCase; - -public class TestVBrowserDetailsUserAgentParser extends TestCase { - - private static final String FIREFOX30_WINDOWS = "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.0.6) Gecko/2009011913 Firefox/3.0.6"; - private static final String FIREFOX30_LINUX = "Mozilla/5.0 (X11; U; Linux x86_64; es-ES; rv:1.9.0.12) Gecko/2009070811 Ubuntu/9.04 (jaunty) Firefox/3.0.12"; - private static final String FIREFOX35_WINDOWS = "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.1.8) Gecko/20100202 Firefox/3.5.8 (.NET CLR 3.5.30729) FirePHP/0.4"; - private static final String FIREFOX36_WINDOWS = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)"; - private static final String FIREFOX36B_MAC = "UAString mozilla/5.0 (macintosh; u; intel mac os x 10.6; en-us; rv:1.9.2) gecko/20100115 firefox/3.6"; - private static final String FIREFOX_30B5_MAC = "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9b5) Gecko/2008032619 Firefox/3.0b5"; - private static final String FIREFOX_40B7_WIN = "Mozilla/5.0 (Windows NT 5.1; rv:2.0b7) Gecko/20100101 Firefox/4.0b7"; - private static final String FIREFOX_40B11_WIN = "Mozilla/5.0 (Windows NT 5.1; rv:2.0b11) Gecko/20100101 Firefox/4.0b11"; - private static final String KONQUEROR_LINUX = "Mozilla/5.0 (compatible; Konqueror/3.5; Linux) KHTML/3.5.5 (like Gecko) (Exabot-Thumbnails)"; - - private static final String IE6_WINDOWS = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727)"; - private static final String IE7_WINDOWS = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"; - - private static final String IE8_WINDOWS = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2)"; - private static final String IE8_IN_IE7_MODE_WINDOWS = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2)"; - - private static final String IE9_BETA_IN_IE7_MODE_WINDOWS_7 = "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)"; - private static final String IE9_BETA_IN_IE8_MODE_WINDOWS_7 = "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C)"; - private static final String IE9_BETA_WINDOWS_7 = "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)"; - - // "Version/" was added in 10.00 - private static final String OPERA964_WINDOWS = "Opera/9.64(Windows NT 5.1; U; en) Presto/2.1.1"; - private static final String OPERA1010_WINDOWS = "Opera/9.80 (Windows NT 5.1; U; en) Presto/2.2.15 Version/10.10"; - private static final String OPERA1050_WINDOWS = "Opera/9.80 (Windows NT 5.1; U; en) Presto/2.5.22 Version/10.50"; - - private static final String CHROME3_MAC = "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.198 Safari/532.0"; - private static final String CHROME4_WINDOWS = "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.89 Safari/532.5"; - - private static final String SAFARI3_WINDOWS = "Mozilla/5.0 (Windows; U; Windows NT 5.1; cs-CZ) AppleWebKit/525.28.3 (KHTML, like Gecko) Version/3.2.3 Safari/525.29"; - private static final String SAFARI4_MAC = "Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_5_8; en-us) AppleWebKit/531.22.7 (KHTML, like Gecko) Version/4.0.5 Safari/531.22.7"; - - private static final String IPHONE_IOS_5_1 = "Mozilla/5.0 (iPhone; CPU iPhone OS 5_1 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9B179 Safari/7534.48.3"; - private static final String IPHONE_IOS_4_0 = "Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_0 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8A293 Safari/6531.22.7"; - private static final String IPAD_IOS_4_3_1 = "Mozilla/5.0 (iPad; U; CPU OS 4_3_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8G4 Safari/6533.18.5"; - - private static final String ANDROID_HTC_2_1 = "Mozilla/5.0 (Linux; U; Android 2.1-update1; en-us; ADR6300 Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17"; - private static final String ANDROID_GOOGLE_NEXUS_2_2 = "Mozilla/5.0 (Linux; U; Android 2.2; en-us; Nexus One Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1"; - private static final String ANDROID_MOTOROLA_3_0 = "Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13"; - private static final String ANDROID_GALAXY_NEXUS_4_0_4_CHROME = "Mozilla/5.0 (Linux; Android 4.0.4; Galaxy Nexus Build/IMM76B) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.133 Mobile Safari/535.19"; - - public void testSafari3() { - VBrowserDetails bd = new VBrowserDetails(SAFARI3_WINDOWS); - assertWebKit(bd); - assertSafari(bd); - assertBrowserMajorVersion(bd, 3); - assertBrowserMinorVersion(bd, 2); - assertEngineVersion(bd, 525.0f); - assertWindows(bd); - } - - public void testSafari4() { - VBrowserDetails bd = new VBrowserDetails(SAFARI4_MAC); - assertWebKit(bd); - assertSafari(bd); - assertBrowserMajorVersion(bd, 4); - assertBrowserMinorVersion(bd, 0); - assertEngineVersion(bd, 531f); - assertMacOSX(bd); - } - - public void testIPhoneIOS5() { - VBrowserDetails bd = new VBrowserDetails(IPHONE_IOS_5_1); - assertWebKit(bd); - assertSafari(bd); - assertBrowserMajorVersion(bd, 5); - assertBrowserMinorVersion(bd, 1); - assertEngineVersion(bd, 534f); - assertIOS(bd, 5, 1); - } - - public void testIPhoneIOS4() { - VBrowserDetails bd = new VBrowserDetails(IPHONE_IOS_4_0); - assertWebKit(bd); - assertSafari(bd); - assertBrowserMajorVersion(bd, 4); - assertBrowserMinorVersion(bd, 0); - assertEngineVersion(bd, 532f); - assertIOS(bd, 4, 0); - } - - public void testIPadIOS4() { - VBrowserDetails bd = new VBrowserDetails(IPAD_IOS_4_3_1); - assertWebKit(bd); - assertSafari(bd); - assertBrowserMajorVersion(bd, 5); - assertBrowserMinorVersion(bd, 0); - assertEngineVersion(bd, 533f); - assertIOS(bd, 4, 3); - } - - public void testAndroid21() { - VBrowserDetails bd = new VBrowserDetails(ANDROID_HTC_2_1); - assertWebKit(bd); - assertSafari(bd); - assertBrowserMajorVersion(bd, 4); - assertBrowserMinorVersion(bd, 0); - assertEngineVersion(bd, 530f); - assertAndroid(bd, 2, 1); - - } - - public void testAndroid22() { - VBrowserDetails bd = new VBrowserDetails(ANDROID_GOOGLE_NEXUS_2_2); - assertWebKit(bd); - assertSafari(bd); - assertBrowserMajorVersion(bd, 4); - assertBrowserMinorVersion(bd, 0); - assertEngineVersion(bd, 533f); - assertAndroid(bd, 2, 2); - } - - public void testAndroid30() { - VBrowserDetails bd = new VBrowserDetails(ANDROID_MOTOROLA_3_0); - assertWebKit(bd); - assertSafari(bd); - assertBrowserMajorVersion(bd, 4); - assertBrowserMinorVersion(bd, 0); - assertEngineVersion(bd, 534f); - assertAndroid(bd, 3, 0); - } - - public void testAndroid40Chrome() { - VBrowserDetails bd = new VBrowserDetails( - ANDROID_GALAXY_NEXUS_4_0_4_CHROME); - assertWebKit(bd); - assertChrome(bd); - assertBrowserMajorVersion(bd, 18); - assertBrowserMinorVersion(bd, 0); - assertEngineVersion(bd, 535f); - assertAndroid(bd, 4, 0); - } - - private void assertOSMajorVersion(VBrowserDetails bd, int i) { - assertEquals(i, bd.getOperatingSystemMajorVersion()); - } - - private void assertOSMinorVersion(VBrowserDetails bd, int i) { - assertEquals(i, bd.getOperatingSystemMinorVersion()); - } - - public void testChrome3() { - VBrowserDetails bd = new VBrowserDetails(CHROME3_MAC); - assertWebKit(bd); - assertChrome(bd); - assertBrowserMajorVersion(bd, 3); - assertBrowserMinorVersion(bd, 0); - assertEngineVersion(bd, 532.0f); - assertMacOSX(bd); - } - - public void testChrome4() { - VBrowserDetails bd = new VBrowserDetails(CHROME4_WINDOWS); - assertWebKit(bd); - assertChrome(bd); - assertBrowserMajorVersion(bd, 4); - assertBrowserMinorVersion(bd, 0); - assertEngineVersion(bd, 532f); - assertWindows(bd); - } - - public void testFirefox3() { - VBrowserDetails bd = new VBrowserDetails(FIREFOX30_WINDOWS); - assertGecko(bd); - assertFirefox(bd); - assertBrowserMajorVersion(bd, 3); - assertBrowserMinorVersion(bd, 0); - assertEngineVersion(bd, 1.9f); - assertWindows(bd); - - bd = new VBrowserDetails(FIREFOX30_LINUX); - assertGecko(bd); - assertFirefox(bd); - assertBrowserMajorVersion(bd, 3); - assertBrowserMinorVersion(bd, 0); - assertEngineVersion(bd, 1.9f); - assertLinux(bd); - } - - public void testFirefox35() { - VBrowserDetails bd = new VBrowserDetails(FIREFOX35_WINDOWS); - assertGecko(bd); - assertFirefox(bd); - assertBrowserMajorVersion(bd, 3); - assertBrowserMinorVersion(bd, 5); - assertEngineVersion(bd, 1.9f); - assertWindows(bd); - } - - public void testFirefox36() { - VBrowserDetails bd = new VBrowserDetails(FIREFOX36_WINDOWS); - assertGecko(bd); - assertFirefox(bd); - assertBrowserMajorVersion(bd, 3); - assertBrowserMinorVersion(bd, 6); - assertEngineVersion(bd, 1.9f); - assertWindows(bd); - } - - public void testFirefox30b5() { - VBrowserDetails bd = new VBrowserDetails(FIREFOX_30B5_MAC); - assertGecko(bd); - assertFirefox(bd); - assertBrowserMajorVersion(bd, 3); - assertBrowserMinorVersion(bd, 0); - assertEngineVersion(bd, 1.9f); - assertMacOSX(bd); - } - - public void testFirefox40b11() { - VBrowserDetails bd = new VBrowserDetails(FIREFOX_40B11_WIN); - assertGecko(bd); - assertFirefox(bd); - assertBrowserMajorVersion(bd, 4); - assertBrowserMinorVersion(bd, 0); - assertEngineVersion(bd, 2.0f); - assertWindows(bd); - } - - public void testFirefox40b7() { - VBrowserDetails bd = new VBrowserDetails(FIREFOX_40B7_WIN); - assertGecko(bd); - assertFirefox(bd); - assertBrowserMajorVersion(bd, 4); - assertBrowserMinorVersion(bd, 0); - assertEngineVersion(bd, 2.0f); - assertWindows(bd); - } - - public void testKonquerorLinux() { - // Just ensure detection does not crash - VBrowserDetails bd = new VBrowserDetails(KONQUEROR_LINUX); - assertLinux(bd); - } - - public void testFirefox36b() { - VBrowserDetails bd = new VBrowserDetails(FIREFOX36B_MAC); - assertGecko(bd); - assertFirefox(bd); - assertBrowserMajorVersion(bd, 3); - assertBrowserMinorVersion(bd, 6); - assertEngineVersion(bd, 1.9f); - assertMacOSX(bd); - } - - public void testOpera964() { - VBrowserDetails bd = new VBrowserDetails(OPERA964_WINDOWS); - assertPresto(bd); - assertOpera(bd); - assertBrowserMajorVersion(bd, 9); - assertBrowserMinorVersion(bd, 64); - assertWindows(bd); - } - - public void testOpera1010() { - VBrowserDetails bd = new VBrowserDetails(OPERA1010_WINDOWS); - assertPresto(bd); - assertOpera(bd); - assertBrowserMajorVersion(bd, 10); - assertBrowserMinorVersion(bd, 10); - assertWindows(bd); - } - - public void testOpera1050() { - VBrowserDetails bd = new VBrowserDetails(OPERA1050_WINDOWS); - assertPresto(bd); - assertOpera(bd); - assertBrowserMajorVersion(bd, 10); - assertBrowserMinorVersion(bd, 50); - assertWindows(bd); - } - - public void testIE6() { - VBrowserDetails bd = new VBrowserDetails(IE6_WINDOWS); - // assertTrident(bd); - assertIE(bd); - assertBrowserMajorVersion(bd, 6); - assertBrowserMinorVersion(bd, 0); - assertWindows(bd); - } - - public void testIE7() { - VBrowserDetails bd = new VBrowserDetails(IE7_WINDOWS); - // assertTrident(bd); - assertIE(bd); - assertBrowserMajorVersion(bd, 7); - assertBrowserMinorVersion(bd, 0); - assertWindows(bd); - } - - public void testIE8() { - VBrowserDetails bd = new VBrowserDetails(IE8_WINDOWS); - // assertTrident(bd); - assertIE(bd); - assertBrowserMajorVersion(bd, 8); - assertBrowserMinorVersion(bd, 0); - assertWindows(bd); - } - - public void testIE8CompatibilityMode() { - VBrowserDetails bd = new VBrowserDetails(IE8_IN_IE7_MODE_WINDOWS); - bd.setIEMode(7); - - // assertTrident(bd); - assertIE(bd); - assertBrowserMajorVersion(bd, 7); - assertBrowserMinorVersion(bd, 0); - - assertWindows(bd); - } - - public void testIE9() { - VBrowserDetails bd = new VBrowserDetails(IE9_BETA_WINDOWS_7); - // assertTrident(bd); - assertIE(bd); - assertBrowserMajorVersion(bd, 9); - assertBrowserMinorVersion(bd, 0); - assertWindows(bd); - } - - public void testIE9InIE7CompatibilityMode() { - VBrowserDetails bd = new VBrowserDetails(IE9_BETA_IN_IE7_MODE_WINDOWS_7); - // bd.setIE8InCompatibilityMode(); - - // assertTrident(bd); - assertIE(bd); - assertBrowserMajorVersion(bd, 7); - assertBrowserMinorVersion(bd, 0); - - assertWindows(bd); - } - - public void testIE9InIE8CompatibilityMode() { - VBrowserDetails bd = new VBrowserDetails(IE9_BETA_IN_IE8_MODE_WINDOWS_7); - // bd.setIE8InCompatibilityMode(); - - // assertTrident(bd); - assertIE(bd); - assertBrowserMajorVersion(bd, 8); - assertBrowserMinorVersion(bd, 0); - - assertWindows(bd); - } - - /* - * Helper methods below - */ - - private void assertEngineVersion(VBrowserDetails browserDetails, - float version) { - assertEquals(version, browserDetails.getBrowserEngineVersion()); - - } - - private void assertBrowserMajorVersion(VBrowserDetails browserDetails, - int version) { - assertEquals(version, browserDetails.getBrowserMajorVersion()); - - } - - private void assertBrowserMinorVersion(VBrowserDetails browserDetails, - int version) { - assertEquals(version, browserDetails.getBrowserMinorVersion()); - - } - - private void assertGecko(VBrowserDetails browserDetails) { - // Engine - assertTrue(browserDetails.isGecko()); - assertFalse(browserDetails.isWebKit()); - assertFalse(browserDetails.isPresto()); - } - - private void assertPresto(VBrowserDetails browserDetails) { - // Engine - assertFalse(browserDetails.isGecko()); - assertFalse(browserDetails.isWebKit()); - assertTrue(browserDetails.isPresto()); - } - - private void assertWebKit(VBrowserDetails browserDetails) { - // Engine - assertFalse(browserDetails.isGecko()); - assertTrue(browserDetails.isWebKit()); - assertFalse(browserDetails.isPresto()); - } - - private void assertFirefox(VBrowserDetails browserDetails) { - // Browser - assertTrue(browserDetails.isFirefox()); - assertFalse(browserDetails.isChrome()); - assertFalse(browserDetails.isIE()); - assertFalse(browserDetails.isOpera()); - assertFalse(browserDetails.isSafari()); - } - - private void assertChrome(VBrowserDetails browserDetails) { - // Browser - assertFalse(browserDetails.isFirefox()); - assertTrue(browserDetails.isChrome()); - assertFalse(browserDetails.isIE()); - assertFalse(browserDetails.isOpera()); - assertFalse(browserDetails.isSafari()); - } - - private void assertIE(VBrowserDetails browserDetails) { - // Browser - assertFalse(browserDetails.isFirefox()); - assertFalse(browserDetails.isChrome()); - assertTrue(browserDetails.isIE()); - assertFalse(browserDetails.isOpera()); - assertFalse(browserDetails.isSafari()); - } - - private void assertOpera(VBrowserDetails browserDetails) { - // Browser - assertFalse(browserDetails.isFirefox()); - assertFalse(browserDetails.isChrome()); - assertFalse(browserDetails.isIE()); - assertTrue(browserDetails.isOpera()); - assertFalse(browserDetails.isSafari()); - } - - private void assertSafari(VBrowserDetails browserDetails) { - // Browser - assertFalse(browserDetails.isFirefox()); - assertFalse(browserDetails.isChrome()); - assertFalse(browserDetails.isIE()); - assertFalse(browserDetails.isOpera()); - assertTrue(browserDetails.isSafari()); - } - - private void assertMacOSX(VBrowserDetails browserDetails) { - assertFalse(browserDetails.isLinux()); - assertFalse(browserDetails.isWindows()); - assertTrue(browserDetails.isMacOSX()); - assertFalse(browserDetails.isAndroid()); - } - - private void assertAndroid(VBrowserDetails browserDetails, - int majorVersion, int minorVersion) { - assertFalse(browserDetails.isLinux()); - assertFalse(browserDetails.isWindows()); - assertFalse(browserDetails.isMacOSX()); - assertFalse(browserDetails.isIOS()); - assertTrue(browserDetails.isAndroid()); - - assertOSMajorVersion(browserDetails, majorVersion); - assertOSMinorVersion(browserDetails, minorVersion); - } - - private void assertIOS(VBrowserDetails browserDetails, int majorVersion, - int minorVersion) { - assertFalse(browserDetails.isLinux()); - assertFalse(browserDetails.isWindows()); - assertFalse(browserDetails.isMacOSX()); - assertTrue(browserDetails.isIOS()); - assertFalse(browserDetails.isAndroid()); - - assertOSMajorVersion(browserDetails, majorVersion); - assertOSMinorVersion(browserDetails, minorVersion); - } - - private void assertWindows(VBrowserDetails browserDetails) { - assertFalse(browserDetails.isLinux()); - assertTrue(browserDetails.isWindows()); - assertFalse(browserDetails.isMacOSX()); - assertFalse(browserDetails.isIOS()); - assertFalse(browserDetails.isAndroid()); - } - - private void assertLinux(VBrowserDetails browserDetails) { - assertTrue(browserDetails.isLinux()); - assertFalse(browserDetails.isWindows()); - assertFalse(browserDetails.isMacOSX()); - assertFalse(browserDetails.isIOS()); - assertFalse(browserDetails.isAndroid()); - } - -} diff --git a/tests/client-side/com/vaadin/terminal/gwt/server/JSONSerializerTest.java b/tests/client-side/com/vaadin/terminal/gwt/server/JSONSerializerTest.java index 58dfdf246c..941525bed4 100644 --- a/tests/client-side/com/vaadin/terminal/gwt/server/JSONSerializerTest.java +++ b/tests/client-side/com/vaadin/terminal/gwt/server/JSONSerializerTest.java @@ -22,9 +22,9 @@ import java.util.Map; import junit.framework.TestCase; +import com.vaadin.client.communication.JsonDecoder; +import com.vaadin.client.communication.JsonEncoder; import com.vaadin.shared.ui.splitpanel.AbstractSplitPanelState; -import com.vaadin.terminal.gwt.client.communication.JsonDecoder; -import com.vaadin.terminal.gwt.client.communication.JsonEncoder; import com.vaadin.terminal.gwt.server.JsonCodec.BeanProperty; /** diff --git a/tests/server-side/com/vaadin/data/util/AbstractContainerTest.java b/tests/server-side/com/vaadin/data/util/AbstractContainerTest.java index d703fb0364..9c7e526dad 100644 --- a/tests/server-side/com/vaadin/data/util/AbstractContainerTest.java +++ b/tests/server-side/com/vaadin/data/util/AbstractContainerTest.java @@ -319,7 +319,7 @@ public abstract class AbstractContainerTest extends TestCase { validateContainer(container, "com.vaadin.data.BufferedValidatable", "com.vaadin.ui.TabSheet", - "com.vaadin.terminal.gwt.client.Focusable", + "com.vaadin.client.Focusable", "com.vaadin.data.Buffered", isFilteredOutItemNull(), 20); // Filter by "contains da" (reversed as ad here) @@ -330,7 +330,7 @@ public abstract class AbstractContainerTest extends TestCase { validateContainer(container, "com.vaadin.data.Buffered", "com.vaadin.terminal.gwt.server.ComponentSizeValidator", "com.vaadin.data.util.IndexedContainer", - "com.vaadin.terminal.gwt.client.ui.VUriFragmentUtility", + "com.vaadin.client.ui.VUriFragmentUtility", isFilteredOutItemNull(), 37); } @@ -483,116 +483,116 @@ public abstract class AbstractContainerTest extends TestCase { "com.vaadin.terminal.ErrorMessage", "com.vaadin.terminal.ExternalResource", "com.vaadin.terminal.FileResource", - "com.vaadin.terminal.gwt.client.ApplicationConfiguration", - "com.vaadin.terminal.gwt.client.ApplicationConnection", - "com.vaadin.terminal.gwt.client.BrowserInfo", - "com.vaadin.terminal.gwt.client.ClientExceptionHandler", - "com.vaadin.terminal.gwt.client.ComponentDetail", - "com.vaadin.terminal.gwt.client.ComponentDetailMap", - "com.vaadin.terminal.gwt.client.ComponentLocator", - "com.vaadin.terminal.gwt.client.Console", - "com.vaadin.terminal.gwt.client.Container", - "com.vaadin.terminal.gwt.client.ContainerResizedListener", - "com.vaadin.terminal.gwt.client.CSSRule", - "com.vaadin.terminal.gwt.client.DateTimeService", - "com.vaadin.terminal.gwt.client.DefaultWidgetSet", - "com.vaadin.terminal.gwt.client.Focusable", - "com.vaadin.terminal.gwt.client.HistoryImplIEVaadin", - "com.vaadin.terminal.gwt.client.LocaleNotLoadedException", - "com.vaadin.terminal.gwt.client.LocaleService", - "com.vaadin.terminal.gwt.client.MouseEventDetails", - "com.vaadin.terminal.gwt.client.NullConsole", - "com.vaadin.terminal.gwt.client.Paintable", - "com.vaadin.terminal.gwt.client.RenderInformation", - "com.vaadin.terminal.gwt.client.RenderSpace", - "com.vaadin.terminal.gwt.client.StyleConstants", - "com.vaadin.terminal.gwt.client.TooltipInfo", - "com.vaadin.terminal.gwt.client.ui.Action", - "com.vaadin.terminal.gwt.client.ui.ActionOwner", - "com.vaadin.terminal.gwt.client.ui.AlignmentInfo", - "com.vaadin.terminal.gwt.client.ui.CalendarEntry", - "com.vaadin.terminal.gwt.client.ui.ClickEventHandler", - "com.vaadin.terminal.gwt.client.ui.Field", - "com.vaadin.terminal.gwt.client.ui.Icon", - "com.vaadin.terminal.gwt.client.ui.layout.CellBasedLayout", - "com.vaadin.terminal.gwt.client.ui.layout.ChildComponentContainer", - "com.vaadin.terminal.gwt.client.ui.layout.Margins", - "com.vaadin.terminal.gwt.client.ui.LayoutClickEventHandler", - "com.vaadin.terminal.gwt.client.ui.MenuBar", - "com.vaadin.terminal.gwt.client.ui.MenuItem", - "com.vaadin.terminal.gwt.client.ui.richtextarea.VRichTextArea", - "com.vaadin.terminal.gwt.client.ui.richtextarea.VRichTextToolbar", - "com.vaadin.terminal.gwt.client.ui.ShortcutActionHandler", - "com.vaadin.terminal.gwt.client.ui.SubPartAware", - "com.vaadin.terminal.gwt.client.ui.Table", - "com.vaadin.terminal.gwt.client.ui.TreeAction", - "com.vaadin.terminal.gwt.client.ui.TreeImages", - "com.vaadin.terminal.gwt.client.ui.VAbsoluteLayout", - "com.vaadin.terminal.gwt.client.ui.VAccordion", - "com.vaadin.terminal.gwt.client.ui.VButton", - "com.vaadin.terminal.gwt.client.ui.VCalendarPanel", - "com.vaadin.terminal.gwt.client.ui.VCheckBox", - "com.vaadin.terminal.gwt.client.ui.VContextMenu", - "com.vaadin.terminal.gwt.client.ui.VCssLayout", - "com.vaadin.terminal.gwt.client.ui.VCustomComponent", - "com.vaadin.terminal.gwt.client.ui.VCustomLayout", - "com.vaadin.terminal.gwt.client.ui.VDateField", - "com.vaadin.terminal.gwt.client.ui.VDateFieldCalendar", - "com.vaadin.terminal.gwt.client.ui.VEmbedded", - "com.vaadin.terminal.gwt.client.ui.VFilterSelect", - "com.vaadin.terminal.gwt.client.ui.VForm", - "com.vaadin.terminal.gwt.client.ui.VFormLayout", - "com.vaadin.terminal.gwt.client.ui.VGridLayout", - "com.vaadin.terminal.gwt.client.ui.VHorizontalLayout", - "com.vaadin.terminal.gwt.client.ui.VLabel", - "com.vaadin.terminal.gwt.client.ui.VLink", - "com.vaadin.terminal.gwt.client.ui.VListSelect", - "com.vaadin.terminal.gwt.client.ui.VMarginInfo", - "com.vaadin.terminal.gwt.client.ui.VMenuBar", - "com.vaadin.terminal.gwt.client.ui.VNativeButton", - "com.vaadin.terminal.gwt.client.ui.VNativeSelect", - "com.vaadin.terminal.gwt.client.ui.VNotification", - "com.vaadin.terminal.gwt.client.ui.VOptionGroup", - "com.vaadin.terminal.gwt.client.ui.VOptionGroupBase", - "com.vaadin.terminal.gwt.client.ui.VOrderedLayout", - "com.vaadin.terminal.gwt.client.ui.VOverlay", - "com.vaadin.terminal.gwt.client.ui.VPanel", - "com.vaadin.terminal.gwt.client.ui.VPasswordField", - "com.vaadin.terminal.gwt.client.ui.VPopupCalendar", - "com.vaadin.terminal.gwt.client.ui.VPopupView", - "com.vaadin.terminal.gwt.client.ui.VProgressIndicator", - "com.vaadin.terminal.gwt.client.ui.VScrollTable", - "com.vaadin.terminal.gwt.client.ui.VSlider", - "com.vaadin.terminal.gwt.client.ui.VSplitPanel", - "com.vaadin.terminal.gwt.client.ui.VSplitPanelHorizontal", - "com.vaadin.terminal.gwt.client.ui.VSplitPanelVertical", - "com.vaadin.terminal.gwt.client.ui.VTablePaging", - "com.vaadin.terminal.gwt.client.ui.VTabsheet", - "com.vaadin.terminal.gwt.client.ui.VTabsheetBase", - "com.vaadin.terminal.gwt.client.ui.VTabsheetPanel", - "com.vaadin.terminal.gwt.client.ui.VTextArea", - "com.vaadin.terminal.gwt.client.ui.VTextField", - "com.vaadin.terminal.gwt.client.ui.VTextualDate", - "com.vaadin.terminal.gwt.client.ui.VTime", - "com.vaadin.terminal.gwt.client.ui.VTree", - "com.vaadin.terminal.gwt.client.ui.VTwinColSelect", - "com.vaadin.terminal.gwt.client.ui.VUnknownComponent", - "com.vaadin.terminal.gwt.client.ui.VUpload", - "com.vaadin.terminal.gwt.client.ui.VUriFragmentUtility", - "com.vaadin.terminal.gwt.client.ui.VVerticalLayout", - "com.vaadin.terminal.gwt.client.ui.VView", - "com.vaadin.terminal.gwt.client.ui.VWindow", - "com.vaadin.terminal.gwt.client.UIDL", - "com.vaadin.terminal.gwt.client.Util", - "com.vaadin.terminal.gwt.client.ValueMap", - "com.vaadin.terminal.gwt.client.VCaption", - "com.vaadin.terminal.gwt.client.VCaptionWrapper", - "com.vaadin.terminal.gwt.client.VDebugConsole", - "com.vaadin.terminal.gwt.client.VErrorMessage", - "com.vaadin.terminal.gwt.client.VTooltip", - "com.vaadin.terminal.gwt.client.VUIDLBrowser", - "com.vaadin.terminal.gwt.client.WidgetMap", - "com.vaadin.terminal.gwt.client.WidgetSet", + "com.vaadin.client.ApplicationConfiguration", + "com.vaadin.client.ApplicationConnection", + "com.vaadin.client.BrowserInfo", + "com.vaadin.client.ClientExceptionHandler", + "com.vaadin.client.ComponentDetail", + "com.vaadin.client.ComponentDetailMap", + "com.vaadin.client.ComponentLocator", + "com.vaadin.client.Console", + "com.vaadin.client.Container", + "com.vaadin.client.ContainerResizedListener", + "com.vaadin.client.CSSRule", + "com.vaadin.client.DateTimeService", + "com.vaadin.client.DefaultWidgetSet", + "com.vaadin.client.Focusable", + "com.vaadin.client.HistoryImplIEVaadin", + "com.vaadin.client.LocaleNotLoadedException", + "com.vaadin.client.LocaleService", + "com.vaadin.client.MouseEventDetails", + "com.vaadin.client.NullConsole", + "com.vaadin.client.Paintable", + "com.vaadin.client.RenderInformation", + "com.vaadin.client.RenderSpace", + "com.vaadin.client.StyleConstants", + "com.vaadin.client.TooltipInfo", + "com.vaadin.client.ui.Action", + "com.vaadin.client.ui.ActionOwner", + "com.vaadin.client.ui.AlignmentInfo", + "com.vaadin.client.ui.CalendarEntry", + "com.vaadin.client.ui.ClickEventHandler", + "com.vaadin.client.ui.Field", + "com.vaadin.client.ui.Icon", + "com.vaadin.client.ui.layout.CellBasedLayout", + "com.vaadin.client.ui.layout.ChildComponentContainer", + "com.vaadin.client.ui.layout.Margins", + "com.vaadin.client.ui.LayoutClickEventHandler", + "com.vaadin.client.ui.MenuBar", + "com.vaadin.client.ui.MenuItem", + "com.vaadin.client.ui.richtextarea.VRichTextArea", + "com.vaadin.client.ui.richtextarea.VRichTextToolbar", + "com.vaadin.client.ui.ShortcutActionHandler", + "com.vaadin.client.ui.SubPartAware", + "com.vaadin.client.ui.Table", + "com.vaadin.client.ui.TreeAction", + "com.vaadin.client.ui.TreeImages", + "com.vaadin.client.ui.VAbsoluteLayout", + "com.vaadin.client.ui.VAccordion", + "com.vaadin.client.ui.VButton", + "com.vaadin.client.ui.VCalendarPanel", + "com.vaadin.client.ui.VCheckBox", + "com.vaadin.client.ui.VContextMenu", + "com.vaadin.client.ui.VCssLayout", + "com.vaadin.client.ui.VCustomComponent", + "com.vaadin.client.ui.VCustomLayout", + "com.vaadin.client.ui.VDateField", + "com.vaadin.client.ui.VDateFieldCalendar", + "com.vaadin.client.ui.VEmbedded", + "com.vaadin.client.ui.VFilterSelect", + "com.vaadin.client.ui.VForm", + "com.vaadin.client.ui.VFormLayout", + "com.vaadin.client.ui.VGridLayout", + "com.vaadin.client.ui.VHorizontalLayout", + "com.vaadin.client.ui.VLabel", + "com.vaadin.client.ui.VLink", + "com.vaadin.client.ui.VListSelect", + "com.vaadin.client.ui.VMarginInfo", + "com.vaadin.client.ui.VMenuBar", + "com.vaadin.client.ui.VNativeButton", + "com.vaadin.client.ui.VNativeSelect", + "com.vaadin.client.ui.VNotification", + "com.vaadin.client.ui.VOptionGroup", + "com.vaadin.client.ui.VOptionGroupBase", + "com.vaadin.client.ui.VOrderedLayout", + "com.vaadin.client.ui.VOverlay", + "com.vaadin.client.ui.VPanel", + "com.vaadin.client.ui.VPasswordField", + "com.vaadin.client.ui.VPopupCalendar", + "com.vaadin.client.ui.VPopupView", + "com.vaadin.client.ui.VProgressIndicator", + "com.vaadin.client.ui.VScrollTable", + "com.vaadin.client.ui.VSlider", + "com.vaadin.client.ui.VSplitPanel", + "com.vaadin.client.ui.VSplitPanelHorizontal", + "com.vaadin.client.ui.VSplitPanelVertical", + "com.vaadin.client.ui.VTablePaging", + "com.vaadin.client.ui.VTabsheet", + "com.vaadin.client.ui.VTabsheetBase", + "com.vaadin.client.ui.VTabsheetPanel", + "com.vaadin.client.ui.VTextArea", + "com.vaadin.client.ui.VTextField", + "com.vaadin.client.ui.VTextualDate", + "com.vaadin.client.ui.VTime", + "com.vaadin.client.ui.VTree", + "com.vaadin.client.ui.VTwinColSelect", + "com.vaadin.client.ui.VUnknownComponent", + "com.vaadin.client.ui.VUpload", + "com.vaadin.client.ui.VUriFragmentUtility", + "com.vaadin.client.ui.VVerticalLayout", + "com.vaadin.client.ui.VView", + "com.vaadin.client.ui.VWindow", + "com.vaadin.client.UIDL", + "com.vaadin.client.Util", + "com.vaadin.client.ValueMap", + "com.vaadin.client.VCaption", + "com.vaadin.client.VCaptionWrapper", + "com.vaadin.client.VDebugConsole", + "com.vaadin.client.VErrorMessage", + "com.vaadin.client.VTooltip", + "com.vaadin.client.VUIDLBrowser", + "com.vaadin.client.WidgetMap", + "com.vaadin.client.WidgetSet", "com.vaadin.terminal.gwt.server.AbstractApplicationPortlet", "com.vaadin.terminal.gwt.server.AbstractApplicationServlet", "com.vaadin.terminal.gwt.server.AbstractCommunicationManager", diff --git a/tests/server-side/com/vaadin/data/util/TestHierarchicalContainer.java b/tests/server-side/com/vaadin/data/util/TestHierarchicalContainer.java index 9e0558a122..f0cbfe7a87 100644 --- a/tests/server-side/com/vaadin/data/util/TestHierarchicalContainer.java +++ b/tests/server-side/com/vaadin/data/util/TestHierarchicalContainer.java @@ -46,7 +46,7 @@ public class TestHierarchicalContainer extends assertNull("Parent should be null, is " + p1, p1); container.removeAllItems(); - p1 = container.getParent("com.vaadin.terminal.gwt.client.Focusable"); + p1 = container.getParent("com.vaadin.client.Focusable"); assertNull("Parent should be null, is " + p1, p1); } @@ -59,12 +59,12 @@ public class TestHierarchicalContainer extends Object p1 = container.getParent("com.vaadin.ui.TabSheet"); assertEquals("com.vaadin.ui", p1); p1 = container - .getParent("com.vaadin.terminal.gwt.client.ui.VPopupCalendar"); + .getParent("com.vaadin.client.ui.VPopupCalendar"); assertNull(p1); container.removeAllContainerFilters(); p1 = container - .getParent("com.vaadin.terminal.gwt.client.ui.VPopupCalendar"); - assertEquals("com.vaadin.terminal.gwt.client.ui", p1); + .getParent("com.vaadin.client.ui.VPopupCalendar"); + assertEquals("com.vaadin.client.ui", p1); } @@ -111,7 +111,7 @@ public class TestHierarchicalContainer extends validateHierarchicalContainer(container, "com", "com.vaadin.ui.TabSheet", - "com.vaadin.terminal.gwt.client.Focusable", "blah", true, + "com.vaadin.client.Focusable", "blah", true, expectedSize, expectedRoots, true); // only include .gwt.client classes @@ -126,8 +126,8 @@ public class TestHierarchicalContainer extends expectedRoots = 1; validateHierarchicalContainer(container, "com", - "com.vaadin.terminal.gwt.client.WidgetSet", - "com.vaadin.terminal.gwt.client.ui.VSplitPanelVertical", + "com.vaadin.client.WidgetSet", + "com.vaadin.client.ui.VSplitPanelVertical", "blah", true, expectedSize, expectedRoots, true); // Additionally remove all without 'm' in the simple name. @@ -139,8 +139,8 @@ public class TestHierarchicalContainer extends validateHierarchicalContainer( container, "com", - "com.vaadin.terminal.gwt.client.ui.VUriFragmentUtility", - "com.vaadin.terminal.gwt.client.ui.layout.ChildComponentContainer", + "com.vaadin.client.ui.VUriFragmentUtility", + "com.vaadin.client.ui.layout.ChildComponentContainer", "blah", true, expectedSize, expectedRoots, true); } @@ -208,15 +208,15 @@ public class TestHierarchicalContainer extends // 20 items match the filter. // com.vaadin.data.BufferedValidatable // com.vaadin.data.Validatable - // com.vaadin.terminal.gwt.client.Focusable - // com.vaadin.terminal.gwt.client.Paintable - // com.vaadin.terminal.gwt.client.ui.Table - // com.vaadin.terminal.gwt.client.ui.VLabel - // com.vaadin.terminal.gwt.client.ui.VScrollTable - // com.vaadin.terminal.gwt.client.ui.VTablePaging - // com.vaadin.terminal.gwt.client.ui.VTabsheet - // com.vaadin.terminal.gwt.client.ui.VTabsheetBase - // com.vaadin.terminal.gwt.client.ui.VTabsheetPanel + // com.vaadin.client.Focusable + // com.vaadin.client.Paintable + // com.vaadin.client.ui.Table + // com.vaadin.client.ui.VLabel + // com.vaadin.client.ui.VScrollTable + // com.vaadin.client.ui.VTablePaging + // com.vaadin.client.ui.VTabsheet + // com.vaadin.client.ui.VTabsheetBase + // com.vaadin.client.ui.VTabsheetPanel // com.vaadin.terminal.gwt.server.ChangeVariablesErrorEvent // com.vaadin.terminal.Paintable // com.vaadin.terminal.Scrollable @@ -233,7 +233,7 @@ public class TestHierarchicalContainer extends validateHierarchicalContainer(container, "com.vaadin.data.BufferedValidatable", "com.vaadin.ui.TabSheet", - "com.vaadin.terminal.gwt.client.ui.VTabsheetBase", "blah", + "com.vaadin.client.ui.VTabsheetBase", "blah", true, expectedSize, expectedRoots, false); // only include .gwt.client classes @@ -245,14 +245,14 @@ public class TestHierarchicalContainer extends int classes = 110; expectedSize = packages + classes; - expectedRoots = 35 + 1; // com.vaadin.terminal.gwt.client.ui + - // com.vaadin.terminal.gwt.client.* + expectedRoots = 35 + 1; // com.vaadin.client.ui + + // com.vaadin.client.* // Sorting is case insensitive validateHierarchicalContainer(container, - "com.vaadin.terminal.gwt.client.ApplicationConfiguration", - "com.vaadin.terminal.gwt.client.WidgetSet", - "com.vaadin.terminal.gwt.client.ui.VOptionGroup", "blah", true, + "com.vaadin.client.ApplicationConfiguration", + "com.vaadin.client.WidgetSet", + "com.vaadin.client.ui.VOptionGroup", "blah", true, expectedSize, expectedRoots, false); // Additionally remove all without 'P' in the simple name. @@ -262,9 +262,9 @@ public class TestHierarchicalContainer extends expectedRoots = expectedSize; validateHierarchicalContainer(container, - "com.vaadin.terminal.gwt.client.Paintable", - "com.vaadin.terminal.gwt.client.ui.VTabsheetPanel", - "com.vaadin.terminal.gwt.client.ui.VPopupCalendar", "blah", + "com.vaadin.client.Paintable", + "com.vaadin.client.ui.VTabsheetPanel", + "com.vaadin.client.ui.VPopupCalendar", "blah", true, expectedSize, expectedRoots, false); } diff --git a/tests/server-side/com/vaadin/tests/VaadinClasses.java b/tests/server-side/com/vaadin/tests/VaadinClasses.java index 5d9e38398c..15e1283e47 100644 --- a/tests/server-side/com/vaadin/tests/VaadinClasses.java +++ b/tests/server-side/com/vaadin/tests/VaadinClasses.java @@ -84,7 +84,7 @@ public class VaadinClasses { public static List> getAllServerSideClasses() { try { return findClassesNoTests(Object.class, "com.vaadin", new String[] { - "com.vaadin.tests", "com.vaadin.terminal.gwt.client" }); + "com.vaadin.tests", "com.vaadin.client" }); } catch (IOException e) { e.printStackTrace(); return null; diff --git a/tests/server-side/com/vaadin/tests/server/SourceFileChecker.java b/tests/server-side/com/vaadin/tests/server/SourceFileChecker.java index f02e5d2932..1ab742427d 100644 --- a/tests/server-side/com/vaadin/tests/server/SourceFileChecker.java +++ b/tests/server-side/com/vaadin/tests/server/SourceFileChecker.java @@ -188,7 +188,7 @@ public class SourceFileChecker extends TestCase { class GwtEntryChecker extends FileContentsValidator { // Matches e.g. - // @com.vaadin.terminal.gwt.client.HistoryImplIEVaadin::escapeHtml( + // @com.vaadin.client.HistoryImplIEVaadin::escapeHtml( private final Matcher matcher = Pattern.compile("@[\\w.]+::\\w+\\(") .matcher(""); diff --git a/tests/testbench/com/vaadin/tests/dd/MyDragSourceConnector.java b/tests/testbench/com/vaadin/tests/dd/MyDragSourceConnector.java index abc3f7f010..e787a182e4 100644 --- a/tests/testbench/com/vaadin/tests/dd/MyDragSourceConnector.java +++ b/tests/testbench/com/vaadin/tests/dd/MyDragSourceConnector.java @@ -15,11 +15,11 @@ */ package com.vaadin.tests.dd; +import com.vaadin.client.ApplicationConnection; +import com.vaadin.client.Paintable; +import com.vaadin.client.UIDL; +import com.vaadin.client.ui.AbstractComponentConnector; import com.vaadin.shared.ui.Connect; -import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.Paintable; -import com.vaadin.terminal.gwt.client.UIDL; -import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector; import com.vaadin.tests.dd.CustomDDImplementation.MyDragSource; @Connect(MyDragSource.class) diff --git a/tests/testbench/com/vaadin/tests/dd/MyDropTargetConnector.java b/tests/testbench/com/vaadin/tests/dd/MyDropTargetConnector.java index d70c788fa4..f0f2b5dfd6 100644 --- a/tests/testbench/com/vaadin/tests/dd/MyDropTargetConnector.java +++ b/tests/testbench/com/vaadin/tests/dd/MyDropTargetConnector.java @@ -15,11 +15,11 @@ */ package com.vaadin.tests.dd; +import com.vaadin.client.ApplicationConnection; +import com.vaadin.client.Paintable; +import com.vaadin.client.UIDL; +import com.vaadin.client.ui.AbstractComponentConnector; import com.vaadin.shared.ui.Connect; -import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.Paintable; -import com.vaadin.terminal.gwt.client.UIDL; -import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector; import com.vaadin.tests.dd.CustomDDImplementation.MyDropTarget; @Connect(MyDropTarget.class) diff --git a/tests/testbench/com/vaadin/tests/dd/VMyDragSource.java b/tests/testbench/com/vaadin/tests/dd/VMyDragSource.java index e6c7078e8e..8cca6d6459 100644 --- a/tests/testbench/com/vaadin/tests/dd/VMyDragSource.java +++ b/tests/testbench/com/vaadin/tests/dd/VMyDragSource.java @@ -11,8 +11,8 @@ import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.HTML; import com.google.gwt.user.client.ui.Widget; -import com.vaadin.terminal.gwt.client.ui.dd.VDragAndDropManager; -import com.vaadin.terminal.gwt.client.ui.dd.VTransferable; +import com.vaadin.client.ui.dd.VDragAndDropManager; +import com.vaadin.client.ui.dd.VTransferable; /** * Example code to implement Component that has something to drag. diff --git a/tests/testbench/com/vaadin/tests/dd/VMyDropTarget.java b/tests/testbench/com/vaadin/tests/dd/VMyDropTarget.java index 627f0554f6..58bd326524 100644 --- a/tests/testbench/com/vaadin/tests/dd/VMyDropTarget.java +++ b/tests/testbench/com/vaadin/tests/dd/VMyDropTarget.java @@ -1,11 +1,11 @@ package com.vaadin.tests.dd; import com.google.gwt.user.client.ui.Composite; -import com.vaadin.terminal.gwt.client.ApplicationConnection; -import com.vaadin.terminal.gwt.client.ComponentConnector; -import com.vaadin.terminal.gwt.client.ui.dd.VDragEvent; -import com.vaadin.terminal.gwt.client.ui.dd.VDropHandler; -import com.vaadin.terminal.gwt.client.ui.dd.VHasDropHandler; +import com.vaadin.client.ApplicationConnection; +import com.vaadin.client.ComponentConnector; +import com.vaadin.client.ui.dd.VDragEvent; +import com.vaadin.client.ui.dd.VDropHandler; +import com.vaadin.client.ui.dd.VHasDropHandler; public class VMyDropTarget extends Composite implements VHasDropHandler, VDropHandler { diff --git a/tests/testbench/com/vaadin/tests/minitutorials/v7a2/MyPickerConnector.java b/tests/testbench/com/vaadin/tests/minitutorials/v7a2/MyPickerConnector.java index 0608cc092e..0306555a5d 100644 --- a/tests/testbench/com/vaadin/tests/minitutorials/v7a2/MyPickerConnector.java +++ b/tests/testbench/com/vaadin/tests/minitutorials/v7a2/MyPickerConnector.java @@ -17,10 +17,10 @@ package com.vaadin.tests.minitutorials.v7a2; import com.google.gwt.user.client.Element; -import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector; -import com.vaadin.terminal.gwt.client.ui.SimpleManagedLayout; -import com.vaadin.terminal.gwt.client.ui.layout.ElementResizeEvent; -import com.vaadin.terminal.gwt.client.ui.layout.ElementResizeListener; +import com.vaadin.client.ui.AbstractComponentConnector; +import com.vaadin.client.ui.SimpleManagedLayout; +import com.vaadin.client.ui.layout.ElementResizeEvent; +import com.vaadin.client.ui.layout.ElementResizeListener; /** * Mini tutorial code for diff --git a/tests/testbench/com/vaadin/tests/widgetset/client/BasicExtensionTestConnector.java b/tests/testbench/com/vaadin/tests/widgetset/client/BasicExtensionTestConnector.java index a10d318991..9d28b52ae5 100644 --- a/tests/testbench/com/vaadin/tests/widgetset/client/BasicExtensionTestConnector.java +++ b/tests/testbench/com/vaadin/tests/widgetset/client/BasicExtensionTestConnector.java @@ -18,10 +18,10 @@ package com.vaadin.tests.widgetset.client; import com.google.gwt.dom.client.DivElement; import com.google.gwt.dom.client.Document; +import com.vaadin.client.ServerConnector; +import com.vaadin.client.Util; +import com.vaadin.client.extensions.AbstractExtensionConnector; import com.vaadin.shared.ui.Connect; -import com.vaadin.terminal.gwt.client.ServerConnector; -import com.vaadin.terminal.gwt.client.Util; -import com.vaadin.terminal.gwt.client.extensions.AbstractExtensionConnector; import com.vaadin.tests.extensions.BasicExtension; @Connect(BasicExtension.class) diff --git a/tests/testbench/com/vaadin/tests/widgetset/client/DelegateConnector.java b/tests/testbench/com/vaadin/tests/widgetset/client/DelegateConnector.java index c711be232f..c46a5aa007 100644 --- a/tests/testbench/com/vaadin/tests/widgetset/client/DelegateConnector.java +++ b/tests/testbench/com/vaadin/tests/widgetset/client/DelegateConnector.java @@ -16,8 +16,8 @@ package com.vaadin.tests.widgetset.client; +import com.vaadin.client.ui.AbstractComponentConnector; import com.vaadin.shared.ui.Connect; -import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector; import com.vaadin.tests.widgetset.server.DelegateToWidgetComponent; @Connect(DelegateToWidgetComponent.class) diff --git a/tests/testbench/com/vaadin/tests/widgetset/client/DummyLabelConnector.java b/tests/testbench/com/vaadin/tests/widgetset/client/DummyLabelConnector.java index bf3a472b33..601ec6db1f 100644 --- a/tests/testbench/com/vaadin/tests/widgetset/client/DummyLabelConnector.java +++ b/tests/testbench/com/vaadin/tests/widgetset/client/DummyLabelConnector.java @@ -16,10 +16,10 @@ package com.vaadin.tests.widgetset.client; +import com.vaadin.client.communication.StateChangeEvent; +import com.vaadin.client.ui.AbstractComponentConnector; +import com.vaadin.client.ui.label.VLabel; import com.vaadin.shared.ui.Connect; -import com.vaadin.terminal.gwt.client.communication.StateChangeEvent; -import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector; -import com.vaadin.terminal.gwt.client.ui.label.VLabel; import com.vaadin.tests.widgetset.server.DummyLabel; /** diff --git a/tests/testbench/com/vaadin/tests/widgetset/client/MissingFromDefaultWidgetsetConnector.java b/tests/testbench/com/vaadin/tests/widgetset/client/MissingFromDefaultWidgetsetConnector.java index 35c15aaef8..bc514047f9 100644 --- a/tests/testbench/com/vaadin/tests/widgetset/client/MissingFromDefaultWidgetsetConnector.java +++ b/tests/testbench/com/vaadin/tests/widgetset/client/MissingFromDefaultWidgetsetConnector.java @@ -15,9 +15,9 @@ */ package com.vaadin.tests.widgetset.client; +import com.vaadin.client.ui.AbstractComponentConnector; +import com.vaadin.client.ui.label.VLabel; import com.vaadin.shared.ui.Connect; -import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector; -import com.vaadin.terminal.gwt.client.ui.label.VLabel; import com.vaadin.tests.widgetset.server.MissingFromDefaultWidgetsetComponent; @Connect(MissingFromDefaultWidgetsetComponent.class) diff --git a/tests/testbench/com/vaadin/tests/widgetset/client/SerializerTestConnector.java b/tests/testbench/com/vaadin/tests/widgetset/client/SerializerTestConnector.java index 9fb6807bb7..7783178a3b 100644 --- a/tests/testbench/com/vaadin/tests/widgetset/client/SerializerTestConnector.java +++ b/tests/testbench/com/vaadin/tests/widgetset/client/SerializerTestConnector.java @@ -26,12 +26,12 @@ import java.util.Map; import java.util.Map.Entry; import java.util.Set; +import com.vaadin.client.communication.RpcProxy; +import com.vaadin.client.communication.StateChangeEvent; +import com.vaadin.client.extensions.AbstractExtensionConnector; import com.vaadin.shared.Connector; import com.vaadin.shared.ui.Connect; import com.vaadin.shared.ui.label.ContentMode; -import com.vaadin.terminal.gwt.client.communication.RpcProxy; -import com.vaadin.terminal.gwt.client.communication.StateChangeEvent; -import com.vaadin.terminal.gwt.client.extensions.AbstractExtensionConnector; import com.vaadin.tests.widgetset.server.SerializerTestExtension; @Connect(SerializerTestExtension.class) diff --git a/tests/testbench/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldExtensionConnector.java b/tests/testbench/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldExtensionConnector.java index 4a4d21cf4f..76dbdd5370 100644 --- a/tests/testbench/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldExtensionConnector.java +++ b/tests/testbench/com/vaadin/tests/widgetset/client/helloworldfeature/HelloWorldExtensionConnector.java @@ -16,12 +16,12 @@ package com.vaadin.tests.widgetset.client.helloworldfeature; import com.google.gwt.user.client.Window; +import com.vaadin.client.ServerConnector; +import com.vaadin.client.Util; +import com.vaadin.client.VConsole; +import com.vaadin.client.communication.RpcProxy; +import com.vaadin.client.extensions.AbstractExtensionConnector; import com.vaadin.shared.ui.Connect; -import com.vaadin.terminal.gwt.client.ServerConnector; -import com.vaadin.terminal.gwt.client.Util; -import com.vaadin.terminal.gwt.client.VConsole; -import com.vaadin.terminal.gwt.client.communication.RpcProxy; -import com.vaadin.terminal.gwt.client.extensions.AbstractExtensionConnector; import com.vaadin.tests.extensions.HelloWorldExtension; @Connect(HelloWorldExtension.class) diff --git a/tests/testbench/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ComponentInStateStateConnector.java b/tests/testbench/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ComponentInStateStateConnector.java index 9c0d454e19..35469e7501 100644 --- a/tests/testbench/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ComponentInStateStateConnector.java +++ b/tests/testbench/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ComponentInStateStateConnector.java @@ -17,10 +17,10 @@ package com.vaadin.tests.widgetset.client.minitutorials.v7a2; import com.google.gwt.user.client.ui.Label; +import com.vaadin.client.ComponentConnector; +import com.vaadin.client.communication.StateChangeEvent; +import com.vaadin.client.ui.AbstractComponentConnector; import com.vaadin.shared.ui.Connect; -import com.vaadin.terminal.gwt.client.ComponentConnector; -import com.vaadin.terminal.gwt.client.communication.StateChangeEvent; -import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector; import com.vaadin.tests.minitutorials.v7a2.ComponentInStateComponent; @Connect(ComponentInStateComponent.class) diff --git a/tests/testbench/com/vaadin/tests/widgetset/client/minitutorials/v7a2/MyComponentConnector.java b/tests/testbench/com/vaadin/tests/widgetset/client/minitutorials/v7a2/MyComponentConnector.java index 3a6aab617a..c80a4c88f0 100644 --- a/tests/testbench/com/vaadin/tests/widgetset/client/minitutorials/v7a2/MyComponentConnector.java +++ b/tests/testbench/com/vaadin/tests/widgetset/client/minitutorials/v7a2/MyComponentConnector.java @@ -3,12 +3,12 @@ package com.vaadin.tests.widgetset.client.minitutorials.v7a2; import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.event.dom.client.ClickHandler; import com.google.gwt.user.client.Window; +import com.vaadin.client.MouseEventDetailsBuilder; +import com.vaadin.client.communication.RpcProxy; +import com.vaadin.client.communication.StateChangeEvent; +import com.vaadin.client.ui.AbstractComponentConnector; import com.vaadin.shared.MouseEventDetails; import com.vaadin.shared.ui.Connect; -import com.vaadin.terminal.gwt.client.MouseEventDetailsBuilder; -import com.vaadin.terminal.gwt.client.communication.RpcProxy; -import com.vaadin.terminal.gwt.client.communication.StateChangeEvent; -import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector; import com.vaadin.tests.minitutorials.v7a2.MyComponent; @Connect(MyComponent.class) diff --git a/tests/testbench/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ResourceInStateConnector.java b/tests/testbench/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ResourceInStateConnector.java index 57579d3ec2..fa31267fd4 100644 --- a/tests/testbench/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ResourceInStateConnector.java +++ b/tests/testbench/com/vaadin/tests/widgetset/client/minitutorials/v7a2/ResourceInStateConnector.java @@ -17,10 +17,10 @@ package com.vaadin.tests.widgetset.client.minitutorials.v7a2; import com.google.gwt.user.client.ui.Image; +import com.vaadin.client.communication.StateChangeEvent; +import com.vaadin.client.ui.AbstractComponentConnector; import com.vaadin.shared.communication.URLReference; import com.vaadin.shared.ui.Connect; -import com.vaadin.terminal.gwt.client.communication.StateChangeEvent; -import com.vaadin.terminal.gwt.client.ui.AbstractComponentConnector; import com.vaadin.tests.minitutorials.v7a2.ResourceInStateComponent; @Connect(ResourceInStateComponent.class) diff --git a/tests/testbench/com/vaadin/tests/widgetset/client/minitutorials/v7a2/WidgetContainerConnector.java b/tests/testbench/com/vaadin/tests/widgetset/client/minitutorials/v7a2/WidgetContainerConnector.java index 7905de89f2..fc65f6b2ae 100644 --- a/tests/testbench/com/vaadin/tests/widgetset/client/minitutorials/v7a2/WidgetContainerConnector.java +++ b/tests/testbench/com/vaadin/tests/widgetset/client/minitutorials/v7a2/WidgetContainerConnector.java @@ -4,10 +4,10 @@ import java.util.List; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.ui.Widget; +import com.vaadin.client.ComponentConnector; +import com.vaadin.client.ConnectorHierarchyChangeEvent; +import com.vaadin.client.ui.AbstractComponentContainerConnector; import com.vaadin.shared.ui.Connect; -import com.vaadin.terminal.gwt.client.ComponentConnector; -import com.vaadin.terminal.gwt.client.ConnectorHierarchyChangeEvent; -import com.vaadin.terminal.gwt.client.ui.AbstractComponentContainerConnector; import com.vaadin.tests.minitutorials.v7a2.WidgetContainer; @Connect(WidgetContainer.class) -- cgit v1.2.3