aboutsummaryrefslogtreecommitdiffstats
path: root/server/tests
diff options
context:
space:
mode:
authorLeif Åstrand <leif@vaadin.com>2012-10-10 10:25:37 +0300
committerLeif Åstrand <leif@vaadin.com>2012-10-10 10:25:37 +0300
commit0dbafbce421afd8b1c4bb4c40bbb09a90d3a66e0 (patch)
tree2b4f4f0479b959e01a71782a4d7c70761cf008ab /server/tests
parentcf5b631f2568c663470a7f52b9d0dc4762860205 (diff)
downloadvaadin-framework-0dbafbce421afd8b1c4bb4c40bbb09a90d3a66e0.tar.gz
vaadin-framework-0dbafbce421afd8b1c4bb4c40bbb09a90d3a66e0.zip
Update test to use relative paths (#6771)
Change-Id: I1360ea57c1d3396e3ef9d0fe803e3953dc8f70da
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java30
1 files changed, 19 insertions, 11 deletions
diff --git a/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java b/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java
index 533bcc8422..cd64622392 100644
--- a/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java
+++ b/server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java
@@ -41,32 +41,40 @@ public class TestAbstractApplicationServletStaticFilesLocation extends TestCase
/* SERVLETS */
// http://dummy.host:8080/contextpath/servlet
- // should return /contextpath
+ // should return . (relative url resolving to /contextpath)
location = testLocation("http://dummy.host:8080", "/contextpath",
"/servlet", "");
- assertEquals("/contextpath", location);
+ assertEquals(".", location);
+
+ // http://dummy.host:8080/contextpath/servlet/
+ // should return ./.. (relative url resolving to /contextpath)
+ location = testLocation("http://dummy.host:8080", "/contextpath",
+ "/servlet", "/");
+ assertEquals("./..", location);
// http://dummy.host:8080/servlet
- // should return ""
+ // should return "."
location = testLocation("http://dummy.host:8080", "", "/servlet", "");
- assertEquals("", location);
+ assertEquals(".", location);
// http://dummy.host/contextpath/servlet/extra/stuff
- // should return /contextpath
+ // should return ./../.. (relative url resolving to /contextpath)
location = testLocation("http://dummy.host", "/contextpath",
"/servlet", "/extra/stuff");
- assertEquals("/contextpath", location);
+ assertEquals("./../..", location);
// http://dummy.host/context/path/servlet/extra/stuff
- // should return /context/path
+ // should return ./../.. (relative url resolving to /context/path)
location = testLocation("http://dummy.host", "/context/path",
"/servlet", "/extra/stuff");
- assertEquals("/context/path", location);
+ assertEquals("./../..", location);
/* Include requests */
- location = testIncludedLocation("http://my.portlet.server", "/user",
- "/tmpservletlocation1", "");
- assertEquals("Wrong widgetset location", "/user", location);
+ // Include request support dropped with support for portlet1
+ // Might reconsider when JSP integration support is implemented
+ // location = testIncludedLocation("http://my.portlet.server", "/user",
+ // "/tmpservletlocation1", "");
+ // assertEquals("Wrong widgetset location", "/user", location);
}