You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pluto-scm@portals.apache.org by as...@apache.org on 2018/02/27 17:40:03 UTC

[1/2] portals-pluto git commit: PLUTO-664 - TCK: Contesting V2RequestTests_ClientDataRequest_ApiAction_getReader2 and _getPortletInputStream2

Repository: portals-pluto
Updated Branches:
  refs/heads/master 7dd853690 -> d4ab596f4


PLUTO-664 - TCK: Contesting V2RequestTests_ClientDataRequest_ApiAction_getReader2 and _getPortletInputStream2


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

Branch: refs/heads/master
Commit: 13c59355f0956b73a76117fb74310a392410c374
Parents: 0efe709
Author: vsingleton <vs...@gmail.com>
Authored: Tue Aug 15 20:52:37 2017 -0400
Committer: vsingleton <vs...@gmail.com>
Committed: Tue Aug 15 20:52:37 2017 -0400

----------------------------------------------------------------------
 ...equestTests_ClientDataRequest_ApiAction.java | 37 +++++++++++++-------
 .../javax/portlet/tck/beans/TestButton.java     | 11 +++++-
 2 files changed, 34 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/13c59355/portlet-tck_3.0/V2RequestTests/src/main/java/javax/portlet/tck/portlets/RequestTests_ClientDataRequest_ApiAction.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/V2RequestTests/src/main/java/javax/portlet/tck/portlets/RequestTests_ClientDataRequest_ApiAction.java b/portlet-tck_3.0/V2RequestTests/src/main/java/javax/portlet/tck/portlets/RequestTests_ClientDataRequest_ApiAction.java
index ba5bc79..9902033 100644
--- a/portlet-tck_3.0/V2RequestTests/src/main/java/javax/portlet/tck/portlets/RequestTests_ClientDataRequest_ApiAction.java
+++ b/portlet-tck_3.0/V2RequestTests/src/main/java/javax/portlet/tck/portlets/RequestTests_ClientDataRequest_ApiAction.java
@@ -128,13 +128,17 @@ public class RequestTests_ClientDataRequest_ApiAction implements Portlet, Resour
       TestResult tr1 = tcd.getTestResultFailed(V2REQUESTTESTS_CLIENTDATAREQUEST_APIACTION_GETPORTLETINPUTSTREAM2);
       String getparm2=portletReq.getParameter(V2REQUESTTESTS_CLIENTDATAREQUEST_APIACTION_GETPORTLETINPUTSTREAM2);
       if(getparm2!=null && getparm2.equals(V2REQUESTTESTS_CLIENTDATAREQUEST_APIACTION_GETPORTLETINPUTSTREAM2)) {
-    	  try {
-    		  portletReq.getReader(); 
-    		  portletReq.getPortletInputStream();
-    		  tr1.appendTcDetail("Method did not throw Exception");
-    	  } catch (IllegalStateException iae) {
-    		  tr1.setTcSuccess(true);
-    	  }
+          try {
+              portletReq.getReader();
+              try {
+                  portletReq.getPortletInputStream();
+                  tr1.appendTcDetail("Method did not throw Exception");
+              } catch (IllegalStateException ise) {
+                  tr1.setTcSuccess(true);
+              }
+          } catch (IllegalStateException ise) {
+              tr1.appendTcDetail("getReader should not throw an exception, but did throw an IllegalStateException.");
+          }
       } else {
     	  portletResp.setRenderParameter(V2REQUESTTESTS_CLIENTDATAREQUEST_APIACTION_GETPORTLETINPUTSTREAM2, V2REQUESTTESTS_CLIENTDATAREQUEST_APIACTION_GETPORTLETINPUTSTREAM2);
       }
@@ -252,12 +256,17 @@ public class RequestTests_ClientDataRequest_ApiAction implements Portlet, Resour
       TestResult tr8 = tcd.getTestResultFailed(V2REQUESTTESTS_CLIENTDATAREQUEST_APIACTION_GETREADER2);
       String getRead2=portletReq.getParameter(V2REQUESTTESTS_CLIENTDATAREQUEST_APIACTION_GETREADER2);
       if(getRead2!=null && getRead2.equals(V2REQUESTTESTS_CLIENTDATAREQUEST_APIACTION_GETREADER2)) {
-    	  try {
-    		  portletReq.getPortletInputStream();
-    		  tr8.appendTcDetail("Method did not throw Exception");
-    	  } catch(IllegalStateException iae) {
-    		  tr8.setTcSuccess(true);
-    	  }
+          try {
+              portletReq.getPortletInputStream();
+              try {
+                  portletReq.getReader();
+                  tr8.appendTcDetail("Method did not throw Exception");
+              } catch (IllegalStateException ise) {
+                  tr8.setTcSuccess(true);
+              }
+          } catch (IllegalStateException ise) {
+              tr1.appendTcDetail("getPortletInputStream should not throw an exception, but did throw an IllegalStateException.");
+          }
       } else {
     	  portletResp.setRenderParameter(V2REQUESTTESTS_CLIENTDATAREQUEST_APIACTION_GETREADER2, V2REQUESTTESTS_CLIENTDATAREQUEST_APIACTION_GETREADER2);
       }
@@ -457,6 +466,7 @@ public class RequestTests_ClientDataRequest_ApiAction implements Portlet, Resour
          PortletURL aurl = portletResp.createActionURL();
          aurl.setParameter(V2REQUESTTESTS_CLIENTDATAREQUEST_APIACTION_GETPORTLETINPUTSTREAM2, V2REQUESTTESTS_CLIENTDATAREQUEST_APIACTION_GETPORTLETINPUTSTREAM2);
          TestButton tb = new TestButton(V2REQUESTTESTS_CLIENTDATAREQUEST_APIACTION_GETPORTLETINPUTSTREAM2, aurl);
+         tb.setEncType("text/plain");
          tb.writeTo(writer);
       }
 
@@ -531,6 +541,7 @@ public class RequestTests_ClientDataRequest_ApiAction implements Portlet, Resour
          PortletURL aurl = portletResp.createActionURL();
          aurl.setParameter(V2REQUESTTESTS_CLIENTDATAREQUEST_APIACTION_GETREADER2, V2REQUESTTESTS_CLIENTDATAREQUEST_APIACTION_GETREADER2);
          TestButton tb = new TestButton(V2REQUESTTESTS_CLIENTDATAREQUEST_APIACTION_GETREADER2, aurl);
+         tb.setEncType("text/plain");
          tb.writeTo(writer);
       }
 

http://git-wip-us.apache.org/repos/asf/portals-pluto/blob/13c59355/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestButton.java
----------------------------------------------------------------------
diff --git a/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestButton.java b/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestButton.java
index ccdd6be..a025c40 100644
--- a/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestButton.java
+++ b/portlet-tck_3.0/common/src/main/java/javax/portlet/tck/beans/TestButton.java
@@ -53,6 +53,7 @@ public class TestButton {
    protected String     actId;
    protected String     title = " Execute Button:";
    protected String     paramName;
+   protected String     encType;
 
 
    /**
@@ -99,6 +100,10 @@ public class TestButton {
       this.actId = tcName + Constants.CLICK_ID;
    }
 
+   public void setEncType(String type) {
+      this.encType = type;
+   }
+
    /**
     * Generates HTML markup representing the test link.
     * 
@@ -120,7 +125,11 @@ public class TestButton {
       sb.append(tcName);
       sb.append(title);
       sb.append("</h4>\n");
-      sb.append("<form  class='portletTCKButton'" + " action='" + urlstr + "' method='post'>\n");
+      sb.append("<form  class='portletTCKButton'" + " action='" + urlstr + "' method='post' ");
+      if (encType != null) {
+         sb.append("enctype='" + encType + "' ");
+      }
+      sb.append(">\n");
       sb.append("<input type='submit' value='").append(paramName);
       sb.append("'  name='").append(Constants.BUTTON_PARAM_NAME);
       sb.append("'  id='").append(actId);


[2/2] portals-pluto git commit: PLUTO-664 TCK: Contesting V2RequestTests_ClientDataRequest_ApiAction

Posted by as...@apache.org.
PLUTO-664 TCK: Contesting V2RequestTests_ClientDataRequest_ApiAction


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

Branch: refs/heads/master
Commit: d4ab596f49c6269945eb425c374dd86c44f5a39e
Parents: 7dd8536 13c5935
Author: Neil Griffin <ne...@gmail.com>
Authored: Tue Feb 27 12:34:44 2018 -0500
Committer: Neil Griffin <ne...@gmail.com>
Committed: Tue Feb 27 12:35:44 2018 -0500

----------------------------------------------------------------------
 ...equestTests_ClientDataRequest_ApiAction.java | 37 +++++++++++++-------
 .../javax/portlet/tck/beans/TestButton.java     | 11 +++++-
 2 files changed, 34 insertions(+), 14 deletions(-)
----------------------------------------------------------------------