summaryrefslogtreecommitdiffstats
path: root/uitest
diff options
context:
space:
mode:
authorJohn Ahlroos <john@vaadin.com>2012-09-05 09:00:30 +0300
committerJohn Ahlroos <john@vaadin.com>2012-09-05 09:00:30 +0300
commit025d8eae13bc3473b676ff1a534b28b5e812017d (patch)
treeddab820ea43cbef3fc0c25439a726fe8be5a9897 /uitest
parente75e0db87de2b6011fce4406b9924b991f88ce67 (diff)
parentc14171d1344f1360ae4a95cd9494ab2829d439d4 (diff)
downloadvaadin-framework-025d8eae13bc3473b676ff1a534b28b5e812017d.tar.gz
vaadin-framework-025d8eae13bc3473b676ff1a534b28b5e812017d.zip
Merge branch 'master' into layoutgraph
Diffstat (limited to 'uitest')
-rw-r--r--uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java24
-rw-r--r--uitest/src/com/vaadin/tests/Components.java4
-rw-r--r--uitest/src/com/vaadin/tests/components/table/CellStyleGeneratorTest.java3
-rw-r--r--uitest/src/com/vaadin/tests/components/table/Tables.java3
-rw-r--r--uitest/src/com/vaadin/tests/components/tree/ItemStyleGenerator.java2
-rw-r--r--uitest/src/com/vaadin/tests/components/tree/Trees.java4
-rw-r--r--uitest/src/com/vaadin/tests/components/treetable/TreeTableTest.java5
-rw-r--r--uitest/src/com/vaadin/tests/tickets/Ticket1857.java5
-rw-r--r--uitest/src/com/vaadin/tests/tickets/Ticket2125.java5
-rw-r--r--uitest/src/com/vaadin/tests/tickets/Ticket2208.java5
10 files changed, 37 insertions, 23 deletions
diff --git a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java
index bbe6e061fb..11685033a9 100644
--- a/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java
+++ b/uitest/src/com/vaadin/launcher/ApplicationRunnerServlet.java
@@ -21,6 +21,7 @@ import java.net.MalformedURLException;
import java.net.URL;
import java.util.Collections;
import java.util.LinkedHashSet;
+import java.util.Properties;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -30,8 +31,8 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.vaadin.Application;
-import com.vaadin.server.VaadinServlet;
import com.vaadin.server.AbstractUIProvider;
+import com.vaadin.server.VaadinServlet;
import com.vaadin.server.WrappedHttpServletRequest;
import com.vaadin.server.WrappedRequest;
import com.vaadin.tests.components.TestBase;
@@ -257,14 +258,21 @@ public class ApplicationRunnerServlet extends VaadinServlet {
}
@Override
- protected String getStaticFilesLocation(HttpServletRequest request) {
- URIS uris = getApplicationRunnerURIs(request);
- String staticFilesPath = uris.staticFilesPath;
- if (staticFilesPath.equals("/")) {
- staticFilesPath = "";
- }
+ protected ServletDeploymentConfiguration createDeploymentConfiguration(
+ Properties applicationProperties) {
+ return new ServletDeploymentConfiguration(this, applicationProperties) {
+ @Override
+ public String getStaticFileLocation(WrappedRequest request) {
+ URIS uris = getApplicationRunnerURIs(WrappedHttpServletRequest
+ .cast(request));
+ String staticFilesPath = uris.staticFilesPath;
+ if (staticFilesPath.equals("/")) {
+ staticFilesPath = "";
+ }
- return staticFilesPath;
+ return staticFilesPath;
+ }
+ };
}
@Override
diff --git a/uitest/src/com/vaadin/tests/Components.java b/uitest/src/com/vaadin/tests/Components.java
index 5882c5cdb1..7ac1b55d35 100644
--- a/uitest/src/com/vaadin/tests/Components.java
+++ b/uitest/src/com/vaadin/tests/Components.java
@@ -25,9 +25,9 @@ import com.vaadin.ui.ComponentContainer;
import com.vaadin.ui.Embedded;
import com.vaadin.ui.HorizontalSplitPanel;
import com.vaadin.ui.Label;
-import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.Tree;
import com.vaadin.ui.Tree.ItemStyleGenerator;
+import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.VerticalLayout;
public class Components extends Application.LegacyApplication {
@@ -138,7 +138,7 @@ public class Components extends Application.LegacyApplication {
naviTree.setItemStyleGenerator(new ItemStyleGenerator() {
@Override
- public String getStyle(Object itemId) {
+ public String getStyle(Tree source, Object itemId) {
Class<?> cls = (Class<?>) itemId;
if (!isAbstract(cls)) {
return "blue";
diff --git a/uitest/src/com/vaadin/tests/components/table/CellStyleGeneratorTest.java b/uitest/src/com/vaadin/tests/components/table/CellStyleGeneratorTest.java
index 35f35c1407..fb4bc5a045 100644
--- a/uitest/src/com/vaadin/tests/components/table/CellStyleGeneratorTest.java
+++ b/uitest/src/com/vaadin/tests/components/table/CellStyleGeneratorTest.java
@@ -17,7 +17,8 @@ public class CellStyleGeneratorTest extends TestBase {
CellStyleGenerator g = new CellStyleGenerator() {
@Override
- public String getStyle(Object itemId, Object propertyId) {
+ public String getStyle(Table source, Object itemId,
+ Object propertyId) {
if (propertyId != null && propertyId.equals("red")) {
return "red";
} else if (itemId.equals("blue") && propertyId == null) {
diff --git a/uitest/src/com/vaadin/tests/components/table/Tables.java b/uitest/src/com/vaadin/tests/components/table/Tables.java
index 1431155b1a..a08533fdbd 100644
--- a/uitest/src/com/vaadin/tests/components/table/Tables.java
+++ b/uitest/src/com/vaadin/tests/components/table/Tables.java
@@ -335,7 +335,8 @@ public class Tables<T extends Table> extends AbstractSelectTestCase<T>
c.setCellStyleGenerator(new CellStyleGenerator() {
@Override
- public String getStyle(Object itemId, Object propertyId) {
+ public String getStyle(Table source, Object itemId,
+ Object propertyId) {
if (cellStyleInfo.appliesTo(itemId, propertyId)) {
return cellStyleInfo.styleName;
}
diff --git a/uitest/src/com/vaadin/tests/components/tree/ItemStyleGenerator.java b/uitest/src/com/vaadin/tests/components/tree/ItemStyleGenerator.java
index 33bd4cef65..c561781d2b 100644
--- a/uitest/src/com/vaadin/tests/components/tree/ItemStyleGenerator.java
+++ b/uitest/src/com/vaadin/tests/components/tree/ItemStyleGenerator.java
@@ -33,7 +33,7 @@ public class ItemStyleGenerator extends TestBase {
tree.setItemStyleGenerator(new Tree.ItemStyleGenerator() {
@Override
- public String getStyle(Object itemId) {
+ public String getStyle(Tree source, Object itemId) {
// simple return itemId as css style name
return itemId.toString();
}
diff --git a/uitest/src/com/vaadin/tests/components/tree/Trees.java b/uitest/src/com/vaadin/tests/components/tree/Trees.java
index 3ee1d7b0de..8796fb854c 100644
--- a/uitest/src/com/vaadin/tests/components/tree/Trees.java
+++ b/uitest/src/com/vaadin/tests/components/tree/Trees.java
@@ -27,7 +27,7 @@ public class Trees extends AbstractSelectTestCase<Tree> implements
private ItemStyleGenerator rootGreenSecondLevelRed = new com.vaadin.ui.Tree.ItemStyleGenerator() {
@Override
- public String getStyle(Object itemId) {
+ public String getStyle(Tree source, Object itemId) {
Hierarchical c = (Container.Hierarchical) getComponent()
.getContainerDataSource();
if (c.isRoot(itemId)) {
@@ -52,7 +52,7 @@ public class Trees extends AbstractSelectTestCase<Tree> implements
private ItemStyleGenerator evenItemsBold = new com.vaadin.ui.Tree.ItemStyleGenerator() {
@Override
- public String getStyle(Object itemId) {
+ public String getStyle(Tree source, Object itemId) {
Hierarchical c = (Container.Hierarchical) getComponent()
.getContainerDataSource();
int idx = 0;
diff --git a/uitest/src/com/vaadin/tests/components/treetable/TreeTableTest.java b/uitest/src/com/vaadin/tests/components/treetable/TreeTableTest.java
index f27a47f12b..8fafdb2d26 100644
--- a/uitest/src/com/vaadin/tests/components/treetable/TreeTableTest.java
+++ b/uitest/src/com/vaadin/tests/components/treetable/TreeTableTest.java
@@ -9,6 +9,7 @@ import com.vaadin.data.Container;
import com.vaadin.data.Container.Hierarchical;
import com.vaadin.data.util.HierarchicalContainer;
import com.vaadin.tests.components.table.Tables;
+import com.vaadin.ui.Table;
import com.vaadin.ui.Table.CellStyleGenerator;
import com.vaadin.ui.Tree.CollapseEvent;
import com.vaadin.ui.Tree.CollapseListener;
@@ -28,7 +29,7 @@ public class TreeTableTest extends Tables<TreeTable> implements
private CellStyleGenerator rootGreenSecondLevelRed = new com.vaadin.ui.Table.CellStyleGenerator() {
@Override
- public String getStyle(Object itemId, Object propertyId) {
+ public String getStyle(Table source, Object itemId, Object propertyId) {
if (propertyId != null) {
return null;
}
@@ -56,7 +57,7 @@ public class TreeTableTest extends Tables<TreeTable> implements
private CellStyleGenerator evenItemsBold = new CellStyleGenerator() {
@Override
- public String getStyle(Object itemId, Object propertyId) {
+ public String getStyle(Table source, Object itemId, Object propertyId) {
if (propertyId != null) {
return null;
}
diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket1857.java b/uitest/src/com/vaadin/tests/tickets/Ticket1857.java
index 039f867fff..be0158e0fb 100644
--- a/uitest/src/com/vaadin/tests/tickets/Ticket1857.java
+++ b/uitest/src/com/vaadin/tests/tickets/Ticket1857.java
@@ -7,8 +7,8 @@ import com.vaadin.event.Action;
import com.vaadin.event.Action.Handler;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.HorizontalLayout;
-import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.Table;
+import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.VerticalLayout;
public class Ticket1857 extends Application.LegacyApplication implements
@@ -60,7 +60,8 @@ public class Ticket1857 extends Application.LegacyApplication implements
if (cellStylesEnabler.getValue().booleanValue()) {
t.setCellStyleGenerator(new Table.CellStyleGenerator() {
@Override
- public String getStyle(Object itemId, Object propertyId) {
+ public String getStyle(Table source, Object itemId,
+ Object propertyId) {
Object cell = t.getContainerProperty(itemId,
propertyId).getValue();
if (!(cell instanceof Integer)) {
diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket2125.java b/uitest/src/com/vaadin/tests/tickets/Ticket2125.java
index bc1f886418..defd7f4a22 100644
--- a/uitest/src/com/vaadin/tests/tickets/Ticket2125.java
+++ b/uitest/src/com/vaadin/tests/tickets/Ticket2125.java
@@ -5,10 +5,10 @@ import com.vaadin.data.util.MethodProperty;
import com.vaadin.ui.CheckBox;
import com.vaadin.ui.Component;
import com.vaadin.ui.Label;
-import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.Table;
import com.vaadin.ui.Table.CellStyleGenerator;
import com.vaadin.ui.Table.ColumnGenerator;
+import com.vaadin.ui.UI.LegacyWindow;
public class Ticket2125 extends Application.LegacyApplication {
@@ -42,7 +42,8 @@ public class Ticket2125 extends Application.LegacyApplication {
});
table.setCellStyleGenerator(new CellStyleGenerator() {
@Override
- public String getStyle(Object itemId, Object propertyId) {
+ public String getStyle(Table source, Object itemId,
+ Object propertyId) {
if (new Integer(4).equals(itemId)) {
if (propertyId == null) {
return "MYROW";
diff --git a/uitest/src/com/vaadin/tests/tickets/Ticket2208.java b/uitest/src/com/vaadin/tests/tickets/Ticket2208.java
index f622f093ee..98cd6724d4 100644
--- a/uitest/src/com/vaadin/tests/tickets/Ticket2208.java
+++ b/uitest/src/com/vaadin/tests/tickets/Ticket2208.java
@@ -4,10 +4,10 @@ import com.vaadin.Application;
import com.vaadin.data.Item;
import com.vaadin.ui.Component;
import com.vaadin.ui.Label;
-import com.vaadin.ui.UI.LegacyWindow;
import com.vaadin.ui.Table;
import com.vaadin.ui.Table.CellStyleGenerator;
import com.vaadin.ui.Table.ColumnGenerator;
+import com.vaadin.ui.UI.LegacyWindow;
public class Ticket2208 extends Application.LegacyApplication {
@@ -40,7 +40,8 @@ public class Ticket2208 extends Application.LegacyApplication {
t.setCellStyleGenerator(new CellStyleGenerator() {
@Override
- public String getStyle(Object itemId, Object propertyId) {
+ public String getStyle(Table source, Object itemId,
+ Object propertyId) {
if ("col 1 (red)".equals(propertyId)) {
return "red";
}