]> source.dussan.org Git - vaadin-framework.git/commitdiff
Update test to use relative paths (#6771) 01/101/1
authorLeif Åstrand <leif@vaadin.com>
Wed, 10 Oct 2012 07:25:37 +0000 (10:25 +0300)
committerLeif Åstrand <leif@vaadin.com>
Wed, 10 Oct 2012 07:25:37 +0000 (10:25 +0300)
Change-Id: I1360ea57c1d3396e3ef9d0fe803e3953dc8f70da

server/tests/src/com/vaadin/server/TestAbstractApplicationServletStaticFilesLocation.java

index 533bcc8422c58b8a23b2f486ea1fe6fca2f20ece..cd646223929ba71182316a5938fbbc1e830571ce 100644 (file)
@@ -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);
 
     }