From: Leif Åstrand Date: Wed, 10 Oct 2012 07:25:37 +0000 (+0300) Subject: Update test to use relative paths (#6771) X-Git-Tag: 7.0.0.beta6~61 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fchanges%2F01%2F101%2F1;p=vaadin-framework.git Update test to use relative paths (#6771) Change-Id: I1360ea57c1d3396e3ef9d0fe803e3953dc8f70da --- 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); }