From 0dbafbce421afd8b1c4bb4c40bbb09a90d3a66e0 Mon Sep 17 00:00:00 2001 From: Leif Åstrand Date: Wed, 10 Oct 2012 10:25:37 +0300 Subject: Update test to use relative paths (#6771) Change-Id: I1360ea57c1d3396e3ef9d0fe803e3953dc8f70da --- ...tractApplicationServletStaticFilesLocation.java | 30 ++++++++++++++-------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'server/tests') 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); } -- cgit v1.2.3