myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mfreed...@apache.org
Subject svn commit: r900963 [2/2] - in /myfaces/portlet-bridge/testsuite/trunk/src: main/java/org/apache/myfaces/portlet/faces/testsuite/beans/ main/java/org/apache/myfaces/portlet/faces/testsuite/common/portlet/ main/java/org/apache/myfaces/portlet/faces/test...
Date Tue, 19 Jan 2010 21:21:44 GMT
Added: myfaces/portlet-bridge/testsuite/trunk/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_5/section_5_3/Tests.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/testsuite/trunk/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_5/section_5_3/Tests.java?rev=900963&view=auto
==============================================================================
--- myfaces/portlet-bridge/testsuite/trunk/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_5/section_5_3/Tests.java (added)
+++ myfaces/portlet-bridge/testsuite/trunk/src/main/java/org/apache/myfaces/portlet/faces/testsuite/tests/chapter_5/section_5_3/Tests.java Tue Jan 19 21:21:42 2010
@@ -0,0 +1,228 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_3;
+
+import java.util.Map;
+
+import javax.el.ELResolver;
+
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+
+
+import javax.faces.render.ResponseStateManager;
+
+
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
+import javax.portlet.PortletMode;
+import javax.portlet.PortletRequest;
+import javax.portlet.faces.Bridge;
+import javax.portlet.faces.BridgeUtil;
+
+import org.apache.myfaces.portlet.faces.testsuite.annotation.BridgeTest;
+import org.apache.myfaces.portlet.faces.testsuite.beans.TestRunnerBean;
+import org.apache.myfaces.portlet.faces.testsuite.common.Constants;
+
+public class Tests
+  extends Object
+{
+  
+  
+  // Test is MultiRequest -- Render/Action
+  // Test #5.41
+  @BridgeTest(test = "noViewStateParamOnModeChangeTest")
+  public String noViewStateParamOnModeChangeTest(TestRunnerBean testRunner)
+  {    
+    // In the action portion create/attach things to request scope that should either be preserved or
+    // are explicitly excluded -- test for presence/absence in render
+    if (BridgeUtil.getPortletRequestPhase() ==
+        Bridge.PortletPhase.ACTION_PHASE)
+    {
+      return "noViewStateParamOnModeChangeTest"; // action Navigation result
+    }
+    else
+    {
+      FacesContext ctx = FacesContext.getCurrentInstance();
+      ExternalContext extCtx = ctx.getExternalContext();
+      
+      testRunner.setTestComplete(true);
+      if (extCtx.getRequestParameterMap().get(ResponseStateManager.VIEW_STATE_PARAM) == null)
+      {
+        testRunner.setTestResult(true,
+                                "Render after mode change properly doesn't expose the ResponseStateManager.VIEW_STATE_PARAM.");
+        return Constants.TEST_SUCCESS;  
+      }
+      else
+      {
+        testRunner.setTestResult(false,
+                                "Render after mode change incorrectly exposes the ResponseStateManager.VIEW_STATE_PARAM.");
+        return Constants.TEST_FAILED;
+      }
+    }
+  } 
+  
+  // Test is SingleRequest -- Render
+  // Test #5.43
+  @BridgeTest(test = "checkViewHistoryTest")
+  public String checkViewHistoryTest(TestRunnerBean testRunner)
+  {    
+    FacesContext ctx = FacesContext.getCurrentInstance();
+    ExternalContext extCtx = ctx.getExternalContext();
+    Map<String, Object> m = extCtx.getSessionMap();
+    ELResolver facesResolver = ctx.getELContext().getELResolver();
+    PortletConfig config = (PortletConfig) facesResolver.getValue(ctx.getELContext(), null, "portletConfig");
+      
+    testRunner.setTestComplete(true);
+    String view = (String) m.get("javax.portlet.faces.viewIdHistory.view");
+    String edit = (String) m.get("javax.portlet.faces.viewIdHistory.edit");
+    String help = (String) m.get("javax.portlet.faces.viewIdHistory.help");
+    
+    Map<String, String> defaultViewIdMap = (Map<String, String>) ((PortletContext)extCtx.getContext())
+                          .getAttribute(Bridge.BRIDGE_PACKAGE_PREFIX + config.getPortletName() + "." + 
+                                     Bridge.DEFAULT_VIEWID_MAP);
+    
+    if (view == null)
+    {
+      testRunner.setTestResult(false,
+                                "javax.portlet.faces.viewIdHistory.view session attribute doesn't exist.");
+      return Constants.TEST_FAILED;
+    }
+    
+    if (edit == null)
+    {
+      testRunner.setTestResult(false,
+                                "javax.portlet.faces.viewIdHistory.edit session attribute doesn't exist.");
+      return Constants.TEST_FAILED;
+    }
+    
+    if (help == null)
+    {
+      testRunner.setTestResult(false,
+                                "javax.portlet.faces.viewIdHistory.help session attribute doesn't exist.");
+      return Constants.TEST_FAILED;
+    }
+    
+    if (!view.startsWith(defaultViewIdMap.get("view")))
+    {
+      testRunner.setTestResult(false,
+                               "javax.portlet.faces.viewIdHistory.view contains unexpected value. Expected: "
+                               + defaultViewIdMap.get("view") + " but value was: " + view);
+      return Constants.TEST_FAILED;
+    }
+    
+    if (!edit.startsWith(defaultViewIdMap.get("edit")))
+    {
+      testRunner.setTestResult(false,
+                               "javax.portlet.faces.viewIdHistory.edit contains unexpected value. Expected: "
+                               + defaultViewIdMap.get("edit") + " but value was: " + edit);
+      return Constants.TEST_FAILED;
+    }
+    
+    if (!help.startsWith(defaultViewIdMap.get("help")))
+    {
+      testRunner.setTestResult(false,
+                               "javax.portlet.faces.viewIdHistory.help contains unexpected value. Expected: "
+                               + defaultViewIdMap.get("help") + " but value was: " + help);
+      return Constants.TEST_FAILED;
+    }
+    
+    testRunner.setTestResult(true,
+                                "Correctly contained the viewId history session attributes.");
+    return Constants.TEST_SUCCESS;  
+  } 
+  
+  
+  // Test is MultiRequest -- Render/Action
+  // Test #5.46
+  @BridgeTest(test = "navigateToLastViewTest")
+  public String navigateToLastViewTest(TestRunnerBean testRunner)
+  { 
+    FacesContext ctx = FacesContext.getCurrentInstance();
+    ExternalContext extCtx = ctx.getExternalContext();
+    PortletMode mode = (PortletMode) ((PortletRequest)extCtx.getRequest()).getPortletMode();
+    
+    // In the action portion create/attach things to request scope that should either be preserved or
+    // are explicitly excluded -- test for presence/absence in render
+    String theView = ctx.getViewRoot().getViewId();
+    String theHistoryView = (String) extCtx.getSessionMap().get("javax.portlet.faces.viewIdHistory.view");
+    String theHistoryEdit = (String) extCtx.getSessionMap().get("javax.portlet.faces.viewIdHistory.view");
+    String renderParam =  (String) extCtx.getRequestParameterMap().get("org.apache.myfaces.portlet.faces.tck.testAttr") ;
+    
+    if (BridgeUtil.getPortletRequestPhase() ==
+        Bridge.PortletPhase.ACTION_PHASE)
+    {
+      String viewId = ctx.getViewRoot().getViewId();
+      if (viewId.equals("/tests/MultiRequestTest.jsp"))
+      {
+        if (mode.toString().equals("view"))
+        {
+        // First page -- navigate to the second page
+          return "navigateToLastViewTest1"; // action Navigation result
+        }
+        else 
+        // (mode.toString().equals("edit"))
+        {
+          // Third page -- mark the test as complete so can test/render the result
+          // Done on session attribute because we cross the request scope boundary (mode change)
+          // and hence the current test bean is lost
+          extCtx.getSessionMap().put("org.apache.myfaces.portlet.faces.tck.testCompleted", Boolean.TRUE);
+          return "navigateToLastViewTest3"; // returns from edit mode
+        }
+      }
+      else 
+      // (viewId.equals("/tests/RedsiplayActionRequestTest.jsp"))
+      {
+        //Coming from the first page
+        // Second page -- navigate to the edit mode
+        // Render parameter added in the navigation
+        return "navigateToLastViewTest2"; // action Navigation result -- goes to edit mode
+      }
+    }
+    else
+    {    
+      // Should only get here from 
+      if (Boolean.TRUE.equals((Boolean)extCtx.getSessionMap().get("org.apache.myfaces.portlet.faces.tck.testCompleted")))
+      {
+        testRunner.isTestComplete();
+        extCtx.getSessionMap().remove("org.apache.myfaces.portlet.faces.tck.testCompleted");
+        
+        if (extCtx.getRequestParameterMap().get("org.apache.myfaces.portlet.faces.tck.testAttr") != null)
+        {
+          testRunner.setTestResult(true,
+                                     "Successfully returned from edit mode to last view with its existing render parameters.");
+          return Constants.TEST_SUCCESS;
+        }
+        else
+        {
+          testRunner.setTestResult(false,
+                                     "Though we returned from edit mode to last view it was without its existing render parameters.");
+          return Constants.TEST_FAILED;
+        }
+      }
+      else
+      {
+        return "Test is still being run.";
+      }
+    }
+  } 
+  
+}

Modified: myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/WEB-INF/faces-config.xml?rev=900963&r1=900962&r2=900963&view=diff
==============================================================================
--- myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/WEB-INF/faces-config.xml (original)
+++ myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/WEB-INF/faces-config.xml Tue Jan 19 21:21:42 2010
@@ -9,6 +9,8 @@
       <bridge:excluded-attributes>
         <bridge:excluded-attribute>myFacesConfigExcludedNamespace.*</bridge:excluded-attribute>
         <bridge:excluded-attribute>myFacesConfigExcludedKey</bridge:excluded-attribute>
+        <bridge:excluded-attribute>org.apache.myfaces.portlet.faces.tck.WildcardFacesConfigTest.*</bridge:excluded-attribute>
+        <bridge:excluded-attribute>org.apache.myfaces.portlet.faces.tck.ExcludeByFacesConfigRef</bridge:excluded-attribute>
       </bridge:excluded-attributes>
     </application-extension>
   </application>
@@ -17,6 +19,73 @@
     <faces-context-factory>org.apache.myfaces.portlet.faces.testsuite.common.util.faces.context.TCK_FacesContextFactoryImpl</faces-context-factory>
     <lifecycle-factory>org.apache.myfaces.portlet.faces.testsuite.common.util.faces.application.TestSuiteLifecycleFactoryImpl</lifecycle-factory>
   </factory>
+  
+  <managed-bean>
+    <managed-bean-name>chapter3Tests</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_3.Tests</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean> 
+  <managed-bean>
+    <managed-bean-name>chapter4_2_5Tests</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_4.section_4_2_5.Tests</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean> 
+  <managed-bean>
+    <managed-bean-name>chapter5_1_2Tests</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_1_2.Tests</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean> 
+  <managed-bean>
+    <managed-bean-name>chapter5_2Tests</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.Tests</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean> 
+  <managed-bean>
+    <managed-bean-name>chapter5_3Tests</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_3.Tests</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean> 
+  <managed-bean>
+    <managed-bean-name>chapter6_1_1Tests</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_6.section_6_1_1.Tests</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>chapter6_1_3_1Tests</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_6.section_6_1_3_1.Tests</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>chapter6_1_3_2Tests</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_6.section_6_1_3_2.Tests</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean>
+    <managed-bean>
+    <managed-bean-name>chapter6_5_1Tests</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_6.section_6_5_1.Tests</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>predestroyBean1</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.beans.PreDestroyBean1</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>predestroySessionBean</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.beans.PreDestroyBean1</managed-bean-class>
+    <managed-bean-scope>session</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>sampleTests</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.sample.SampleTests</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean>
+  <managed-bean>
+    <managed-bean-name>test</managed-bean-name>
+    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.beans.TestRunnerBean</managed-bean-class>
+    <managed-bean-scope>request</managed-bean-scope>
+  </managed-bean>  
+  
   <navigation-rule>
     <from-view-id>/tests/*</from-view-id>
     <navigation-case>
@@ -44,6 +113,99 @@
     </navigation-case>
   </navigation-rule>
   
+  <!-- Chapter 5 Tests -->
+  <navigation-rule>
+    <from-view-id>/tests/MultiRequestTest.jsp</from-view-id>
+<!--
+    <navigation-case>
+      <from-outcome>requestScopeContentsTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case>
+-->
+    <navigation-case>
+      <from-outcome>requestScopeRestartedOnActionTest_Action2</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>requestNoScopeOnRedirectTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+      <redirect/>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>requestNoScopeOnModeChangeTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp?javax.portlet.faces.PortletMode=edit&amp;param1=testValue</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>requestRenderIgnoresScopeViaCreateViewTest</from-outcome>
+      <to-view-id>/tests/RedisplayRenderNewModeRequestTest.jsp</to-view-id>
+    </navigation-case>
+        <navigation-case>
+      <from-outcome>requestRenderRedisplayTest</from-outcome>
+      <to-view-id>/tests/RedisplayRenderRequestTest.jsp</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>requestRedisplayOutOfScopeTest</from-outcome>
+      <to-view-id>/tests/RedisplayRenderNewModeRequestTest.jsp</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>excludedAttributesTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>verifyPortletPhaseTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>renderRedirectTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>facesContextReleasedActionTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>portletPhaseRemovedActionTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>isPostbackTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>noViewStateParamOnModeChangeTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp?javax.portlet.faces.PortletMode=edit</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+  
+  <navigation-rule>
+    <from-view-id>/tests/MultiRequestFormDataTest.jsp</from-view-id>
+    <navigation-case>
+      <from-outcome>requestPreserveActionParamsTest</from-outcome>
+      <to-view-id>/tests/MultiRequestTestResultRenderCheck.jsp</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+  
+  <navigation-rule>
+    <from-view-id>/tests/MultiRequestTest.jsp*</from-view-id>
+    <navigation-case>
+      <from-outcome>navigateToLastViewTest1</from-outcome>
+      <to-view-id>/tests/RedisplayActionRequestTest.jsp?org.apache.myfaces.portlet.faces.tck.testAttr=value1</to-view-id>
+    </navigation-case>
+    <navigation-case>
+      <from-outcome>navigateToLastViewTest3</from-outcome>
+      <to-view-id>#{sessionScope['javax.portlet.faces.viewIdHistory.view']}</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+  
+  <navigation-rule>
+    <from-view-id>/tests/RedisplayActionRequestTest.jsp*</from-view-id>
+    <navigation-case>
+      <from-outcome>navigateToLastViewTest2</from-outcome>
+      <to-view-id>/tests/MultiRequestTest.jsp?javax.portlet.faces.PortletMode=edit</to-view-id>
+    </navigation-case>
+  </navigation-rule>
+
+  
   <!-- Chapter 6 Tests -->
   <navigation-rule>
     <from-view-id>/tests/MultiRequestTest.jsp</from-view-id>
@@ -185,54 +347,8 @@
     </navigation-case> 
   </navigation-rule>
   
-  <managed-bean>
-    <managed-bean-name>chapter3Tests</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_3.Tests</managed-bean-class>
-    <managed-bean-scope>request</managed-bean-scope>
-  </managed-bean> 
-  <managed-bean>
-    <managed-bean-name>chapter4_2_5Tests</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_4.section_4_2_5.Tests</managed-bean-class>
-    <managed-bean-scope>request</managed-bean-scope>
-  </managed-bean> 
-  <managed-bean>
-    <managed-bean-name>chapter6_1_1Tests</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_6.section_6_1_1.Tests</managed-bean-class>
-    <managed-bean-scope>request</managed-bean-scope>
-  </managed-bean>
-  <managed-bean>
-    <managed-bean-name>chapter6_1_3_1Tests</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_6.section_6_1_3_1.Tests</managed-bean-class>
-    <managed-bean-scope>request</managed-bean-scope>
-  </managed-bean>
-  <managed-bean>
-    <managed-bean-name>chapter6_1_3_2Tests</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_6.section_6_1_3_2.Tests</managed-bean-class>
-    <managed-bean-scope>request</managed-bean-scope>
-  </managed-bean>
-    <managed-bean>
-    <managed-bean-name>chapter6_5_1Tests</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_6.section_6_5_1.Tests</managed-bean-class>
-    <managed-bean-scope>request</managed-bean-scope>
-  </managed-bean>
-  <managed-bean>
-    <managed-bean-name>predestroyBean1</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.beans.PreDestroyBean1</managed-bean-class>
-    <managed-bean-scope>request</managed-bean-scope>
-  </managed-bean>
-  <managed-bean>
-    <managed-bean-name>predestroySessionBean</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.beans.PreDestroyBean1</managed-bean-class>
-    <managed-bean-scope>session</managed-bean-scope>
-  </managed-bean>
-  <managed-bean>
-    <managed-bean-name>sampleTests</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.tests.sample.SampleTests</managed-bean-class>
-    <managed-bean-scope>request</managed-bean-scope>
-  </managed-bean>
-  <managed-bean>
-    <managed-bean-name>test</managed-bean-name>
-    <managed-bean-class>org.apache.myfaces.portlet.faces.testsuite.beans.TestRunnerBean</managed-bean-class>
-    <managed-bean-scope>request</managed-bean-scope>
-  </managed-bean>
+  <lifecycle>
+    <phase-listener>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.Tests</phase-listener>
+  </lifecycle>
+  
 </faces-config>
\ No newline at end of file

Modified: myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/WEB-INF/portlet.xml?rev=900963&r1=900962&r2=900963&view=diff
==============================================================================
--- myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/WEB-INF/portlet.xml (original)
+++ myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/WEB-INF/portlet.xml Tue Jan 19 21:21:42 2010
@@ -486,8 +486,612 @@
         </portlet-info>
     </portlet>
 
+    <!-- *************************************************************** -->
+    <!-- *                                                             * -->
+    <!-- * Tests: Chapter 5                                            * -->
+    <!-- *                                                             * -->
+    <!-- *************************************************************** --> 
+    
+    <portlet>
+        <portlet-name>chapter5_1_2Tests-requestScopeContentsTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_1_2.BridgeClearRequestScopePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/RedisplayActionRequestTest.jsp</value>
+        </init-param>
+
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_1_2Tests-requestScopeContentsTest-portlet</title>
+        </portlet-info>
+        
+        <portlet-preferences>
+            <preference>
+                <name>title</name>
+                <value>testTitle</value>
+            </preference>
+            <preference>
+                <name>stocks</name>
+                <value>orcl</value>
+                <value>xrx</value>
+            </preference>
+        </portlet-preferences>
+    </portlet>    
+    
+    <portlet>
+        <portlet-name>chapter5_1_2Tests-requestScopeRestartedOnActionTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_1_2Tests-requestScopeRestartedOnActionTest-portlet</title>
+        </portlet-info>
+
+    </portlet> 
+    
+        <portlet>
+        <portlet-name>chapter5_1_2Tests-requestNoScopeOnRedirectTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_1_2Tests-requestNoScopeOnRedirectTest-portlet</title>
+        </portlet-info>
+
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_1_2Tests-requestNoScopeOnModeChangeTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.edit</name>
+          <value>/tests/MultiRequestTestResultRenderCheck.jsp</value>
+        </init-param>
+
+        <expiration-cache>0</expiration-cache>
+        
+       <supports>
+         <mime-type>text/html</mime-type>
+         <portlet-mode>VIEW</portlet-mode>
+         <portlet-mode>EDIT</portlet-mode>
+       </supports>
+        <portlet-info>
+                <title>chapter5_1_2Tests-requestNoScopeOnModeChangeTest-portlet</title>
+        </portlet-info>
+    </portlet>
+    
+    
+    <portlet>
+        <portlet-name>chapter5_1_2Tests-requestPreserveActionParamsTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestFormDataTest.jsp</value>
+        </init-param>
+        
+        <init-param>
+          <name>javax.portlet.faces.preserveActionParams</name>
+          <value>true</value>
+        </init-param>
+
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_1_2Tests-requestPreserveActionParamsTest-portlet</title>
+        </portlet-info>
+    </portlet>
+    
+    <portlet>
+        <portlet-name>chapter5_1_2Tests-requestRenderIgnoresScopeViaCreateViewTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.edit</name>
+          <value>/tests/MultiRequestTestResultRenderCheck.jsp</value>
+        </init-param>
+
+        <expiration-cache>0</expiration-cache>
+        
+       <supports>
+         <mime-type>text/html</mime-type>
+         <portlet-mode>VIEW</portlet-mode>
+         <portlet-mode>EDIT</portlet-mode>
+       </supports>
+       
+       <portlet-info>
+                <title>chapter5_1_2Tests-requestRenderIgnoresScopeViaCreateViewTest-portlet</title>
+        </portlet-info>
+    </portlet>
+
+    <portlet>
+        <portlet-name>chapter5_1_2Tests-requestRenderRedisplayTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+
+        <expiration-cache>0</expiration-cache>
+        
+       <supports>
+         <mime-type>text/html</mime-type>
+         <portlet-mode>VIEW</portlet-mode>
+       </supports>
+       
+       <portlet-info>
+                <title>chapter5_1_2Tests-requestRenderRedisplayTest-portlet</title>
+        </portlet-info>
+    </portlet>
+    
+    <portlet>
+        <portlet-name>chapter5_1_2Tests-requestRedisplayOutOfScopeTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.edit</name>
+          <value>/tests/MultiRequestTestResultRenderCheck.jsp</value>
+        </init-param>
+
+        <expiration-cache>0</expiration-cache>
+        
+       <supports>
+         <mime-type>text/html</mime-type>
+         <portlet-mode>VIEW</portlet-mode>
+         <portlet-mode>EDIT</portlet-mode>
+       </supports>
+       
+       <portlet-info>
+                <title>chapter5_1_2Tests-requestRedisplayOutOfScopeTest-portlet</title>
+        </portlet-info>
+    </portlet>
+    
+    <portlet>
+        <portlet-name>chapter5_1_2Tests-excludedAttributesTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+        
+        <init-param>
+          <name>javax.portlet.faces.excludedRequestAttributes</name>
+          <value>org.apache.myfaces.portlet.faces.tck.WildcardPortletXmlTest.*, org.apache.myfaces.portlet.faces.tck.ExcludeByPortletXmlRef</value>
+        </init-param>
+
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_1_2Tests-excludedAttributesTest-portlet</title>
+        </portlet-info>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-verifyPortletObjectsTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/SingleRequestTest.jsp</value>
+        </init-param>
 
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-verifyPortletObjectsTest-portlet</title>
+        </portlet-info>
+    </portlet>
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-verifyPortletPhaseTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+        
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-verifyPortletPhaseTest-portlet</title>
+        </portlet-info>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-portletSetsInvalidViewPathTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_3.PortletSetsViewTestPortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/PortletSetsViewIdTestFailed.jsp</value>
+        </init-param>
 
+        <expiration-cache>0</expiration-cache>
+        
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+        <portlet-info>
+                <title>chapter5_2Tests-portletSetsInvalidViewPathTest-portlet</title>
+        </portlet-info>
+    </portlet>
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-renderRedirectTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+        
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-renderRedirectTest-portlet</title>
+        </portlet-info>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-ignoreCurrentViewIdModeChangeTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/RedisplayRenderNewModeRequestTest.jsp</value>
+        </init-param>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.edit</name>
+          <value>/tests/MultiRequestTestResultRenderCheck.jsp</value>
+        </init-param>
+        
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+         <portlet-mode>VIEW</portlet-mode>
+         <portlet-mode>EDIT</portlet-mode>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-ignoreCurrentViewIdModeChangeTest-portlet</title>
+        </portlet-info>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-exceptionThrownWhenNoDefaultViewIdTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.ManualBridgeInvokePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/RedisplayRenderNewModeRequestTest.jsp</value>
+        </init-param>
+               
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+         <portlet-mode>VIEW</portlet-mode>
+         <portlet-mode>EDIT</portlet-mode>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-exceptionThrownWhenNoDefaultViewIdTest-portlet</title>
+        </portlet-info>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-viewIdWithParam_1_Test-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.ManualBridgeInvokePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value> <!-- Test overrides and sets initial view explicitly in portlet -->
+        </init-param>
+               
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-viewIdWithParam_1_Test-portlet</title>
+        </portlet-info>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-viewIdWithParam_2_Test-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/SingleRequestTest.jsp?param1=testValue</value> 
+        </init-param>
+               
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-viewIdWithParam_2_Test-portlet</title>
+        </portlet-info>
+    </portlet>    
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-facesContextReleasedActionTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.ManualBridgeInvokePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+        
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-facesContextReleasedActionTest-portlet</title>
+        </portlet-info>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-portletPhaseRemovedActionTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.ManualBridgeInvokePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+        
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-portletPhaseRemovedActionTest-portlet</title>
+        </portlet-info>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-bridgeSetsContentTypeTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.ManualBridgeInvokePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/SingleRequestTest.jsp</value>
+        </init-param>
+        
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-bridgeSetsContentTypeTest-portlet</title>
+        </portlet-info>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-isPostbackTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+        
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-isPostbackTest-portlet</title>
+        </portlet-info>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-renderPhaseListenerTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/SingleRequestTest.jsp</value>
+        </init-param>
+        
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-renderPhaseListenerTest-portlet</title>
+        </portlet-info>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-facesContextReleasedRenderTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.ManualBridgeInvokePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/SingleRequestTest.jsp</value>
+        </init-param>
+        
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-facesContextReleasedRenderTest-portlet</title>
+        </portlet-info>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_2Tests-portletPhaseRemovedRenderTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.tests.chapter_5.section_5_2.ManualBridgeInvokePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/SingleRequestTest.jsp</value>
+        </init-param>
+        
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+       </supports>
+       <portlet-info>
+                <title>chapter5_2Tests-portletPhaseRemovedRenderTest-portlet</title>
+        </portlet-info>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_3Tests-noViewStateParamOnModeChangeTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.edit</name>
+          <value>/tests/MultiRequestTestResultRenderCheck.jsp</value>
+        </init-param>
+        
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+         <portlet-mode>VIEW</portlet-mode>
+         <portlet-mode>EDIT</portlet-mode>
+       </supports>
+       <portlet-info>
+                <title>chapter5_3Tests-noViewStateParamOnModeChangeTest-portlet</title>
+        </portlet-info>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_3Tests-checkViewHistoryTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/SingleRequestTest.jsp</value>
+        </init-param>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.edit</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.help</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+        
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+         <portlet-mode>VIEW</portlet-mode>
+         <portlet-mode>EDIT</portlet-mode>
+         <portlet-mode>HELP</portlet-mode>
+       </supports>
+       <portlet-info>
+                <title>chapter5_3Tests-checkViewHistoryTest-portlet</title>
+        </portlet-info>
+    </portlet> 
+    
+    <portlet>
+        <portlet-name>chapter5_3Tests-navigateToLastViewTest-portlet</portlet-name>
+        <portlet-class>org.apache.myfaces.portlet.faces.testsuite.common.portlet.GenericFacesTestSuitePortlet</portlet-class>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.view</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+        
+        <init-param>
+          <name>javax.portlet.faces.defaultViewId.edit</name>
+          <value>/tests/MultiRequestTest.jsp</value>
+        </init-param>
+        
+        
+        <expiration-cache>0</expiration-cache>
+    
+       <supports>
+         <mime-type>text/html</mime-type>
+         <portlet-mode>VIEW</portlet-mode>
+         <portlet-mode>EDIT</portlet-mode>
+       </supports>
+       <portlet-info>
+                <title>chapter5_3Tests-navigateToLastViewTest-portlet</title>
+        </portlet-info>
+    </portlet> 
+  
     <!-- *************************************************************** -->
     <!-- *                                                             * -->
     <!-- * Tests: Chapter 6                                            * -->

Added: myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/tests/RedisplayActionRequestTest.jsp
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/tests/RedisplayActionRequestTest.jsp?rev=900963&view=auto
==============================================================================
--- myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/tests/RedisplayActionRequestTest.jsp (added)
+++ myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/tests/RedisplayActionRequestTest.jsp Tue Jan 19 21:21:42 2010
@@ -0,0 +1,24 @@
+<!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:outputText escape = "false" value="#{test.renderTestResult}"/>
+          <h:commandButton value="#{test.redisplayLinkName}" action="#{test.runActionTest}"/>
+        </h:panelGrid>
+      </h:form>
+      
+    </body>
+  </html>
+</f:view>
\ No newline at end of file

Added: myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/tests/RedisplayRenderNewModeRequestTest.jsp
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/tests/RedisplayRenderNewModeRequestTest.jsp?rev=900963&view=auto
==============================================================================
--- myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/tests/RedisplayRenderNewModeRequestTest.jsp (added)
+++ myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/tests/RedisplayRenderNewModeRequestTest.jsp Tue Jan 19 21:21:42 2010
@@ -0,0 +1,29 @@
+<!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 Single Request TCK Test</title>
+    </head>
+    <body>
+      <h:form>
+        <h:panelGrid columns="1">
+          <h:outputText escape = "false" value="#{test.renderTestResult}"/>
+        </h:panelGrid>
+        <h:outputLink value="portlet:render" >
+            <f:param name="_jsfBridgeViewId" value="_jsfBridgeCurrentView" />
+            <f:param name="javax.portlet.faces.PortletMode" value="edit" />
+            <f:param name="org.apache.portlet.faces.tck.redisplay" value="1" />
+            <h:outputText value="#{test.redisplayLinkName}"/>
+        </h:outputLink>
+      </h:form>
+      
+    </body>
+  </html>
+</f:view>
\ No newline at end of file

Modified: myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/tests/RedisplayRenderRequestTest.jsp
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/tests/RedisplayRenderRequestTest.jsp?rev=900963&r1=900962&r2=900963&view=diff
==============================================================================
--- myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/tests/RedisplayRenderRequestTest.jsp (original)
+++ myfaces/portlet-bridge/testsuite/trunk/src/main/webapp/tests/RedisplayRenderRequestTest.jsp Tue Jan 19 21:21:42 2010
@@ -17,8 +17,9 @@
           <h:outputText escape = "false" value="#{test.renderTestResult}"/>
         </h:panelGrid>
         <h:outputLink value="portlet:render" >
-            <f:param name="javax.portlet.faces.viewId" value="/tests/SingleRequestTest.jsp" />
-            <h:outputText value="Redisplay"/>
+            <f:param name="_jsfBridgeViewId" value="_jsfBridgeCurrentView" />
+            <f:param name="org.apache.portlet.faces.tck.redisplay" value="1" />
+            <h:outputText value="#{test.redisplayLinkName}"/>
         </h:outputLink>
       </h:form>
       

Modified: myfaces/portlet-bridge/testsuite/trunk/src/test/java/org/apache/myfaces/portlet/faces/tckharness/TckTestCase.java
URL: http://svn.apache.org/viewvc/myfaces/portlet-bridge/testsuite/trunk/src/test/java/org/apache/myfaces/portlet/faces/tckharness/TckTestCase.java?rev=900963&r1=900962&r2=900963&view=diff
==============================================================================
--- myfaces/portlet-bridge/testsuite/trunk/src/test/java/org/apache/myfaces/portlet/faces/tckharness/TckTestCase.java (original)
+++ myfaces/portlet-bridge/testsuite/trunk/src/test/java/org/apache/myfaces/portlet/faces/tckharness/TckTestCase.java Tue Jan 19 21:21:42 2010
@@ -67,9 +67,10 @@
   private static final String TEST_RESULT_DETAIL_XPATH
     = "//span[@id=\"{0}-result-detail\"]";
 
-  // TO DO: REFINE THE SEARCH PATH FOR THE RUN TEST BUTTON
-  private static final String TEST_BUTTON_XPATH 
-    = "//input[@type=\"submit\" and @value=\"Run Test\"]";
+  private static final String[] ACTION_XPATHS
+    = {"//input[@type=\"submit\" and @value=\"Run Test\"]",
+       "//a[text()=\"Run Test\"]"};
+
   private static final String TEST_PASSED_XPATH
     = "//span[@id=\"{0}-result-status\" and text()=\"SUCCESS\"]";
   private static final String TEST_FAILED_XPATH
@@ -325,14 +326,23 @@
   }
 
   public void performActions()
-  {   
-    // Press the "Run Test" button if there is one
-    if (sSelenium.isElementPresent(TEST_BUTTON_XPATH))
-    {
-      log("-- Run Button Pressed --");
-      sSelenium.click(TEST_BUTTON_XPATH);
-      sSelenium.waitForPageToLoad(MAX_WAIT);
-    }
+  {
+    boolean actionsLeftToPerform = true;
+
+    while (actionsLeftToPerform)
+    {
+      outer:
+      for (String action: ACTION_XPATHS)
+      {
+        if (sSelenium.isElementPresent(action))
+        {
+          sSelenium.click(action);
+          sSelenium.waitForPageToLoad(MAX_WAIT);
+          continue outer;
+        }
+      }
+      actionsLeftToPerform = false;
+    }  
   }
 
   public void login()



Mime
View raw message