portals-pluto-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From msnickl...@apache.org
Subject [1/2] portals-pluto git commit: Added next batch of portlet hub tck tests. Fixed error handling on portlet hub state object functions.
Date Thu, 06 Oct 2016 11:40:32 GMT
Repository: portals-pluto
Updated Branches:
  refs/heads/master 2b2276b79 -> f1be9519d


Added next batch of portlet hub tck tests. Fixed error handling on portlet
hub state object functions.


Project: http://git-wip-us.apache.org/repos/asf/portals-pluto/repo
Commit: http://git-wip-us.apache.org/repos/asf/portals-pluto/commit/1410b294
Tree: http://git-wip-us.apache.org/repos/asf/portals-pluto/tree/1410b294
Diff: http://git-wip-us.apache.org/repos/asf/portals-pluto/diff/1410b294

Branch: refs/heads/master
Commit: 1410b2948083b89620786c009d62cce8c28c2226
Parents: 2b2276b
Author: Scott Nicklous <msnicklous@apache.org>
Authored: Thu Oct 6 13:35:56 2016 +0200
Committer: Scott Nicklous <msnicklous@apache.org>
Committed: Thu Oct 6 13:35:56 2016 +0200

----------------------------------------------------------------------
 .../src/main/webapp/javascript/portlet.js       |  21 +
 .../src/main/docs/ModuleAssertions.csv          |  49 ++
 .../PortletHubTests_SPEC_23_JSState.java        | 461 ++++++++++++++++
 .../portlet/tck/util/ModuleTestCaseDetails.java |  96 ++++
 .../resources/xml-resources/additionalPages.xml |   1 +
 .../resources/xml-resources/additionalTCs.xml   |  48 ++
 .../javascript/PortletHubTests_SPEC_23_JS.js    |  60 +-
 .../PortletHubTests_SPEC_23_JSState.js          | 553 +++++++++++++++++++
 8 files changed, 1271 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/1410b294/pluto-portal/src/main/webapp/javascript/portlet.js
----------------------------------------------------------------------
diff --git a/pluto-portal/src/main/webapp/javascript/portlet.js b/pluto-portal/src/main/webapp/javascript/portlet.js
index bca2487..1713555 100644
--- a/pluto-portal/src/main/webapp/javascript/portlet.js
+++ b/pluto-portal/src/main/webapp/javascript/portlet.js
@@ -352,18 +352,30 @@ var portlet = portlet || {};
       return new State(this);
    };
    State.prototype.setPortletMode = function(pm) {
+      if (typeof pm !== 'string') {
+         throw new TypeError('Portlet mode must be a string');
+      }
       this.portletMode = pm;
    };
    State.prototype.getPortletMode = function() {
       return this.portletMode;
    };
    State.prototype.setWindowState = function(ws) {
+      if (typeof ws !== 'string') {
+         throw new TypeError('Window state must be a string');
+      }
       this.windowState = ws;
    };
    State.prototype.getWindowState = function() {
       return this.windowState;
    };
    State.prototype.setValue = function(name, value) {
+      if (typeof name !== 'string') {
+         throw new TypeError('Parameter name must be a string');
+      }
+      if (typeof value !== 'string' && value !== null && !Array.isArray(value)) {
+         throw new TypeError('Parameter value must be a string, an array, or null');
+      }
       var val = value;
       if (!Array.isArray(value)) {
          val = [ value ];
@@ -372,11 +384,17 @@ var portlet = portlet || {};
    };
    State.prototype.setValues = State.prototype.setValue;
    State.prototype.remove = function(name) {
+      if (typeof name !== 'string') {
+         throw new TypeError('Parameter name must be a string');
+      }
       if (this.parameters[name] !== undefined) {
          delete this.parameters[name];
       }
    };
    State.prototype.getValue = function(name, def) {
+      if (typeof name !== 'string') {
+         throw new TypeError('Parameter name must be a string');
+      }
       var res = this.parameters[name];
       if (res) {
          res = res[0];
@@ -387,6 +405,9 @@ var portlet = portlet || {};
       return res;
    };
    State.prototype.getValues = function(name, def) {
+      if (typeof name !== 'string') {
+         throw new TypeError('Parameter name must be a string');
+      }
       var res = this.parameters[name];
       if (res === undefined) {
          res = def;

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/1410b294/portlet-tck_3.0/V3PortletHubTests/src/main/docs/ModuleAssertions.csv
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V3PortletHubTests/src/main/docs/ModuleAssertions.csv b/portlet-tck_3.0/V3PortletHubTests/src/main/docs/ModuleAssertions.csv
index e9f5f56..6708cc7 100644
--- a/portlet-tck_3.0/V3PortletHubTests/src/main/docs/ModuleAssertions.csv
+++ b/portlet-tck_3.0/V3PortletHubTests/src/main/docs/ModuleAssertions.csv
@@ -49,6 +49,55 @@ SPEC_23;JS;Constants7;TRUE;The Constants object FULL property is type string and
 SPEC_23;JS;Constants8;TRUE;The Constants object PORTLET property is type string and equal to 'cacheLevelPortlet'
 SPEC_23;JS;Constants9;TRUE;The Constants object PAGE property is type string and equal to 'cacheLevelPage'
 
+SPEC_23;JS State;Parameters1;TRUE;The PortletInit object newParameters function returns a Parameters object
+SPEC_23;JS State;Parameters2;TRUE;The PortletInit object newParameters function returns a Parameters object containing no parameters
+SPEC_23;JS State;Parameters3;TRUE;The PortletInit object newParameters function returns a Parameters object containing cloned values if passed a parameters object
+SPEC_23;JS State;State1;TRUE;The PortletInit object newState function returns a State object 
+SPEC_23;JS State;State2;TRUE;The PortletInit object newState function returns a State object containing no parameters if not passed a State object
+SPEC_23;JS State;State3;TRUE;The PortletInit object newState function returns a State object containing cloned values if passed a State object
+SPEC_23;JS State;clone;TRUE;The RenderState object clone property is type function
+SPEC_23;JS State;setPortletMode;TRUE;The RenderState object setPortletMode property is type function
+SPEC_23;JS State;getPortletMode;TRUE;The RenderState object getPortletMode property is type function
+SPEC_23;JS State;setWindowState;TRUE;The RenderState object setWindowState property is type function
+SPEC_23;JS State;getWindowState;TRUE;The RenderState object getWindowState property is type function
+SPEC_23;JS State;setValue;TRUE;The RenderState object setValue property is type function
+SPEC_23;JS State;getValue;TRUE;The RenderState object getValue property is type function
+SPEC_23;JS State;getValues;TRUE;The RenderState object getValues property is type function
+SPEC_23;JS State;remove;TRUE;The RenderState object remove property is type function
+SPEC_23;JS State;parameters;TRUE;The RenderState object parameters property is type object
+SPEC_23;JS State;portletMode;TRUE;The RenderState object portletMode property is type string
+SPEC_23;JS State;windowState;TRUE;The RenderState object windowState property is type string
+SPEC_23;JS State;clone1;TRUE;The RenderState object clone function returns a new object instance
+SPEC_23;JS State;clone2;TRUE;The RenderState object clone function returns a RenderState object with the required properties
+SPEC_23;JS State;clone3;TRUE;The RenderState object clone function returns a RenderState object with the same portlet mode
+SPEC_23;JS State;clone4;TRUE;The RenderState object clone function returns a RenderState object with the same window state
+SPEC_23;JS State;clone5;TRUE;The RenderState object clone function returns a RenderState object with no parameters if the original had no parameters
+SPEC_23;JS State;clone6;TRUE;The RenderState object clone function returns a RenderState object with the same single-value parameters if the original had single-value parameters
+SPEC_23;JS State;clone7;TRUE;The RenderState object clone function returns a RenderState object with the same multi-value parameters if the original had multi-value parameters
+SPEC_23;JS State;setPortletMode1;TRUE;The RenderState object setPortletMode function throws a TypeError if the argument is not a string
+SPEC_23;JS State;setPortletMode2;TRUE;The RenderState object setPortletMode function sets the portlet mode
+SPEC_23;JS State;getPortletMode1;TRUE;The RenderState object getPortletMode function returns the portlet mode
+SPEC_23;JS State;setWindowState1;TRUE;The RenderState object setWindowState function throws a TypeError if the argument is not a string
+SPEC_23;JS State;setWindowState2;TRUE;The RenderState object setWindowState function sets the window state
+SPEC_23;JS State;getWindowState1;TRUE;The RenderState object getWindowState function returns the window state
+SPEC_23;JS State;setValue1;TRUE;The RenderState object setValue function throws a TypeError if the parameter name is not a string
+SPEC_23;JS State;setValue2;TRUE;The RenderState object setValue function throws a TypeError if the parameter value is not a string or array
+SPEC_23;JS State;setValue3;TRUE;The RenderState object setValue function can set a single-valued parameter
+SPEC_23;JS State;setValue4;TRUE;The RenderState object setValue function can set a multi-valued parameter
+SPEC_23;JS State;setValue5;TRUE;The RenderState object setValue function can set a parameter to null
+SPEC_23;JS State;getValue1;TRUE;The RenderState object getValue function throws a TypeError if the parameter name is not a string
+SPEC_23;JS State;getValue2;TRUE;The RenderState object getValue function returns a single-valued parameter
+SPEC_23;JS State;getValue3;TRUE;The RenderState object getValue function returns null if the parameter was set to null
+SPEC_23;JS State;getValue4;TRUE;The RenderState object getValue function returns the first value of a multi-valued parameter
+SPEC_23;JS State;getValue5;TRUE;The RenderState object getValue function returns undefined if the parameter name does not exist and there is no default
+SPEC_23;JS State;getValue6;TRUE;The RenderState object getValue function returns the default if the parameter name does not exist and a default is provided
+SPEC_23;JS State;getValues1;TRUE;The RenderState object getValues function throws a TypeError if the parameter name is not a string
+SPEC_23;JS State;getValues2;TRUE;The RenderState object getValues function returns an array of strings for a multi-valued parameter
+SPEC_23;JS State;getValues3;TRUE;The RenderState object getValues function returns undefined if the parameter name does not exist and there is no default
+SPEC_23;JS State;getValues4;TRUE;The RenderState object getValues function returns the default if the parameter name does not exist and a default is provided
+SPEC_23;JS State;remove1;TRUE;The RenderState object remove function throws a TypeError if the parameter name is not a string
+SPEC_23;JS State;remove2;TRUE;The RenderState object remove function removes an existing parameter
+
 
 
 // -------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/1410b294/portlet-tck_3.0/V3PortletHubTests/src/main/java/javax/portlet/tck/portlets/PortletHubTests_SPEC_23_JSState.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V3PortletHubTests/src/main/java/javax/portlet/tck/portlets/PortletHubTests_SPEC_23_JSState.java b/portlet-tck_3.0/V3PortletHubTests/src/main/java/javax/portlet/tck/portlets/PortletHubTests_SPEC_23_JSState.java
new file mode 100644
index 0000000..2d039f1
--- /dev/null
+++ b/portlet-tck_3.0/V3PortletHubTests/src/main/java/javax/portlet/tck/portlets/PortletHubTests_SPEC_23_JSState.java
@@ -0,0 +1,461 @@
+/*  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 javax.portlet.tck.portlets;
+
+import java.io.*;
+import java.util.*;
+import java.util.logging.*;
+import static java.util.logging.Logger.*;
+import javax.xml.namespace.QName;
+import javax.portlet.*;
+import javax.portlet.annotations.*;
+import javax.portlet.filter.*;
+import javax.servlet.*;
+import javax.servlet.http.*;
+import javax.portlet.tck.beans.*;
+import javax.portlet.tck.constants.*;
+import javax.portlet.tck.util.ModuleTestCaseDetails;
+import static javax.portlet.tck.util.ModuleTestCaseDetails.*;
+import static javax.portlet.tck.constants.Constants.*;
+import static javax.portlet.PortletSession.*;
+import static javax.portlet.ResourceURL.*;
+
+/**
+ * This portlet implements several test cases for the JSR 362 TCK. The test case names
+ * are defined in the /src/main/resources/xml-resources/additionalTCs.xml
+ * file. The build process will integrate the test case names defined in the 
+ * additionalTCs.xml file into the complete list of test case names for execution by the driver.
+ *
+ */
+
+@PortletConfiguration(portletName = "PortletHubTests_SPEC_23_JSState")
+public class PortletHubTests_SPEC_23_JSState implements Portlet {
+   
+   private PortletConfig portletConfig = null;
+
+   @Override
+   public void init(PortletConfig config) throws PortletException {
+      this.portletConfig = config;
+   }
+
+   @Override
+   public void destroy() {
+   }
+
+   @Override
+   public void processAction(ActionRequest portletReq, ActionResponse portletResp) throws PortletException, IOException {
+   }
+
+   @Override
+   public void render(RenderRequest portletReq, RenderResponse portletResp) throws PortletException, IOException {
+
+      PrintWriter writer = portletResp.getWriter();
+      ModuleTestCaseDetails tcd = new ModuleTestCaseDetails();
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_Parameters1                    */
+      /* Details: "The PortletInit object newParameters function returns a          */
+      /* Parameters object"                                                         */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_PARAMETERS1);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_Parameters2                    */
+      /* Details: "The PortletInit object newParameters function returns a          */
+      /* Parameters object containing no parameters"                                */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_PARAMETERS2);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_Parameters3                    */
+      /* Details: "The PortletInit object newParameters function returns a          */
+      /* Parameters object containing cloned values if passed a parameters object"  */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_PARAMETERS3);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_State1                         */
+      /* Details: "The PortletInit object newState function returns a State object  */
+      /* "                                                                          */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_STATE1);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_State2                         */
+      /* Details: "The PortletInit object newState function returns a State object  */
+      /* containing no parameters if not passed a State object"                     */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_STATE2);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_State3                         */
+      /* Details: "The PortletInit object newState function returns a State object  */
+      /* containing cloned values if passed a State object"                         */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_STATE3);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_clone                          */
+      /* Details: "The RenderState object clone property is type function"          */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_setPortletMode                 */
+      /* Details: "The RenderState object setPortletMode property is type function" */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETPORTLETMODE);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_getPortletMode                 */
+      /* Details: "The RenderState object getPortletMode property is type function" */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETPORTLETMODE);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_setWindowState                 */
+      /* Details: "The RenderState object setWindowState property is type function" */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETWINDOWSTATE);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_getWindowState                 */
+      /* Details: "The RenderState object getWindowState property is type function" */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETWINDOWSTATE);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_setValue                       */
+      /* Details: "The RenderState object setValue property is type function"       */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValue                       */
+      /* Details: "The RenderState object getValue property is type function"       */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValues                      */
+      /* Details: "The RenderState object getValues property is type function"      */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUES);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_remove                         */
+      /* Details: "The RenderState object remove property is type function"         */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_REMOVE);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_parameters                     */
+      /* Details: "The RenderState object parameters property is type object"       */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_PARAMETERS);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_portletMode                    */
+      /* Details: "The RenderState object portletMode property is type string"      */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_PORTLETMODE);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_windowState                    */
+      /* Details: "The RenderState object windowState property is type string"      */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_WINDOWSTATE);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_clone1                         */
+      /* Details: "The RenderState object clone function returns a new object       */
+      /* instance"                                                                  */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE1);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_clone2                         */
+      /* Details: "The RenderState object clone function returns a RenderState      */
+      /* object with the required properties"                                       */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE2);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_clone3                         */
+      /* Details: "The RenderState object clone function returns a RenderState      */
+      /* object with the same portlet mode"                                         */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE3);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_clone4                         */
+      /* Details: "The RenderState object clone function returns a RenderState      */
+      /* object with the same window state"                                         */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE4);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_clone5                         */
+      /* Details: "The RenderState object clone function returns a RenderState      */
+      /* object with no parameters if the original had no parameters"               */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE5);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_clone6                         */
+      /* Details: "The RenderState object clone function returns a RenderState      */
+      /* object with the same single-value parameters if the original had           */
+      /* single-value parameters"                                                   */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE6);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_clone7                         */
+      /* Details: "The RenderState object clone function returns a RenderState      */
+      /* object with the same multi-value parameters if the original had            */
+      /* multi-value parameters"                                                    */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE7);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_setPortletMode1                */
+      /* Details: "The RenderState object setPortletMode function throws a          */
+      /* TypeError if the argument is not a string"                                 */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETPORTLETMODE1);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_setPortletMode2                */
+      /* Details: "The RenderState object setPortletMode function sets the portlet  */
+      /* mode"                                                                      */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETPORTLETMODE2);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_getPortletMode1                */
+      /* Details: "The RenderState object getPortletMode function returns the       */
+      /* portlet mode"                                                              */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETPORTLETMODE1);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_setWindowState1                */
+      /* Details: "The RenderState object setWindowState function throws a          */
+      /* TypeError if the argument is not a string"                                 */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETWINDOWSTATE1);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_setWindowState2                */
+      /* Details: "The RenderState object setWindowState function sets the window   */
+      /* state"                                                                     */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETWINDOWSTATE2);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_getWindowState1                */
+      /* Details: "The RenderState object getWindowState function returns the       */
+      /* window state"                                                              */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETWINDOWSTATE1);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_setValue1                      */
+      /* Details: "The RenderState object setValue function throws a TypeError if   */
+      /* the parameter name is not a string"                                        */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE1);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_setValue2                      */
+      /* Details: "The RenderState object setValue function throws a TypeError if   */
+      /* the parameter value is not a string or array"                              */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE2);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_setValue3                      */
+      /* Details: "The RenderState object setValue function can set a single-valued */
+      /* parameter"                                                                 */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE3);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_setValue4                      */
+      /* Details: "The RenderState object setValue function can set a multi-valued  */
+      /* parameter"                                                                 */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE4);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_setValue5                      */
+      /* Details: "The RenderState object setValue function can set a parameter to  */
+      /* null"                                                                      */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE5);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValue1                      */
+      /* Details: "The RenderState object getValue function throws a TypeError if   */
+      /* the parameter name is not a string"                                        */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE1);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValue2                      */
+      /* Details: "The RenderState object getValue function returns a single-valued */
+      /* parameter"                                                                 */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE2);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValue3                      */
+      /* Details: "The RenderState object getValue function returns null if the     */
+      /* parameter was set to null"                                                 */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE3);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValue4                      */
+      /* Details: "The RenderState object getValue function returns the first value */
+      /* of a multi-valued parameter"                                               */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE4);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValue5                      */
+      /* Details: "The RenderState object getValue function returns undefined if    */
+      /* the parameter name does not exist and there is no default"                 */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE5);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValue6                      */
+      /* Details: "The RenderState object getValue function returns the default if  */
+      /* the parameter name does not exist and a default is provided"               */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE6);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValues1                     */
+      /* Details: "The RenderState object getValues function throws a TypeError if  */
+      /* the parameter name is not a string"                                        */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUES1);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValues2                     */
+      /* Details: "The RenderState object getValues function returns an array of    */
+      /* strings for a multi-valued parameter"                                      */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUES2);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValues3                     */
+      /* Details: "The RenderState object getValues function returns undefined if   */
+      /* the parameter name does not exist and there is no default"                 */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUES3);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValues4                     */
+      /* Details: "The RenderState object getValues function returns the default if */
+      /* the parameter name does not exist and a default is provided"               */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUES4);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_remove1                        */
+      /* Details: "The RenderState object remove function throws a TypeError if the */
+      /* parameter name is not a string"                                            */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_REMOVE1);
+         result.writeTo(writer);
+      }
+
+      /* TestCase: V3PortletHubTests_SPEC_23_JSState_remove2                        */
+      /* Details: "The RenderState object remove function removes an existing       */
+      /* parameter"                                                                 */
+      {
+         TestResultAsync result = tcd.getTestResultAsyncFailed(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_REMOVE2);
+         result.writeTo(writer);
+      }
+
+      writer.write("<script>");
+      writer.write("   var tck = tck || {};");
+      writer.write("   tck.PortletHubTests_SPEC_23_JSState = {};");
+      writer.write("   tck.PortletHubTests_SPEC_23_JSState.pid = '" + portletResp.getNamespace() + "';");
+      writer.write("</script>");
+
+      StringBuilder txt = new StringBuilder(128);
+      txt.append("<script type='text/javascript' src='");
+      txt.append(portletConfig.getPortletContext().getContextPath());
+      txt.append("/javascript/PortletHubTests_SPEC_23_JSState.js'></script>\n");
+
+      writer.write(txt.toString());
+
+
+   }
+
+}

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/1410b294/portlet-tck_3.0/V3PortletHubTests/src/main/java/javax/portlet/tck/util/ModuleTestCaseDetails.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V3PortletHubTests/src/main/java/javax/portlet/tck/util/ModuleTestCaseDetails.java b/portlet-tck_3.0/V3PortletHubTests/src/main/java/javax/portlet/tck/util/ModuleTestCaseDetails.java
index 9b32407..1588504 100644
--- a/portlet-tck_3.0/V3PortletHubTests/src/main/java/javax/portlet/tck/util/ModuleTestCaseDetails.java
+++ b/portlet-tck_3.0/V3PortletHubTests/src/main/java/javax/portlet/tck/util/ModuleTestCaseDetails.java
@@ -65,6 +65,54 @@ public class ModuleTestCaseDetails extends TestCaseDetails {
    public final static String V3PORTLETHUBTESTS_SPEC_23_JS_CONSTANTS7 = "V3PortletHubTests_SPEC_23_JS_Constants7";
    public final static String V3PORTLETHUBTESTS_SPEC_23_JS_CONSTANTS8 = "V3PortletHubTests_SPEC_23_JS_Constants8";
    public final static String V3PORTLETHUBTESTS_SPEC_23_JS_CONSTANTS9 = "V3PortletHubTests_SPEC_23_JS_Constants9";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_PARAMETERS1 = "V3PortletHubTests_SPEC_23_JSState_Parameters1";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_PARAMETERS2 = "V3PortletHubTests_SPEC_23_JSState_Parameters2";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_PARAMETERS3 = "V3PortletHubTests_SPEC_23_JSState_Parameters3";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_STATE1 = "V3PortletHubTests_SPEC_23_JSState_State1";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_STATE2 = "V3PortletHubTests_SPEC_23_JSState_State2";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_STATE3 = "V3PortletHubTests_SPEC_23_JSState_State3";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE = "V3PortletHubTests_SPEC_23_JSState_clone";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETPORTLETMODE = "V3PortletHubTests_SPEC_23_JSState_setPortletMode";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETPORTLETMODE = "V3PortletHubTests_SPEC_23_JSState_getPortletMode";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETWINDOWSTATE = "V3PortletHubTests_SPEC_23_JSState_setWindowState";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETWINDOWSTATE = "V3PortletHubTests_SPEC_23_JSState_getWindowState";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE = "V3PortletHubTests_SPEC_23_JSState_setValue";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE = "V3PortletHubTests_SPEC_23_JSState_getValue";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUES = "V3PortletHubTests_SPEC_23_JSState_getValues";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_REMOVE = "V3PortletHubTests_SPEC_23_JSState_remove";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_PARAMETERS = "V3PortletHubTests_SPEC_23_JSState_parameters";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_PORTLETMODE = "V3PortletHubTests_SPEC_23_JSState_portletMode";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_WINDOWSTATE = "V3PortletHubTests_SPEC_23_JSState_windowState";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE1 = "V3PortletHubTests_SPEC_23_JSState_clone1";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE2 = "V3PortletHubTests_SPEC_23_JSState_clone2";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE3 = "V3PortletHubTests_SPEC_23_JSState_clone3";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE4 = "V3PortletHubTests_SPEC_23_JSState_clone4";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE5 = "V3PortletHubTests_SPEC_23_JSState_clone5";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE6 = "V3PortletHubTests_SPEC_23_JSState_clone6";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE7 = "V3PortletHubTests_SPEC_23_JSState_clone7";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETPORTLETMODE1 = "V3PortletHubTests_SPEC_23_JSState_setPortletMode1";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETPORTLETMODE2 = "V3PortletHubTests_SPEC_23_JSState_setPortletMode2";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETPORTLETMODE1 = "V3PortletHubTests_SPEC_23_JSState_getPortletMode1";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETWINDOWSTATE1 = "V3PortletHubTests_SPEC_23_JSState_setWindowState1";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETWINDOWSTATE2 = "V3PortletHubTests_SPEC_23_JSState_setWindowState2";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETWINDOWSTATE1 = "V3PortletHubTests_SPEC_23_JSState_getWindowState1";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE1 = "V3PortletHubTests_SPEC_23_JSState_setValue1";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE2 = "V3PortletHubTests_SPEC_23_JSState_setValue2";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE3 = "V3PortletHubTests_SPEC_23_JSState_setValue3";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE4 = "V3PortletHubTests_SPEC_23_JSState_setValue4";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE5 = "V3PortletHubTests_SPEC_23_JSState_setValue5";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE1 = "V3PortletHubTests_SPEC_23_JSState_getValue1";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE2 = "V3PortletHubTests_SPEC_23_JSState_getValue2";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE3 = "V3PortletHubTests_SPEC_23_JSState_getValue3";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE4 = "V3PortletHubTests_SPEC_23_JSState_getValue4";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE5 = "V3PortletHubTests_SPEC_23_JSState_getValue5";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE6 = "V3PortletHubTests_SPEC_23_JSState_getValue6";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUES1 = "V3PortletHubTests_SPEC_23_JSState_getValues1";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUES2 = "V3PortletHubTests_SPEC_23_JSState_getValues2";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUES3 = "V3PortletHubTests_SPEC_23_JSState_getValues3";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUES4 = "V3PortletHubTests_SPEC_23_JSState_getValues4";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_REMOVE1 = "V3PortletHubTests_SPEC_23_JSState_remove1";
+   public final static String V3PORTLETHUBTESTS_SPEC_23_JSSTATE_REMOVE2 = "V3PortletHubTests_SPEC_23_JSState_remove2";
 
    
    private final static Map<String, String> tcd = new HashMap<String, String>();
@@ -101,6 +149,54 @@ public class ModuleTestCaseDetails extends TestCaseDetails {
       tcd.put(V3PORTLETHUBTESTS_SPEC_23_JS_CONSTANTS7, "The Constants object FULL property is type string and equal to 'cacheLevelFull'");
       tcd.put(V3PORTLETHUBTESTS_SPEC_23_JS_CONSTANTS8, "The Constants object PORTLET property is type string and equal to 'cacheLevelPortlet'");
       tcd.put(V3PORTLETHUBTESTS_SPEC_23_JS_CONSTANTS9, "The Constants object PAGE property is type string and equal to 'cacheLevelPage'");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_PARAMETERS1, "The PortletInit object newParameters function returns a Parameters object");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_PARAMETERS2, "The PortletInit object newParameters function returns a Parameters object containing no parameters");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_PARAMETERS3, "The PortletInit object newParameters function returns a Parameters object containing cloned values if passed a parameters object");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_STATE1, "The PortletInit object newState function returns a State object ");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_STATE2, "The PortletInit object newState function returns a State object containing no parameters if not passed a State object");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_STATE3, "The PortletInit object newState function returns a State object containing cloned values if passed a State object");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE, "The RenderState object clone property is type function");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETPORTLETMODE, "The RenderState object setPortletMode property is type function");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETPORTLETMODE, "The RenderState object getPortletMode property is type function");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETWINDOWSTATE, "The RenderState object setWindowState property is type function");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETWINDOWSTATE, "The RenderState object getWindowState property is type function");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE, "The RenderState object setValue property is type function");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE, "The RenderState object getValue property is type function");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUES, "The RenderState object getValues property is type function");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_REMOVE, "The RenderState object remove property is type function");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_PARAMETERS, "The RenderState object parameters property is type object");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_PORTLETMODE, "The RenderState object portletMode property is type string");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_WINDOWSTATE, "The RenderState object windowState property is type string");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE1, "The RenderState object clone function returns a new object instance");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE2, "The RenderState object clone function returns a RenderState object with the required properties");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE3, "The RenderState object clone function returns a RenderState object with the same portlet mode");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE4, "The RenderState object clone function returns a RenderState object with the same window state");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE5, "The RenderState object clone function returns a RenderState object with no parameters if the original had no parameters");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE6, "The RenderState object clone function returns a RenderState object with the same single-value parameters if the original had single-value parameters");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_CLONE7, "The RenderState object clone function returns a RenderState object with the same multi-value parameters if the original had multi-value parameters");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETPORTLETMODE1, "The RenderState object setPortletMode function throws a TypeError if the argument is not a string");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETPORTLETMODE2, "The RenderState object setPortletMode function sets the portlet mode");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETPORTLETMODE1, "The RenderState object getPortletMode function returns the portlet mode");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETWINDOWSTATE1, "The RenderState object setWindowState function throws a TypeError if the argument is not a string");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETWINDOWSTATE2, "The RenderState object setWindowState function sets the window state");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETWINDOWSTATE1, "The RenderState object getWindowState function returns the window state");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE1, "The RenderState object setValue function throws a TypeError if the parameter name is not a string");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE2, "The RenderState object setValue function throws a TypeError if the parameter value is not a string or array");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE3, "The RenderState object setValue function can set a single-valued parameter");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE4, "The RenderState object setValue function can set a multi-valued parameter");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_SETVALUE5, "The RenderState object setValue function can set a parameter to null");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE1, "The RenderState object getValue function throws a TypeError if the parameter name is not a string");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE2, "The RenderState object getValue function returns a single-valued parameter");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE3, "The RenderState object getValue function returns null if the parameter was set to null");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE4, "The RenderState object getValue function returns the first value of a multi-valued parameter");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE5, "The RenderState object getValue function returns undefined if the parameter name does not exist and there is no default");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUE6, "The RenderState object getValue function returns the default if the parameter name does not exist and a default is provided");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUES1, "The RenderState object getValues function throws a TypeError if the parameter name is not a string");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUES2, "The RenderState object getValues function returns an array of strings for a multi-valued parameter");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUES3, "The RenderState object getValues function returns undefined if the parameter name does not exist and there is no default");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_GETVALUES4, "The RenderState object getValues function returns the default if the parameter name does not exist and a default is provided");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_REMOVE1, "The RenderState object remove function throws a TypeError if the parameter name is not a string");
+      tcd.put(V3PORTLETHUBTESTS_SPEC_23_JSSTATE_REMOVE2, "The RenderState object remove function removes an existing parameter");
 
    }
 

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/1410b294/portlet-tck_3.0/V3PortletHubTests/src/main/resources/xml-resources/additionalPages.xml
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V3PortletHubTests/src/main/resources/xml-resources/additionalPages.xml b/portlet-tck_3.0/V3PortletHubTests/src/main/resources/xml-resources/additionalPages.xml
index 1bcc0cd..4cd5a7c 100644
--- a/portlet-tck_3.0/V3PortletHubTests/src/main/resources/xml-resources/additionalPages.xml
+++ b/portlet-tck_3.0/V3PortletHubTests/src/main/resources/xml-resources/additionalPages.xml
@@ -33,6 +33,7 @@
 <render-config default="About Apache Pluto">
 <page xmlns="" name="V3PortletHubTests" uri="/WEB-INF/themes/pluto-default-theme.jsp">
 <portlet context="/tck-V3PortletHubTests-3.0-SNAPSHOT" name="PortletHubTests_SPEC_23_JS"/>
+<portlet context="/tck-V3PortletHubTests-3.0-SNAPSHOT" name="PortletHubTests_SPEC_23_JSState"/>
 </page>
 </render-config>
 </pluto-portal-driver>

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/1410b294/portlet-tck_3.0/V3PortletHubTests/src/main/resources/xml-resources/additionalTCs.xml
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V3PortletHubTests/src/main/resources/xml-resources/additionalTCs.xml b/portlet-tck_3.0/V3PortletHubTests/src/main/resources/xml-resources/additionalTCs.xml
index 8822c98..d1e54bc 100644
--- a/portlet-tck_3.0/V3PortletHubTests/src/main/resources/xml-resources/additionalTCs.xml
+++ b/portlet-tck_3.0/V3PortletHubTests/src/main/resources/xml-resources/additionalTCs.xml
@@ -51,4 +51,52 @@
 <entry key="V3PortletHubTests_SPEC_23_JS_Constants7">V3PortletHubTests</entry>
 <entry key="V3PortletHubTests_SPEC_23_JS_Constants8">V3PortletHubTests</entry>
 <entry key="V3PortletHubTests_SPEC_23_JS_Constants9">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_Parameters1">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_Parameters2">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_Parameters3">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_State1">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_State2">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_State3">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_clone">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_setPortletMode">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_getPortletMode">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_setWindowState">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_getWindowState">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_setValue">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_getValue">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_getValues">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_remove">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_parameters">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_portletMode">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_windowState">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_clone1">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_clone2">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_clone3">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_clone4">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_clone5">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_clone6">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_clone7">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_setPortletMode1">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_setPortletMode2">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_getPortletMode1">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_setWindowState1">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_setWindowState2">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_getWindowState1">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_setValue1">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_setValue2">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_setValue3">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_setValue4">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_setValue5">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_getValue1">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_getValue2">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_getValue3">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_getValue4">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_getValue5">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_getValue6">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_getValues1">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_getValues2">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_getValues3">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_getValues4">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_remove1">V3PortletHubTests</entry>
+<entry key="V3PortletHubTests_SPEC_23_JSState_remove2">V3PortletHubTests</entry>
 </properties>

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/1410b294/portlet-tck_3.0/V3PortletHubTests/src/main/webapp/javascript/PortletHubTests_SPEC_23_JS.js
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V3PortletHubTests/src/main/webapp/javascript/PortletHubTests_SPEC_23_JS.js b/portlet-tck_3.0/V3PortletHubTests/src/main/webapp/javascript/PortletHubTests_SPEC_23_JS.js
index fecf08b..f4fd6b6 100644
--- a/portlet-tck_3.0/V3PortletHubTests/src/main/webapp/javascript/PortletHubTests_SPEC_23_JS.js
+++ b/portlet-tck_3.0/V3PortletHubTests/src/main/webapp/javascript/PortletHubTests_SPEC_23_JS.js
@@ -19,7 +19,7 @@
 
 (function() {
    'use strict';
-   var portletName = 'PortletHubTests_SPEC_23_JS';
+   var portletName = 'PortletHubTests_SPEC_23_JS', msg;
 
    function setSuccess (tc, fail) {
       var el;
@@ -35,15 +35,44 @@
    }
 
    function testException (func, type) {
-      var ok = false;
+      var ok = null;
       try {
          func();
+         ok = 'Function did not throw exception';
       } catch (e) {
-         ok = (e.name === type);
+         if (e.name !== type) {
+            ok = 'Invalid exception type: ' + e.name;
+         }
       }
       return ok;
    }
 
+   function checkParams (p1, p2) {
+      var fail = null, key, keys = Object.keys(p1), ii, jj;
+      if (keys.length !== Object.keys(p2).length) {
+         fail = 'Cloned parameters have different numbers of keys';
+      } else {
+         for (ii = 0; ii < keys.length && fail === null; ii++) {
+            key = keys[ii];
+            if (!Array.isArray(p1[key]) || !Array.isArray(p2[key])) {
+               fail = 'Parameter value is not array for key: ' + key;
+               break;
+            }
+            if (p1[key].length !== p2[key].length) {
+               fail = 'Value arrays not equal for key: ' + key;
+               break;
+            }
+            for (jj = 0; jj < p1[key].length; jj++) {
+               if (p1[key][jj] !== p2[key][jj]) {
+                  fail = 'Value arrays not equal for key: ' + key;
+                  break;
+               }
+            }
+         }
+      }
+      return fail;
+   }
+
    function execute () {
       var update, testFunction,
           pid = tck.PortletHubTests_SPEC_23_JS.pid;
@@ -67,9 +96,8 @@
       testFunction = function () {
          portlet.register();
       }
-      if (testException(testFunction, "IllegalArgumentException")) {
-        setSuccess('V3PortletHubTests_SPEC_23_JS_register3');
-      }
+      msg = testException(testFunction, "IllegalArgumentException");
+      setSuccess('V3PortletHubTests_SPEC_23_JS_register3', msg);
 
       /* TestCase: V3PortletHubTests_SPEC_23_JS_register4                           */
       /* Details: "The portlet hub register function throws an                      */
@@ -77,9 +105,8 @@
       testFunction = function () {
          portlet.register("InvalidPortletID1", "InvalidPortletID2");
       }
-      if (testException(testFunction, "IllegalArgumentException")) {
-        setSuccess('V3PortletHubTests_SPEC_23_JS_register4');
-      }
+      msg = testException(testFunction, "IllegalArgumentException");
+      setSuccess('V3PortletHubTests_SPEC_23_JS_register4', msg);
 
       /* TestCase: V3PortletHubTests_SPEC_23_JS_register5                           */
       /* Details: "The portlet hub register function throws an                      */
@@ -87,9 +114,8 @@
       testFunction = function () {
          portlet.register(89);
       }
-      if (testException(testFunction, "IllegalArgumentException")) {
-        setSuccess('V3PortletHubTests_SPEC_23_JS_register5');
-      }
+      msg = testException(testFunction, "IllegalArgumentException");
+      setSuccess('V3PortletHubTests_SPEC_23_JS_register5', msg);
 
       /* TestCase: V3PortletHubTests_SPEC_23_JS_register6                           */
       /* Details: "The portlet hub register function throws an                      */
@@ -97,9 +123,8 @@
       testFunction = function () {
          portlet.register(undefined);
       }
-      if (testException(testFunction, "IllegalArgumentException")) {
-        setSuccess('V3PortletHubTests_SPEC_23_JS_register6');
-      }
+      msg = testException(testFunction, "IllegalArgumentException");
+      setSuccess('V3PortletHubTests_SPEC_23_JS_register6', msg);
 
       /* TestCase: V3PortletHubTests_SPEC_23_JS_register7                           */
       /* Details: "The portlet hub register function throws an                      */
@@ -107,9 +132,8 @@
       testFunction = function () {
          portlet.register(null);
       }
-      if (testException(testFunction, "IllegalArgumentException")) {
-        setSuccess('V3PortletHubTests_SPEC_23_JS_register7');
-      }
+      msg = testException(testFunction, "IllegalArgumentException");
+      setSuccess('V3PortletHubTests_SPEC_23_JS_register7', msg);
 
       /* TestCase: V3PortletHubTests_SPEC_23_JS_register8                           */
       /* Details: "The portlet hub register function The promise fails if the       */

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/1410b294/portlet-tck_3.0/V3PortletHubTests/src/main/webapp/javascript/PortletHubTests_SPEC_23_JSState.js
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V3PortletHubTests/src/main/webapp/javascript/PortletHubTests_SPEC_23_JSState.js b/portlet-tck_3.0/V3PortletHubTests/src/main/webapp/javascript/PortletHubTests_SPEC_23_JSState.js
new file mode 100644
index 0000000..0341fb0
--- /dev/null
+++ b/portlet-tck_3.0/V3PortletHubTests/src/main/webapp/javascript/PortletHubTests_SPEC_23_JSState.js
@@ -0,0 +1,553 @@
+/*  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.
+ */
+
+
+(function() {
+   'use strict';
+   var portletName = 'PortletHubTests_SPEC_23_JSState', msg;
+
+   function setSuccess (tc, fail) {
+      var el;
+      el = document.getElementById(tc + '-async');
+      if (el !== null) {
+         if (fail) {
+            el.innerHTML = fail;
+         } else {
+            el.innerHTML = 'Test Succeeded';
+         }
+         el.id = tc + '-result';
+      }
+   }
+
+   function testException (func, type) {
+      var ok = null;
+      try {
+         func();
+         ok = 'Function did not throw exception';
+      } catch (e) {
+         if (e.name !== type) {
+            ok = 'Invalid exception type: ' + e.name;
+         }
+      }
+      return ok;
+   }
+
+   function checkParams (p1, p2) {
+      var fail = null, key, keys = Object.keys(p1), ii, jj;
+      if (keys.length !== Object.keys(p2).length) {
+         fail = 'Cloned parameters have different numbers of keys';
+      } else {
+         for (ii = 0; ii < keys.length && fail === null; ii++) {
+            key = keys[ii];
+            if (!Array.isArray(p1[key]) || !Array.isArray(p2[key])) {
+               fail = 'Parameter value is not array for key: ' + key;
+               break;
+            }
+            if (p1[key].length !== p2[key].length) {
+               fail = 'Value arrays not equal for key: ' + key;
+               break;
+            }
+            for (jj = 0; jj < p1[key].length; jj++) {
+               if (p1[key][jj] !== p2[key][jj]) {
+                  fail = 'Value arrays not equal for key: ' + key;
+                  break;
+               }
+            }
+         }
+      }
+      return fail;
+   }
+
+   function execute () {
+      var update, testFunction,
+          pid = tck.PortletHubTests_SPEC_23_JSState.pid;
+
+      update = function (type, state) {
+
+      }
+
+      portlet.register(pid).then(function (hub) {
+         var state, params, newState, newParams;
+
+         state = hub.newState();
+         params = hub.newParameters();
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_Parameters1                    */
+         /* Details: "The PortletInit object newParameters function returns a          */
+         /* Parameters object"                                                         */
+         if (typeof params === 'object') {
+           setSuccess('V3PortletHubTests_SPEC_23_JSState_Parameters1');
+         }
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_Parameters2                    */
+         /* Details: "The PortletInit object newParameters function returns a          */
+         /* Parameters object containing no parameters"                                */
+         if (Object.keys(params).length === 0) {
+           setSuccess('V3PortletHubTests_SPEC_23_JSState_Parameters2');
+         }
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_Parameters3                    */
+         /* Details: "The PortletInit object newParameters function returns a          */
+         /* Parameters object containing cloned values if passed a parameters object"  */
+         params.param1 = ['val1', 'val2'];
+         newParams = hub.newParameters(params);
+         msg = checkParams(params, newParams);
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_Parameters3', msg);
+         params = hub.newParameters();
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_State1                         */
+         /* Details: "The PortletInit object newState function returns a State object  */
+         /* "                                                                          */
+         if (typeof state === 'object') {
+           setSuccess('V3PortletHubTests_SPEC_23_JSState_State1');
+         }
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_State2                         */
+         /* Details: "The PortletInit object newState function returns a State object  */
+         /* containing no parameters if not passed a State object"                     */
+         if (Object.keys(state.parameters).length === 0) {
+           setSuccess('V3PortletHubTests_SPEC_23_JSState_State2');
+         }
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_State3                         */
+         /* Details: "The PortletInit object newState function returns a State object  */
+         /* containing cloned values if passed a State object"                         */
+         state.parameters.param1 = ['val1', 'val2'];
+         newState = hub.newState(state);
+         msg = checkParams(state.parameters, newState.parameters);
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_State3', msg);
+         state = hub.newState();
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_clone                          */
+         /* Details: "The RenderState object clone property is type function"          */
+         if (typeof state.clone === 'function') {
+            setSuccess('V3PortletHubTests_SPEC_23_JSState_clone');
+         }
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_setPortletMode                 */
+         /* Details: "The RenderState object setPortletMode property is type function" */
+         if (typeof state.setPortletMode === 'function') {
+            setSuccess('V3PortletHubTests_SPEC_23_JSState_setPortletMode');
+         }
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_getPortletMode                 */
+         /* Details: "The RenderState object getPortletMode property is type function" */
+         if (typeof state.getPortletMode === 'function') {
+            setSuccess('V3PortletHubTests_SPEC_23_JSState_getPortletMode');
+         }
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_setWindowState                 */
+         /* Details: "The RenderState object setWindowState property is type function" */
+         if (typeof state.setWindowState === 'function') {
+            setSuccess('V3PortletHubTests_SPEC_23_JSState_setWindowState');
+         }
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_getWindowState                 */
+         /* Details: "The RenderState object getWindowState property is type function" */
+         if (typeof state.getWindowState === 'function') {
+            setSuccess('V3PortletHubTests_SPEC_23_JSState_getWindowState');
+         }
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_setValue                       */
+         /* Details: "The RenderState object setValue property is type function"       */
+         if (typeof state.setValue === 'function') {
+            setSuccess('V3PortletHubTests_SPEC_23_JSState_setValue');
+         }
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValue                       */
+         /* Details: "The RenderState object getValue property is type function"       */
+         if (typeof state.getValue === 'function') {
+            setSuccess('V3PortletHubTests_SPEC_23_JSState_getValue');
+         }
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValues                      */
+         /* Details: "The RenderState object getValues property is type function"      */
+         if (typeof state.getValues === 'function') {
+            setSuccess('V3PortletHubTests_SPEC_23_JSState_getValues');
+         }
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_remove                         */
+         /* Details: "The RenderState object remove property is type function"         */
+         if (typeof state.remove === 'function') {
+            setSuccess('V3PortletHubTests_SPEC_23_JSState_remove');
+         }
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_parameters                     */
+         /* Details: "The RenderState object parameters property is type object"       */
+         if (typeof state.parameters === 'object') {
+            setSuccess('V3PortletHubTests_SPEC_23_JSState_parameters');
+         }
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_portletMode                    */
+         /* Details: "The RenderState object portletMode property is type string"      */
+         if (typeof state.portletMode === 'string') {
+            setSuccess('V3PortletHubTests_SPEC_23_JSState_portletMode');
+         }
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_windowState                    */
+         /* Details: "The RenderState object windowState property is type string"      */
+         if (typeof state.windowState === 'string') {
+            setSuccess('V3PortletHubTests_SPEC_23_JSState_windowState');
+         }
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_clone1                         */
+         /* Details: "The RenderState object clone function returns a new object       */
+         /* instance"                                                                  */
+         state = hub.newState();
+         state.setPortletMode('VIEW');
+         state.setWindowState('NORMAL');
+         newState = state.clone();
+         msg = null;
+         if (state === newState) {
+            msg = 'cloned object is same instance as original.';
+         }
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_clone1', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_clone2                         */
+         /* Details: "The RenderState object clone function returns a RenderState      */
+         /* object with the required properties"                                       */
+         state = hub.newState();
+         newState = state.clone();
+         msg = null;
+         if (typeof newState !== 'object') {
+            msg = 'Cloned state is not of type object';
+         } else if (typeof newState.clone  !== 'function') {
+            msg = 'clone function is not a function';
+         } else if (typeof newState.setPortletMode  !== 'function') {
+            msg = 'setPortletMode function is not a function';
+         } else if (typeof newState.getPortletMode  !== 'function') {
+            msg = 'getPortletMode function is not a function';
+         } else if (typeof newState.setWindowState  !== 'function') {
+            msg = 'setWindowState function is not a function';
+         } else if (typeof newState.getWindowState  !== 'function') {
+            msg = 'getWindowState function is not a function';
+         } else if (typeof newState.setValue  !== 'function') {
+            msg = 'setValue function is not a function';
+         } else if (typeof newState.getValue  !== 'function') {
+            msg = 'getValue function is not a function';
+         } else if (typeof newState.getValues  !== 'function') {
+            msg = 'getValues function is not a function';
+         } else if (typeof newState.remove  !== 'function') {
+            msg = 'remove function is not a function';
+         } else if (typeof newState.parameters  !== 'object') {
+            msg = 'parameters is not of type object';
+         } else if (typeof newState.portletMode  !== 'string') {
+            msg = 'portletMode is not of type string';
+         } else if (typeof newState.windowState  !== 'string') {
+            msg = 'windowState is not of type string';
+         }
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_clone2', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_clone3                         */
+         /* Details: "The RenderState object clone function returns a RenderState      */
+         /* object with the same portlet mode"                                         */
+         state = hub.newState();
+         state.setPortletMode('VIEW');
+         state.setWindowState('NORMAL');
+         newState = state.clone();
+         msg = null;
+         if (state.portletMode !== 'VIEW' || state.portletMode !== newState.portletMode) {
+            msg = 'Portlet mode invalid: ' + newState.portletMode;
+         }
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_clone3', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_clone4                         */
+         /* Details: "The RenderState object clone function returns a RenderState      */
+         /* object with the same window state"                                         */
+         state = hub.newState();
+         state.setPortletMode('VIEW');
+         state.setWindowState('NORMAL');
+         newState = state.clone();
+         msg = null;
+         if (state.windowState !== 'NORMAL' || state.windowState !== newState.windowState) {
+            msg = 'Window State invalid: ' + newState.windowState;
+         }
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_clone4', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_clone5                         */
+         /* Details: "The RenderState object clone function returns a RenderState      */
+         /* object with no parameters if the original had no parameters"               */
+         state = hub.newState();
+         state.setPortletMode('VIEW');
+         state.setWindowState('NORMAL');
+         newState = state.clone();
+         msg = null;
+         params = hub.newParameters();
+         msg = checkParams(state.parameters, params);
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_clone5', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_clone6                         */
+         /* Details: "The RenderState object clone function returns a RenderState      */
+         /* object with the same single-value parameters if the original had           */
+         /* single-value parameters"                                                   */
+         state = hub.newState();
+         state.parameters.param1 = ['val1'];
+         newState = state.clone();
+         msg = checkParams(state.parameters, newState.parameters);
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_clone6', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_clone7                         */
+         /* Details: "The RenderState object clone function returns a RenderState      */
+         /* object with the same multi-value parameters if the original had            */
+         /* multi-value parameters"                                                    */
+         state = hub.newState();
+         state.parameters.param1 = ['val1', 'val2'];
+         newState = state.clone();
+         msg = checkParams(state.parameters, newState.parameters);
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_clone7', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_setPortletMode1                */
+         /* Details: "The RenderState object setPortletMode function throws a          */
+         /* TypeError if the argument is not a string"                                 */
+         testFunction = function () {
+            state.setPortletMode(function(){});
+         }
+         msg = testException(testFunction, 'TypeError');
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_setPortletMode1', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_setPortletMode2                */
+         /* Details: "The RenderState object setPortletMode function sets the portlet  */
+         /* mode"                                                                      */
+         state.setPortletMode('HELP');
+         msg = null;
+         if (state.portletMode !== 'HELP') {
+            msg = 'Portlet mode incorrectly set: ' + state.portletMode;
+         }
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_setPortletMode2', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_getPortletMode1                */
+         /* Details: "The RenderState object getPortletMode function returns the       */
+         /* portlet mode"                                                              */
+         state.portletMode = 'EDIT';
+         msg = null;
+         if (state.getPortletMode() !== 'EDIT') {
+            msg = 'Portlet mode incorrectly retrieved: ' + state.getPortletMode();
+         }
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_getPortletMode1', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_setWindowState1                */
+         /* Details: "The RenderState object setWindowState function throws a          */
+         /* TypeError if the argument is not a string"                                 */
+         testFunction = function () {
+            state.setWindowState(function(){});
+         }
+         msg = testException(testFunction, 'TypeError');
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_setWindowState1', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_setWindowState2                */
+         /* Details: "The RenderState object setWindowState function sets the window   */
+         /* state"                                                                     */
+         state.setWindowState('NORMAL');
+         msg = null;
+         if (state.windowState !== 'NORMAL') {
+            msg = 'Window state incorrectly set: ' + state.windowState;
+         }
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_setWindowState2', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_getWindowState1                */
+         /* Details: "The RenderState object getWindowState function returns the       */
+         /* window state"                                                              */
+         state.windowState = 'NORMAL';
+         msg = null;
+         if (state.getWindowState() !== 'NORMAL') {
+            msg = 'Window state incorrectly retrieved: ' + state.getWindowState();
+         }
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_getWindowState1', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_setValue1                      */
+         /* Details: "The RenderState object setValue function throws a TypeError if   */
+         /* the parameter name is not a string"                                        */
+         testFunction = function () {
+            state.setValue(null, 'val1');
+         }
+         msg = testException(testFunction, 'TypeError');
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_setValue1', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_setValue2                      */
+         /* Details: "The RenderState object setValue function throws a TypeError if   */
+         /* the parameter value is not a string or array"                              */
+         testFunction = function () {
+            state.setValue('param1', function(){});
+         }
+         msg = testException(testFunction, 'TypeError');
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_setValue2', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_setValue3                      */
+         /* Details: "The RenderState object setValue function can set a single-valued */
+         /* parameter"                                                                 */
+         state = hub.newState();
+         params = hub.newParameters();
+         msg = null;
+         params.param1 = ['val1'];
+         state.setValue('param1', ['val1']);
+         msg = checkParams(params, state.parameters);
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_setValue3', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_setValue4                      */
+         /* Details: "The RenderState object setValue function can set a multi-valued  */
+         /* parameter"                                                                 */
+         state = hub.newState();
+         params = hub.newParameters();
+         msg = null;
+         msg = checkParams(params, state.parameters);
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_setValue4', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_setValue5                      */
+         /* Details: "The RenderState object setValue function can set a parameter to  */
+         /* null"                                                                      */
+         state = hub.newState();
+         params = hub.newParameters();
+         msg = null;
+         params.param1 = [null];
+         state.setValue('param1', null);
+         msg = checkParams(params, state.parameters);
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_setValue5', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValue1                      */
+         /* Details: "The RenderState object getValue function throws a TypeError if   */
+         /* the parameter name is not a string"                                        */
+         testFunction = function () {
+            state.getValue(function(){});
+         }
+         msg = testException(testFunction, 'TypeError');
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_getValue1', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValue2                      */
+         /* Details: "The RenderState object getValue function returns a single-valued */
+         /* parameter"                                                                 */
+         state = hub.newState();
+         msg = null;
+         state.setValue('param1', ['val1']);
+         if ('val1' !== state.getValue('param1')) {
+            msg = 'Bad parameter value, expecting: ' + params;
+         }
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_getValue2', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValue3                      */
+         /* Details: "The RenderState object getValue function returns null if the     */
+         /* parameter was set to null"                                                 */
+         state = hub.newState();
+         msg = null;
+         state.setValue('param1', null);
+         if (null !== state.getValue('param1')) {
+            msg = 'Bad parameter value, expecting: ' + params;
+         }
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_getValue3', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValue4                      */
+         /* Details: "The RenderState object getValue function returns the first value */
+         /* of a multi-valued parameter"                                               */
+         state = hub.newState();
+         msg = null;
+         state.setValue('param1', ['val1', 'val2']);
+         if ('val1' !== state.getValue('param1')) {
+            msg = 'Bad parameter value, expecting: ' + params;
+         }
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_getValue4', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValue5                      */
+         /* Details: "The RenderState object getValue function returns undefined if    */
+         /* the parameter name does not exist and there is no default"                 */
+         state = hub.newState();
+         msg = null;
+         if (state.getValue('param1') !== undefined) {
+            msg = 'Bad parameter value, expecting: undefined, got: ' + state.getValue('param1');
+         }
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_getValue5', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValue6                      */
+         /* Details: "The RenderState object getValue function returns the default if  */
+         /* the parameter name does not exist and a default is provided"               */
+         state = hub.newState();
+         msg = null;
+         if ('val1' !== state.getValue('param1', 'val1')) {
+            msg = 'Bad parameter value, expecting: ' + params;
+         }
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_getValue6', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValues1                     */
+         /* Details: "The RenderState object getValues function throws a TypeError if  */
+         /* the parameter name is not a string"                                        */
+         testFunction = function () {
+            state.getValues(function(){});
+         }
+         msg = testException(testFunction, 'TypeError');
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_getValues1', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValues2                     */
+         /* Details: "The RenderState object getValues function returns an array of    */
+         /* strings for a multi-valued parameter"                                      */
+         state = hub.newState();
+         msg = null;
+         params = hub.newParameters();
+         newParams = hub.newParameters();
+         params.param1 = ['val1', 'val2'];
+         state.setValue('param1', ['val1', 'val2']);
+         newParams.param1 = state.getValues('param1');
+         msg = checkParams(params, newParams);
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_getValues2', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValues3                     */
+         /* Details: "The RenderState object getValues function returns undefined if   */
+         /* the parameter name does not exist and there is no default"                 */
+         state = hub.newState();
+         msg = null;
+         if (state.getValues('param1') !== undefined) {
+            msg = 'Bad parameter value, expecting: undefined, got: ' + state.getValue('param1');
+         }
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_getValues3', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_getValues4                     */
+         /* Details: "The RenderState object getValues function returns the default if */
+         /* the parameter name does not exist and a default is provided"               */
+         state = hub.newState();
+         msg = null;
+         params = hub.newParameters();
+         newParams = hub.newParameters();
+         params.param1 = ['val1', 'val2'];
+         newParams.param1 = state.getValues('param1', ['val1', 'val2']);
+         msg = checkParams(params, newParams);
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_getValues4', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_remove1                        */
+         /* Details: "The RenderState object remove function throws a TypeError if the */
+         /* parameter name is not a string"                                            */
+         testFunction = function () {
+            state.remove(function(){});
+         }
+         msg = testException(testFunction, 'TypeError');
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_remove1', msg);
+   
+         /* TestCase: V3PortletHubTests_SPEC_23_JSState_remove2                        */
+         /* Details: "The RenderState object remove function removes an existing       */
+         /* parameter"                                                                 */
+         state = hub.newState();
+         state.setValue('param1', ['val1']);
+         state.remove('param1');
+         msg = null;
+         if (state.getValues('param1') !== undefined) {
+            msg = 'Parameter was not removed, expecting: undefined, got: ' + state.getValue('param1');
+         }
+         setSuccess('V3PortletHubTests_SPEC_23_JSState_remove2', msg);
+
+      });
+   }
+
+   window.addEventListener('load', execute);
+}());
+


Mime
View raw message