myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfreed...@apache.org
Subject svn commit: r1160949 - in /myfaces/portlet-bridge/tck/trunk_2.0.x: portlet-bridge-tck-main/src/main/webapp/WEB-INF/ portlet-bridge-tck-main/src/main/webapp/tests/ src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_6/section_6_1_3_1/
Date Wed, 24 Aug 2011 01:00:01 GMT
Author: mfreedman
Date: Wed Aug 24 01:00:00 2011
New Revision: 1160949

URL: http://svn.apache.org/viewvc?rev=1160949&view=rev
Log:
PORTLETBRIDGE-220: Update NonFacesResourceTest to test conditions reported in PB-219

Added:
    myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/tests/NonFacesResourceTestStartPage.jsp
Modified:
    myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/faces-config.xml
    myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/portlet.xml
    myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_6/section_6_1_3_1/Tests.java

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/faces-config.xml?rev=1160949&r1=1160948&r2=1160949&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/faces-config.xml
(original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/faces-config.xml
Wed Aug 24 01:00:00 2011
@@ -336,6 +336,15 @@
       <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
     </navigation-case>
   </navigation-rule>
+  
+  
+    <navigation-rule>
+    <from-view-id>/tests/NonFacesResourceTestStartPage.jsp</from-view-id>
+    <navigation-case>
+      <from-outcome>nonFacesResourceTest</from-outcome>
+      <to-view-id>/tests/NonFacesResourceTest.jsp</to-view-id>
+    </navigation-case>
+  </navigation-rule>
 
  
   <navigation-rule>

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/portlet.xml?rev=1160949&r1=1160948&r2=1160949&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/portlet.xml
(original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/WEB-INF/portlet.xml
Wed Aug 24 01:00:00 2011
@@ -1574,7 +1574,7 @@
         
         <init-param>
           <name>javax.portlet.faces.defaultViewId.view</name>
-          <value>/tests/NonFacesResourceTest.jsp</value>
+          <value>/tests/NonFacesResourceTestStartPage.jsp</value>
         </init-param>
         
         <expiration-cache>0</expiration-cache>

Added: myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/tests/NonFacesResourceTestStartPage.jsp
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/tests/NonFacesResourceTestStartPage.jsp?rev=1160949&view=auto
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/tests/NonFacesResourceTestStartPage.jsp
(added)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/portlet-bridge-tck-main/src/main/webapp/tests/NonFacesResourceTestStartPage.jsp
Wed Aug 24 01:00:00 2011
@@ -0,0 +1,21 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<%@ page contentType="text/html;charset=UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+
+<f:view>
+  <html>
+    <head>
+      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
+      <title>JSR 301 Multi-Request TCK Test</title>
+    </head>
+    <body>
+      <h:form>
+        <h:panelGrid columns="1">
+          <h:commandButton value="Run Test" action="nonFacesResourceTest"/>
+        </h:panelGrid>
+      </h:form>
+    </body>
+  </html>
+</f:view>

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_6/section_6_1_3_1/Tests.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_6/section_6_1_3_1/Tests.java?rev=1160949&r1=1160948&r2=1160949&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_6/section_6_1_3_1/Tests.java
(original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_6/section_6_1_3_1/Tests.java
Wed Aug 24 01:00:00 2011
@@ -2422,7 +2422,9 @@ public class Tests
     FacesContext ctx = FacesContext.getCurrentInstance();
     ExternalContext extCtx = ctx.getExternalContext();
 
-    if (extCtx.encodeResourceURL(URL_TEST_STRING).equals(((PortletResponse) extCtx.getResponse()).encodeURL(URL_TEST_STRING).replace("&amp;",
"&")))
+    String testURL = extCtx.encodeResourceURL(URL_TEST_STRING);
+    String verifyURL = ((PortletResponse) extCtx.getResponse()).encodeURL(URL_TEST_STRING).replace("&amp;",
"&");
+    if (testURL.equals(verifyURL))
     {
       testRunner.setTestResult(true,
                                "encodeResourceURL correctly encoded the resource as an external
(App) resource.");
@@ -2431,7 +2433,8 @@ public class Tests
     else
     {
       testRunner.setTestResult(false,
-                               "encodeResourceURL incorrectly encoded a resource as if it
were a reference to a resource within this application.");
+                               "encodeResourceURL incorrectly encoded a resource as if it
were a reference to a resource within this application.  Generated: "
+                               + testURL + " but expected: " + verifyURL);
       return Constants.TEST_FAILED;
     }
   }



Mime
View raw message