summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2015-06-24 11:29:50 +0300
committerHenri Sara <hesara@vaadin.com>2015-07-04 14:28:55 +0300
commit70e91f4f165cc3b535b530754ecf728096ec70fc (patch)
tree322610d92dfb5a52680caa899edfadc538ceacb3 /uitest
parent7b3544dc0cdc2b12eb2337abc37c63b47a1b0470 (diff)
downloadvaadin-framework-70e91f4f165cc3b535b530754ecf728096ec70fc.tar.gz
vaadin-framework-70e91f4f165cc3b535b530754ecf728096ec70fc.zip
Reformat with Luna SR2
Change-Id: Id1f16b16cdf5712bf26e0f2dfc9c9ad651fe1144
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/tests/components/TouchDevicesTooltip.java8
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/GridSpacerDecoClipTest.java19
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/NullRenderers.java26
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/NullRenderersTest.java8
-rw-r--r--uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridClientCompositeKeyEventsTest.java3
-rw-r--r--uitest/src/com/vaadin/tests/components/menubar/MenuItemStyleRemovedTest.java3
-rw-r--r--uitest/src/com/vaadin/tests/components/notification/ChromeBottomNotification.java3
-rw-r--r--uitest/src/com/vaadin/tests/components/table/TableSetUndefinedSize.java93
-rw-r--r--uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClipped.java4
-rw-r--r--uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClippedTest.java39
-rw-r--r--uitest/src/com/vaadin/tests/components/window/MaximizedWindowOrder.java3
-rw-r--r--uitest/src/com/vaadin/tests/extensions/IframeIsOpenedInNonIOS.java13
-rw-r--r--uitest/src/com/vaadin/tests/extensions/IframeIsOpenedInNonIOSTest.java16
-rw-r--r--uitest/src/com/vaadin/tests/fieldgroup/Country.java1
-rw-r--r--uitest/src/com/vaadin/tests/serialization/EncodeResultDisplay.java3
-rw-r--r--uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java6
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/NotificationStyleTest.java7
-rw-r--r--uitest/src/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java3
18 files changed, 145 insertions, 113 deletions
diff --git a/uitest/src/com/vaadin/tests/components/TouchDevicesTooltip.java b/uitest/src/com/vaadin/tests/components/TouchDevicesTooltip.java
index ac4b48711e..764d5a49a3 100644
--- a/uitest/src/com/vaadin/tests/components/TouchDevicesTooltip.java
+++ b/uitest/src/com/vaadin/tests/components/TouchDevicesTooltip.java
@@ -26,17 +26,19 @@ public class TouchDevicesTooltip extends AbstractTestUI {
private void createTextField(int n) {
TextField textField = new TextField("Value" + n);
textField.setConverter(new StringToIntegerConverter());
- textField.addValidator(new IntegerRangeValidator(getErrorMessage(n), 0, 100));
+ textField.addValidator(new IntegerRangeValidator(getErrorMessage(n), 0,
+ 100));
textField.setImmediate(true);
textField.setValue("-5");
addComponent(textField);
}
private String getErrorMessage(int n) {
- if(n % 2 == 0) {
+ if (n % 2 == 0) {
return "incorrect value" + n;
} else {
- return "super long long long long long long long long long long long error message " + n;
+ return "super long long long long long long long long long long long error message "
+ + n;
}
}
diff --git a/uitest/src/com/vaadin/tests/components/grid/GridSpacerDecoClipTest.java b/uitest/src/com/vaadin/tests/components/grid/GridSpacerDecoClipTest.java
index c4db770ae1..c2cfe3cd7d 100644
--- a/uitest/src/com/vaadin/tests/components/grid/GridSpacerDecoClipTest.java
+++ b/uitest/src/com/vaadin/tests/components/grid/GridSpacerDecoClipTest.java
@@ -32,6 +32,7 @@ import org.openqa.selenium.SearchContext;
public class GridSpacerDecoClipTest extends MultiBrowserTest {
private static final String SPACER_CSS_CLASS_DECO = "v-grid-spacer-deco";
+
@Override
protected Class<?> getUIClass() {
return ShowingExtraDataForRows.class;
@@ -52,7 +53,8 @@ public class GridSpacerDecoClipTest extends MultiBrowserTest {
nearToBottomRow.doubleClick();
deco = getSpacerDeco(0);
System.out.println("Lower deco.clip = " + deco.getCssValue("clip"));
- Assert.assertNotEquals("Spacer deco clipping is not updated after opening another spacer",
+ Assert.assertNotEquals(
+ "Spacer deco clipping is not updated after opening another spacer",
"auto", deco.getCssValue("clip"));
}
@@ -63,28 +65,31 @@ public class GridSpacerDecoClipTest extends MultiBrowserTest {
GridElement gridElement = $(GridElement.class).first();
gridElement.scrollToRow(999);
GridElement.GridRowElement lastRow = gridElement.getRow(999);
- lastRow.doubleClick(); //Open lowest Row Details
+ lastRow.doubleClick(); // Open lowest Row Details
TestBenchElement deco = getSpacerDeco(0);
System.out.println("deco.rect = " + deco.getCssValue("clip"));
GridElement.GridRowElement nearToBottomRow = gridElement.getRow(993);
- nearToBottomRow.doubleClick(); //Open upper Row Details, lower Row Details goes out of visible range
+ nearToBottomRow.doubleClick(); // Open upper Row Details, lower Row
+ // Details goes out of visible range
Thread.sleep(500);
- nearToBottomRow.doubleClick(); //Close upper Row Details, lower Row Details goes back to visible range
+ nearToBottomRow.doubleClick(); // Close upper Row Details, lower Row
+ // Details goes back to visible range
deco = getSpacerDeco(0);
String clip = deco.getCssValue("clip");
System.out.println("deco.rect = " + clip);
- Assert.assertTrue("Part of lower Row Details is visible, its deco clip height should be positive, but it is negative",
+ Assert.assertTrue(
+ "Part of lower Row Details is visible, its deco clip height should be positive, but it is negative",
clip.indexOf('-') < 0);
}
private TestBenchElement getSpacerDeco(int index) {
SearchContext context = this.getContext();
- return (TestBenchElement) context.findElements(By.className(SPACER_CSS_CLASS_DECO)).get(index);
+ return (TestBenchElement) context.findElements(
+ By.className(SPACER_CSS_CLASS_DECO)).get(index);
}
}
-
diff --git a/uitest/src/com/vaadin/tests/components/grid/NullRenderers.java b/uitest/src/com/vaadin/tests/components/grid/NullRenderers.java
index 5ef5c12a7b..db86847690 100644
--- a/uitest/src/com/vaadin/tests/components/grid/NullRenderers.java
+++ b/uitest/src/com/vaadin/tests/components/grid/NullRenderers.java
@@ -62,13 +62,17 @@ public class NullRenderers extends AbstractTestUI {
gridDefaults.setSelectionMode(SelectionMode.NONE);
gridDefaults.setWidth("100%");
- gridDefaults.getColumn(TextRenderer.class).setRenderer(new TextRenderer("-- No Text --"));
- gridDefaults.getColumn(HtmlRenderer.class).setRenderer(new HtmlRenderer("-- No Jokes --"));
- gridDefaults.getColumn(DateRenderer.class).setRenderer(new DateRenderer("%s", Locale.getDefault(), "-- Never --"));
- gridDefaults.getColumn(NumberRenderer.class).setRenderer(new NumberRenderer("%s", Locale.getDefault(),"-- Nothing --"));
+ gridDefaults.getColumn(TextRenderer.class).setRenderer(
+ new TextRenderer("-- No Text --"));
+ gridDefaults.getColumn(HtmlRenderer.class).setRenderer(
+ new HtmlRenderer("-- No Jokes --"));
+ gridDefaults.getColumn(DateRenderer.class).setRenderer(
+ new DateRenderer("%s", Locale.getDefault(), "-- Never --"));
+ gridDefaults.getColumn(NumberRenderer.class).setRenderer(
+ new NumberRenderer("%s", Locale.getDefault(), "-- Nothing --"));
gridDefaults.getColumn(ProgressBarRenderer.class).setRenderer(
- new ProgressBarRenderer());
+ new ProgressBarRenderer());
gridDefaults.getColumn(ButtonRenderer.class).setRenderer(
new ButtonRenderer(new RendererClickListener() {
@@ -93,10 +97,14 @@ public class NullRenderers extends AbstractTestUI {
gridNoDefaults.setSelectionMode(SelectionMode.NONE);
gridNoDefaults.setWidth("100%");
- gridNoDefaults.getColumn(TextRenderer.class).setRenderer(new TextRenderer());
- gridNoDefaults.getColumn(HtmlRenderer.class).setRenderer(new HtmlRenderer());
- gridNoDefaults.getColumn(DateRenderer.class).setRenderer(new DateRenderer());
- gridNoDefaults.getColumn(NumberRenderer.class).setRenderer(new NumberRenderer());
+ gridNoDefaults.getColumn(TextRenderer.class).setRenderer(
+ new TextRenderer());
+ gridNoDefaults.getColumn(HtmlRenderer.class).setRenderer(
+ new HtmlRenderer());
+ gridNoDefaults.getColumn(DateRenderer.class).setRenderer(
+ new DateRenderer());
+ gridNoDefaults.getColumn(NumberRenderer.class).setRenderer(
+ new NumberRenderer());
gridNoDefaults.getColumn(ProgressBarRenderer.class).setRenderer(
new ProgressBarRenderer());
diff --git a/uitest/src/com/vaadin/tests/components/grid/NullRenderersTest.java b/uitest/src/com/vaadin/tests/components/grid/NullRenderersTest.java
index 4cc40e5769..f100c03d4f 100644
--- a/uitest/src/com/vaadin/tests/components/grid/NullRenderersTest.java
+++ b/uitest/src/com/vaadin/tests/components/grid/NullRenderersTest.java
@@ -32,11 +32,11 @@ public class NullRenderersTest extends MultiBrowserTest {
openTestURL();
GridElement grid = findGridWithDefaults();
- assertEquals("-- No Text --", grid.getCell(0, 0).getText());
+ assertEquals("-- No Text --", grid.getCell(0, 0).getText());
assertEquals("-- No Jokes --", grid.getCell(0, 1).getText());
- assertEquals("-- Never --", grid.getCell(0, 2).getText());
- assertEquals("-- Nothing --", grid.getCell(0, 3).getText());
- assertEquals("-- No Control --", grid.getCell(0, 5).getText());
+ assertEquals("-- Never --", grid.getCell(0, 2).getText());
+ assertEquals("-- Nothing --", grid.getCell(0, 3).getText());
+ assertEquals("-- No Control --", grid.getCell(0, 5).getText());
}
@Test
diff --git a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridClientCompositeKeyEventsTest.java b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridClientCompositeKeyEventsTest.java
index a09a31830f..fada87b15d 100644
--- a/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridClientCompositeKeyEventsTest.java
+++ b/uitest/src/com/vaadin/tests/components/grid/basicfeatures/client/GridClientCompositeKeyEventsTest.java
@@ -2,8 +2,7 @@ package com.vaadin.tests.components.grid.basicfeatures.client;
import org.junit.Before;
-public class GridClientCompositeKeyEventsTest extends
- GridClientKeyEventsTest {
+public class GridClientCompositeKeyEventsTest extends GridClientKeyEventsTest {
@Before
public void setUp() {
diff --git a/uitest/src/com/vaadin/tests/components/menubar/MenuItemStyleRemovedTest.java b/uitest/src/com/vaadin/tests/components/menubar/MenuItemStyleRemovedTest.java
index 2ba63587fe..e25aa664cd 100644
--- a/uitest/src/com/vaadin/tests/components/menubar/MenuItemStyleRemovedTest.java
+++ b/uitest/src/com/vaadin/tests/components/menubar/MenuItemStyleRemovedTest.java
@@ -19,7 +19,8 @@ public class MenuItemStyleRemovedTest extends MultiBrowserTest {
$(ButtonElement.class).caption("Add styles").first().click();
MenuBarElement menu = $(MenuBarElement.class).first();
- List<WebElement> elements = menu.findElements(By.className("custom-menu-item"));
+ List<WebElement> elements = menu.findElements(By
+ .className("custom-menu-item"));
Assert.assertEquals(2, elements.size());
menu.clickItem("first");
diff --git a/uitest/src/com/vaadin/tests/components/notification/ChromeBottomNotification.java b/uitest/src/com/vaadin/tests/components/notification/ChromeBottomNotification.java
index 0fdc8df360..df1e0048be 100644
--- a/uitest/src/com/vaadin/tests/components/notification/ChromeBottomNotification.java
+++ b/uitest/src/com/vaadin/tests/components/notification/ChromeBottomNotification.java
@@ -12,8 +12,7 @@ public class ChromeBottomNotification extends AbstractTestUI {
addButton("Show notification", new Button.ClickListener() {
@Override
public void buttonClick(Button.ClickEvent event) {
- Notification notification = new Notification(
- "Hello world",
+ Notification notification = new Notification("Hello world",
Notification.Type.ERROR_MESSAGE);
notification.setPosition(Position.BOTTOM_CENTER);
notification.show(getPage());
diff --git a/uitest/src/com/vaadin/tests/components/table/TableSetUndefinedSize.java b/uitest/src/com/vaadin/tests/components/table/TableSetUndefinedSize.java
index 3b5ee875e9..e355c0d0ea 100644
--- a/uitest/src/com/vaadin/tests/components/table/TableSetUndefinedSize.java
+++ b/uitest/src/com/vaadin/tests/components/table/TableSetUndefinedSize.java
@@ -36,24 +36,27 @@ public class TableSetUndefinedSize extends AbstractTestUI {
private HorizontalLayout createWidthButtons(final Table table) {
HorizontalLayout layout = new HorizontalLayout();
- layout.addComponent(new Button("width 500px", new Button.ClickListener() {
- @Override
- public void buttonClick(Button.ClickEvent event) {
- table.setWidth("500px");
- }
- }));
- layout.addComponent(new Button("width 100%", new Button.ClickListener() {
- @Override
- public void buttonClick(Button.ClickEvent event) {
- table.setWidth("100%");
- }
- }));
- layout.addComponent(new Button("undefined width", new Button.ClickListener() {
- @Override
- public void buttonClick(Button.ClickEvent event) {
- table.setWidthUndefined();
- }
- }));
+ layout.addComponent(new Button("width 500px",
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(Button.ClickEvent event) {
+ table.setWidth("500px");
+ }
+ }));
+ layout.addComponent(new Button("width 100%",
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(Button.ClickEvent event) {
+ table.setWidth("100%");
+ }
+ }));
+ layout.addComponent(new Button("undefined width",
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(Button.ClickEvent event) {
+ table.setWidthUndefined();
+ }
+ }));
return layout;
}
@@ -61,30 +64,34 @@ public class TableSetUndefinedSize extends AbstractTestUI {
private HorizontalLayout createHeigthButtons(final Table table) {
HorizontalLayout layout = new HorizontalLayout();
- layout.addComponent(new Button("height 200px", new Button.ClickListener() {
- @Override
- public void buttonClick(Button.ClickEvent event) {
- table.setHeight("200px");
- }
- }));
- layout.addComponent(new Button("height 300px", new Button.ClickListener() {
- @Override
- public void buttonClick(Button.ClickEvent event) {
- table.setHeight("300px");
- }
- }));
- layout.addComponent(new Button("height 100%", new Button.ClickListener() {
- @Override
- public void buttonClick(Button.ClickEvent event) {
- table.setHeight("100%");
- }
- }));
- layout.addComponent(new Button("undefined height", new Button.ClickListener() {
- @Override
- public void buttonClick(Button.ClickEvent event) {
- table.setHeightUndefined();
- }
- }));
+ layout.addComponent(new Button("height 200px",
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(Button.ClickEvent event) {
+ table.setHeight("200px");
+ }
+ }));
+ layout.addComponent(new Button("height 300px",
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(Button.ClickEvent event) {
+ table.setHeight("300px");
+ }
+ }));
+ layout.addComponent(new Button("height 100%",
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(Button.ClickEvent event) {
+ table.setHeight("100%");
+ }
+ }));
+ layout.addComponent(new Button("undefined height",
+ new Button.ClickListener() {
+ @Override
+ public void buttonClick(Button.ClickEvent event) {
+ table.setHeightUndefined();
+ }
+ }));
return layout;
}
@@ -96,7 +103,7 @@ public class TableSetUndefinedSize extends AbstractTestUI {
table.addContainerProperty("column 2", String.class, "column 2 value");
table.addContainerProperty("column 3", String.class, "column 3 value");
- for(int i=0; i<5; i++) {
+ for (int i = 0; i < 5; i++) {
table.addItem();
}
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClipped.java b/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClipped.java
index 6d66f1d295..969e76691e 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClipped.java
+++ b/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClipped.java
@@ -93,8 +93,8 @@ public class FirstTabNotVisibleWhenTabsheetNotClipped extends AbstractTestUI {
addComponent(layout);
}
- private Button.ClickListener createTabListener(final HashMap<String, TabSheet.Tab> map,
- final TabSheet tabsheet) {
+ private Button.ClickListener createTabListener(
+ final HashMap<String, TabSheet.Tab> map, final TabSheet tabsheet) {
Button.ClickListener clickListener = new Button.ClickListener() {
diff --git a/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClippedTest.java b/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClippedTest.java
index 74a725f5ed..4d72f3e6fb 100644
--- a/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClippedTest.java
+++ b/uitest/src/com/vaadin/tests/components/tabsheet/FirstTabNotVisibleWhenTabsheetNotClippedTest.java
@@ -8,29 +8,32 @@ import org.junit.Assert;
import org.junit.Test;
import org.openqa.selenium.WebElement;
-public class FirstTabNotVisibleWhenTabsheetNotClippedTest extends MultiBrowserTest {
+public class FirstTabNotVisibleWhenTabsheetNotClippedTest extends
+ MultiBrowserTest {
@Test
public void testNotClippedTabIsVisible() throws InterruptedException {
openTestURL();
- ButtonElement toggleNotClipped = $(ButtonElement.class)
- .caption("Toggle first not clipped tab").first();
+ ButtonElement toggleNotClipped = $(ButtonElement.class).caption(
+ "Toggle first not clipped tab").first();
toggleNotClipped.click();
TabSheetElement notClippedTabSheet = $(TabSheetElement.class).get(0);
- WebElement firstTab = notClippedTabSheet.findElement(
- By.className("v-tabsheet-tabitemcell-first"));
- String caption = firstTab.findElement(By.className("v-captiontext")).getText();
- Assert.assertEquals("Tab with -first style should be Tab 1", "Tab 1", caption);
+ WebElement firstTab = notClippedTabSheet.findElement(By
+ .className("v-tabsheet-tabitemcell-first"));
+ String caption = firstTab.findElement(By.className("v-captiontext"))
+ .getText();
+ Assert.assertEquals("Tab with -first style should be Tab 1", "Tab 1",
+ caption);
toggleNotClipped.click();
- firstTab = notClippedTabSheet.findElement(
- By.className("v-tabsheet-tabitemcell-first"));
+ firstTab = notClippedTabSheet.findElement(By
+ .className("v-tabsheet-tabitemcell-first"));
caption = firstTab.findElement(By.className("v-captiontext")).getText();
- Assert.assertEquals("Tab with -first style should be Tab 0", "Tab 0", caption);
+ Assert.assertEquals("Tab with -first style should be Tab 0", "Tab 0",
+ caption);
}
-
@Test
public void testShowPreviouslyHiddenTab() {
openTestURL();
@@ -38,18 +41,20 @@ public class FirstTabNotVisibleWhenTabsheetNotClippedTest extends MultiBrowserTe
$(ButtonElement.class).caption("show tab D").get(0).click();
$(ButtonElement.class).caption("show tab C").get(0).click();
- WebElement firstTab = $(TabSheetElement.class).get(2)
- .findElement(By.className("v-tabsheet-tabitemcell-first"));
- String firstCaption = firstTab.findElement(By.className("v-captiontext")).getText();
+ WebElement firstTab = $(TabSheetElement.class).get(2).findElement(
+ By.className("v-tabsheet-tabitemcell-first"));
+ String firstCaption = firstTab.findElement(
+ By.className("v-captiontext")).getText();
org.junit.Assert.assertEquals("tab C", firstCaption);
$(ButtonElement.class).caption("show tab D").get(1).click();
$(ButtonElement.class).caption("show tab C").get(1).click();
- WebElement secondTab = $(TabSheetElement.class).get(3)
- .findElement(By.className("v-tabsheet-tabitemcell-first"));
- String secondCaption = secondTab.findElement(By.className("v-captiontext")).getText();
+ WebElement secondTab = $(TabSheetElement.class).get(3).findElement(
+ By.className("v-tabsheet-tabitemcell-first"));
+ String secondCaption = secondTab.findElement(
+ By.className("v-captiontext")).getText();
org.junit.Assert.assertEquals("tab C", secondCaption);
}
diff --git a/uitest/src/com/vaadin/tests/components/window/MaximizedWindowOrder.java b/uitest/src/com/vaadin/tests/components/window/MaximizedWindowOrder.java
index 8fe6c0ce5a..7da1517e8f 100644
--- a/uitest/src/com/vaadin/tests/components/window/MaximizedWindowOrder.java
+++ b/uitest/src/com/vaadin/tests/components/window/MaximizedWindowOrder.java
@@ -42,7 +42,8 @@ public class MaximizedWindowOrder extends AbstractTestUI {
layout.addComponent(button);
window.setContent(layout);
- window.setWindowMode(maximized ? WindowMode.MAXIMIZED : WindowMode.NORMAL);
+ window.setWindowMode(maximized ? WindowMode.MAXIMIZED
+ : WindowMode.NORMAL);
addWindow(window);
}
diff --git a/uitest/src/com/vaadin/tests/extensions/IframeIsOpenedInNonIOS.java b/uitest/src/com/vaadin/tests/extensions/IframeIsOpenedInNonIOS.java
index a62b6bba88..d1b2e12e42 100644
--- a/uitest/src/com/vaadin/tests/extensions/IframeIsOpenedInNonIOS.java
+++ b/uitest/src/com/vaadin/tests/extensions/IframeIsOpenedInNonIOS.java
@@ -18,12 +18,13 @@ public class IframeIsOpenedInNonIOS extends AbstractTestUI {
protected void setup(VaadinRequest request) {
final Label errorLabel = new Label("No error");
Button button = new Button("Download");
- FileDownloader downloader = new FileDownloader(new StreamResource(new StreamResource.StreamSource() {
- @Override
- public InputStream getStream () {
- return createSomeFile();
- }
- }, FILE_NAME));
+ FileDownloader downloader = new FileDownloader(new StreamResource(
+ new StreamResource.StreamSource() {
+ @Override
+ public InputStream getStream() {
+ return createSomeFile();
+ }
+ }, FILE_NAME));
downloader.extend(button);
addComponents(errorLabel, button);
diff --git a/uitest/src/com/vaadin/tests/extensions/IframeIsOpenedInNonIOSTest.java b/uitest/src/com/vaadin/tests/extensions/IframeIsOpenedInNonIOSTest.java
index c544b495ab..e5614b60a4 100644
--- a/uitest/src/com/vaadin/tests/extensions/IframeIsOpenedInNonIOSTest.java
+++ b/uitest/src/com/vaadin/tests/extensions/IframeIsOpenedInNonIOSTest.java
@@ -21,19 +21,23 @@ public class IframeIsOpenedInNonIOSTest extends MultiBrowserTest {
List<WebElement> iframes = driver.findElements(By.tagName("iframe"));
boolean containsFileIframe = false;
for (WebElement iframe : iframes) {
- containsFileIframe = containsFileIframe |
- iframe.getAttribute("src").contains(IframeIsOpenedInNonIOS.FILE_NAME);
+ containsFileIframe = containsFileIframe
+ | iframe.getAttribute("src").contains(
+ IframeIsOpenedInNonIOS.FILE_NAME);
}
- Assert.assertTrue("page doesn't contain iframe with the file", containsFileIframe);
+ Assert.assertTrue("page doesn't contain iframe with the file",
+ containsFileIframe);
}
@Override
public List<DesiredCapabilities> getBrowsersToTest() {
- //once running ios is possible, this test should be fixed to exclude it from the browsers list
+ // once running ios is possible, this test should be fixed to exclude it
+ // from the browsers list
- //The test is failing in all IEs for some reason even though the iframe is in place.
- //Probably related to some IE driver issue
+ // The test is failing in all IEs for some reason even though the iframe
+ // is in place.
+ // Probably related to some IE driver issue
return getBrowsersExcludingIE();
}
}
diff --git a/uitest/src/com/vaadin/tests/fieldgroup/Country.java b/uitest/src/com/vaadin/tests/fieldgroup/Country.java
index 4956f0a085..2c2ffd7160 100644
--- a/uitest/src/com/vaadin/tests/fieldgroup/Country.java
+++ b/uitest/src/com/vaadin/tests/fieldgroup/Country.java
@@ -15,7 +15,6 @@
*/
package com.vaadin.tests.fieldgroup;
-
public enum Country {
FINLAND, SWEDEN, NORWAY, DENMARK, ICELAND, USA, RUSSIA, ESTONIA;
diff --git a/uitest/src/com/vaadin/tests/serialization/EncodeResultDisplay.java b/uitest/src/com/vaadin/tests/serialization/EncodeResultDisplay.java
index d67b01c71c..01d1b14243 100644
--- a/uitest/src/com/vaadin/tests/serialization/EncodeResultDisplay.java
+++ b/uitest/src/com/vaadin/tests/serialization/EncodeResultDisplay.java
@@ -27,7 +27,8 @@ import com.vaadin.tests.widgetset.client.EncoderResultDisplayConnector.ReportRpc
public class EncodeResultDisplay extends AbstractTestUIWithLog {
public static class EncoderResultDisplayExtension extends AbstractExtension {
- public EncoderResultDisplayExtension(EncoderResultDisplayConnector.ReportRpc rpc) {
+ public EncoderResultDisplayExtension(
+ EncoderResultDisplayConnector.ReportRpc rpc) {
registerRpc(rpc);
}
diff --git a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java
index b166590c43..678b38c4f1 100644
--- a/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java
+++ b/uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java
@@ -97,8 +97,10 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration {
desiredCapabilities.setCapability("project", "Vaadin Framework");
desiredCapabilities.setCapability("build", String.format("%s / %s",
getDeploymentHostname(), Calendar.getInstance().getTime()));
- desiredCapabilities.setCapability("name", String.format("%s.%s",
- getClass().getCanonicalName(), testName.getMethodName()));
+ desiredCapabilities.setCapability(
+ "name",
+ String.format("%s.%s", getClass().getCanonicalName(),
+ testName.getMethodName()));
super.setDesiredCapabilities(desiredCapabilities);
}
diff --git a/uitest/src/com/vaadin/tests/themes/valo/NotificationStyleTest.java b/uitest/src/com/vaadin/tests/themes/valo/NotificationStyleTest.java
index b2db29443a..7adae9ce65 100644
--- a/uitest/src/com/vaadin/tests/themes/valo/NotificationStyleTest.java
+++ b/uitest/src/com/vaadin/tests/themes/valo/NotificationStyleTest.java
@@ -66,11 +66,10 @@ public class NotificationStyleTest extends MultiBrowserTest {
WebElement description = notification.findElement(By
.className("v-Notification-description"));
String display = description.getCssValue("display");
- String displayP2 = notification.findElement(
- By.className("tested-p")).getCssValue("display");
+ String displayP2 = notification.findElement(By.className("tested-p"))
+ .getCssValue("display");
Assert.assertNotEquals("Styles for notification defined 'p' tag "
- + "and custom HTML tag are the same", display,
- displayP2);
+ + "and custom HTML tag are the same", display, displayP2);
}
private ExpectedCondition<Boolean> notificationPresentCondition() {
diff --git a/uitest/src/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java b/uitest/src/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java
index 12c2443c01..aa1d7d60a4 100644
--- a/uitest/src/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java
+++ b/uitest/src/com/vaadin/tests/widgetset/client/grid/GridBasicClientFeaturesWidget.java
@@ -534,8 +534,7 @@ public class GridBasicClientFeaturesWidget extends
public void onContextMenu(ContextMenuEvent event) {
event.preventDefault();
final String location;
- EventCellReference<?> cellRef = grid
- .getEventCell();
+ EventCellReference<?> cellRef = grid.getEventCell();
if (cellRef.isHeader()) {
location = "header";
} else if (cellRef.isBody()) {