You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by mf...@apache.org on 2010/11/17 23:12:27 UTC

svn commit: r1036252 [3/3] - in /myfaces/portlet-bridge/tck/trunk_2.0.x: ./ src/main/java/org/apache/myfaces/portlet/faces/testsuite/beans/ src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_6/section_6_1_3_1/ src/test/java/org/apac...

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/pom.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/pom.xml?rev=1036252&r1=1036251&r2=1036252&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/pom.xml (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/pom.xml Wed Nov 17 22:12:26 2010
@@ -20,7 +20,7 @@
   <parent>
     <artifactId>portlet-bridge-master-pom</artifactId>
     <groupId>org.apache.myfaces.portlet-bridge</groupId>
-    <version>3</version>
+    <version>4</version>
   </parent>
 
   <properties>
@@ -511,7 +511,24 @@
       
       <properties>
         <maven.test.skip>true</maven.test.skip>
-      </properties>      
+      </properties>
+
+      <dependencies>
+
+      <dependency>
+        <groupId>${trinidad.groupId}</groupId>
+        <artifactId>${trinidad.api.artifactId}</artifactId>
+        <version>${trinidad.version}</version>
+	  <scope>runtime</scope>
+      </dependency>
+
+      <dependency>
+        <groupId>${trinidad.groupId}</groupId>
+        <artifactId>${trinidad.impl.artifactId}</artifactId>
+        <version>${trinidad.version}</version>
+	  <scope>runtime</scope>
+      </dependency>
+      </dependencies>      
       
     </profile>
     

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/beans/NonJSFViewBean.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/beans/NonJSFViewBean.java?rev=1036252&r1=1036251&r2=1036252&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/beans/NonJSFViewBean.java (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/src/main/java/org/apache/myfaces/portlet/faces/testsuite/beans/NonJSFViewBean.java Wed Nov 17 22:12:26 2010
@@ -40,36 +40,34 @@ public class NonJSFViewBean
     FacesContext ctx = FacesContext.getCurrentInstance();
     ExternalContext extCtx = ctx.getExternalContext();
     
-    // As we are expecting a renderURL to be generated we need to set a (session) flag that indicates the url
-    // has been (is) being rendered
-    extCtx.getSessionMap().put("org.apache.myfaces.portlet.faces.tck.nonJSFURLRendered", Boolean.TRUE);
     
     Map<String, Object> m = extCtx.getRequestMap();
     String testName = (String) m.get(Constants.TEST_NAME);
     
+    
     if (testName.equals("encodeActionURLNonJSFViewRenderTest") || testName.equals("encodeActionURLNonJSFViewResourceTest"))
     {
-      return "/NonFacesViewTestPortlet.ptlt?javax.portlet.faces.ViewLink=true";
+      return "/NonFacesViewTestPortlet.ptlt?javax.portlet.faces.ViewLink=true&amp;invokeTest=true";
     }
     else if (testName.equals("encodeActionURLNonJSFViewWithParamRenderTest") || testName.equals("encodeActionURLNonJSFViewWithParamResourceTest"))
     {
-      return "/NonFacesViewTestPortlet.ptlt?javax.portlet.faces.ViewLink=true&amp;param1=testValue";
+      return "/NonFacesViewTestPortlet.ptlt?javax.portlet.faces.ViewLink=true&amp;invokeTest=true&amp;param1=testValue";
     }
     else if (testName.equals("encodeActionURLNonJSFViewWithModeRenderTest") || testName.equals("encodeActionURLNonJSFViewWithModeResourceTest"))
     {
-      return "/NonFacesViewTestPortlet.ptlt?javax.portlet.faces.ViewLink=true&amp;javax.portlet.faces.PortletMode=edit&amp;param1=testValue";
+      return "/NonFacesViewTestPortlet.ptlt?javax.portlet.faces.ViewLink=true&amp;invokeTest=true&amp;javax.portlet.faces.PortletMode=edit&amp;param1=testValue";
     }
     else if (testName.equals("encodeActionURLNonJSFViewWithInvalidModeRenderTest") || testName.equals("encodeActionURLNonJSFViewWithInvalidModeResourceTest"))
     {
-      return "/NonFacesViewTestPortlet.ptlt?javax.portlet.faces.ViewLink=true&amp;javax.portlet.faces.PortletMode=blue&amp;param1=testValue";
+      return "/NonFacesViewTestPortlet.ptlt?javax.portlet.faces.ViewLink=true&amp;invokeTest=true&amp;javax.portlet.faces.PortletMode=blue&amp;param1=testValue";
     }
     else if (testName.equals("encodeActionURLNonJSFViewWithWindowStateRenderTest") || testName.equals("encodeActionURLNonJSFViewWithWindowStateResourceTest"))
     {
-      return "/NonFacesViewTestPortlet.ptlt?javax.portlet.faces.ViewLink=true&amp;javax.portlet.faces.WindowState=maximized&amp;param1=testValue";
+      return "/NonFacesViewTestPortlet.ptlt?javax.portlet.faces.ViewLink=true&amp;invokeTest=true&amp;javax.portlet.faces.WindowState=maximized&amp;param1=testValue";
     }
     else if (testName.equals("encodeActionURLNonJSFViewWithInvalidWindowStateRenderTest") || testName.equals("encodeActionURLNonJSFViewWithInvalidWindowStateResourceTest"))
     {
-      return "/NonFacesViewTestPortlet.ptlt?javax.portlet.faces.ViewLink=true&amp;javax.portlet.faces.WindowState=blue&amp;param1=testValue";
+      return "/NonFacesViewTestPortlet.ptlt?javax.portlet.faces.ViewLink=true&amp;invokeTest=true&amp;javax.portlet.faces.WindowState=blue&amp;param1=testValue";
     }
 
     return null;

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/NonFacesViewTestPortlet.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/NonFacesViewTestPortlet.java?rev=1036252&r1=1036251&r2=1036252&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/NonFacesViewTestPortlet.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/NonFacesViewTestPortlet.java Wed Nov 17 22:12:26 2010
@@ -26,6 +26,7 @@ import java.io.PrintWriter;
 import javax.portlet.ActionRequest;
 import javax.portlet.ActionResponse;
 import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
 import javax.portlet.PortletException;
 import javax.portlet.PortletMode;
 import javax.portlet.PortletRequest;
@@ -179,20 +180,15 @@ public class NonFacesViewTestPortlet
                          RenderResponse renderResponse)
     throws PortletException, IOException
   {
-    PortletSession s = renderRequest.getPortletSession(true);
-    Boolean rendered = (Boolean) s.getAttribute("org.apache.myfaces.portlet.faces.tck.nonJSFURLRendered");
-    
-    
-    if (rendered == null)
+    String invokeTest = (String) renderRequest.getParameter("invokeTest");
+        
+    if (invokeTest == null)
     {
-      
       super.doDispatch(renderRequest, renderResponse);
       return;
     }
     else 
-    {
-      s.removeAttribute("org.apache.myfaces.portlet.faces.tck.nonJSFURLRendered");
-      
+    {     
       renderResponse.setContentType("text/html");
       PrintWriter out = renderResponse.getWriter();
 

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=1036252&r1=1036251&r2=1036252&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 Nov 17 22:12:26 2010
@@ -6254,42 +6254,42 @@ public class Tests
     ExternalContext extCtx = ctx.getExternalContext();
 
     // test encodeActionURL preserves the xml escape encoding in the url it returns
-    if (isStrictXhtmlEncoded(extCtx.encodeActionURL("/tests/SingleRequestTest.jsp?parm1=a&param2=b")))
+    if (isStrictXhtmlEncoded(extCtx.encodeActionURL("/tests/SingleRequestTest.jsf?parm1=a&param2=b")))
     {
       testRunner.setTestResult(false,
                                "EncodeActionURL incorrectly returned an url including xml escaping when the input url wasn't escaped.");
       return Constants.TEST_FAILED;
     }
     
-    if (!isStrictXhtmlEncoded(extCtx.encodeActionURL("/tests/SingleRequestTest.jsp?parm1=a&amp;param2=b")))
+    if (!isStrictXhtmlEncoded(extCtx.encodeActionURL("/tests/SingleRequestTest.jsf?parm1=a&amp;param2=b")))
     {
       testRunner.setTestResult(false,
                                "EncodeActionURL incorrectly returned an url without xml escaping when the input url was escaped.");
       return Constants.TEST_FAILED;
     }
     
-    if (isStrictXhtmlEncoded(extCtx.encodeActionURL("/tests/SingleRequestTest.jsp")))
+    if (isStrictXhtmlEncoded(extCtx.encodeActionURL("/tests/SingleRequestTest.jsf")))
     {
       testRunner.setTestResult(false,
                                "EncodeActionURL incorrectly returned an url including xml escaping when the input url contained no indication (no query string).");
       return Constants.TEST_FAILED;
     }
     
-    if (isStrictXhtmlEncoded(extCtx.encodeResourceURL("/tests/SingleRequestTest.jsp?parm1=a&param2=b")))
+    if (isStrictXhtmlEncoded(extCtx.encodeResourceURL("/tests/SingleRequestTest.jsf?parm1=a&param2=b")))
     {
       testRunner.setTestResult(false,
                                "EncodeResourceURL incorrectly returned an url including xml escaping when the input url wasn't escaped.");
       return Constants.TEST_FAILED;
     }
     
-    if (!isStrictXhtmlEncoded(extCtx.encodeResourceURL("/tests/SingleRequestTest.jsp?parm1=a&amp;param2=b")))
+    if (!isStrictXhtmlEncoded(extCtx.encodeResourceURL("/tests/SingleRequestTest.jsf?parm1=a&amp;param2=b")))
     {
       testRunner.setTestResult(false,
                                "EncodeResourceURL incorrectly returned an url without xml escaping when the input url was escaped.");
       return Constants.TEST_FAILED;
     }
     
-    if (isStrictXhtmlEncoded(extCtx.encodeResourceURL("/tests/SingleRequestTest.jsp")))
+    if (isStrictXhtmlEncoded(extCtx.encodeResourceURL("/tests/SingleRequestTest.jsf")))
     {
       testRunner.setTestResult(false,
                                "EncodeResourceURL incorrectly returned an url including xml escaping when the input url contained no indication (no query string).");

Modified: myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/java/org/apache/myfaces/portlet/faces/tckharness/TckTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/java/org/apache/myfaces/portlet/faces/tckharness/TckTestCase.java?rev=1036252&r1=1036251&r2=1036252&view=diff
==============================================================================
--- myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/java/org/apache/myfaces/portlet/faces/tckharness/TckTestCase.java (original)
+++ myfaces/portlet-bridge/tck/trunk_2.0.x/src/test/java/org/apache/myfaces/portlet/faces/tckharness/TckTestCase.java Wed Nov 17 22:12:26 2010
@@ -54,7 +54,7 @@ import static junit.framework.Assert.fai
 @RunWith(TckParameterized.class)
 public class TckTestCase
 {
-  private static String MAX_WAIT = "30000";
+  private static String MAX_WAIT = "90000";
 
   protected static Selenium sSelenium;