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 cd...@apache.org on 2007/09/01 14:51:28 UTC
svn commit: r571792 [2/2] - in
/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite: ./
src/assemble/ src/main/java/org/apache/pluto/testsuite/
src/main/java/org/apache/pluto/testsuite/test/
src/main/java/org/apache/pluto/testsuite/validator/ sr...
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceCommonTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceCommonTest.java?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceCommonTest.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceCommonTest.java Sat Sep 1 05:51:24 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 2003,2004 The Apache Software Foundation.
- *
- * Licensed 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
+ * 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
*
@@ -30,36 +31,35 @@
/**
* Common portlet preferences test.
- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>
*/
public class PreferenceCommonTest extends AbstractReflectivePortletTest {
-
+
/** Logger. */
private static final Log LOG = LogFactory.getLog(PreferenceCommonTest.class);
-
+
protected static final String BOGUS_KEY = "org.apache.pluto.testsuite.BOGUS_KEY";
-
+
protected static final String READ_ONLY_PREF_NAME = "readonly";
-
+
protected static final String NO_VALUE_PREF_NAME = "nameWithNoValue";
-
+
protected static final String PREF_NAME = "dummyName";
protected static final String PREF_VALUE = "dummyValue";
-
+
protected static final String DEF_VALUE = "Default";
protected static final String NEW_VALUE = "notTheOriginal";
-
-
+
+
// Test Methods ------------------------------------------------------------
-
+
protected TestResult checkGetEmptyPreference(PortletRequest request) {
return doCheckDefaultPreference(request, "nonexistence!");
}
-
+
protected TestResult checkGetNoValuePreference(PortletRequest request) {
return doCheckDefaultPreference(request, NO_VALUE_PREF_NAME);
}
-
+
/**
* Private method that checks if a preference is not defined or has no
* value in <code>portlet.xml</code>, the default values are returned.
@@ -74,7 +74,7 @@
result.setDescription("Ensure proper default is returned when "
+ "a non-existing/value-undefined preference is requested.");
result.setSpecPLT("14.1");
-
+
PortletPreferences preferences = request.getPreferences();
String value = preferences.getValue(preferenceName, DEF_VALUE);
String[] values = preferences.getValues(preferenceName,
@@ -100,7 +100,7 @@
result.setDescription("Ensure that preferences defined "
+ "in the deployment descriptor may be retrieved.");
result.setSpecPLT("14.1");
-
+
PortletPreferences preferences = request.getPreferences();
String value = preferences.getValue(PREF_NAME, DEF_VALUE);
if (value != null && value.equals(PREF_VALUE)) {
@@ -110,12 +110,12 @@
}
return result;
}
-
+
protected TestResult checkSetPreferenceSingleValue(PortletRequest request) {
TestResult result = new TestResult();
result.setDescription("Ensure a single preference value can be set.");
result.setSpecPLT("14.1");
-
+
PortletPreferences preferences = request.getPreferences();
try {
preferences.setValue("TEST", "TEST_VALUE");
@@ -123,7 +123,7 @@
TestUtils.failOnException("Unable to set preference value.", ex, result);
return result;
}
-
+
String value = preferences.getValue("TEST", DEF_VALUE);
if (value != null && value.equals("TEST_VALUE")) {
result.setReturnCode(TestResult.PASSED);
@@ -137,7 +137,7 @@
TestResult result = new TestResult();
result.setDescription("Ensure multiple preference values can be set.");
result.setSpecPLT("14.1");
-
+
PortletPreferences preferences = request.getPreferences();
try {
preferences.setValues("TEST", new String[] {"ONE", "ANOTHER"});
@@ -168,12 +168,12 @@
}
return result;
}
-
+
protected TestResult checkSetPreferenceNull(PortletRequest request) {
TestResult result = new TestResult();
result.setDescription("Ensure a preference value can be set to null.");
result.setSpecPLT("14.1");
-
+
PortletPreferences preferences = request.getPreferences();
try {
preferences.setValue("TEST", null);
@@ -181,7 +181,7 @@
TestUtils.failOnException("Unable to set preference value.", ex, result);
return result;
}
-
+
String value = preferences.getValue("TEST", DEF_VALUE);
if (DEF_VALUE.equals(value)) {
result.setReturnCode(TestResult.PASSED);
@@ -190,13 +190,13 @@
}
return result;
}
-
+
protected TestResult checkSetPreferencesReturnsFirst(PortletRequest request) {
TestResult result = new TestResult();
result.setDescription("Ensure the first value set to a given "
+ "preference is returned first by PortletPreferences.getValue().");
result.setSpecPLT("14.1");
-
+
PortletPreferences preferences = request.getPreferences();
try {
preferences.setValues("TEST", new String[] { "FIRST", "SECOND" });
@@ -213,16 +213,16 @@
}
return result;
}
-
+
protected TestResult checkResetPreferenceToDefault(PortletRequest request) {
TestResult result = new TestResult();
result.setDescription("Ensure preferences are properly reset.");
result.setSpecPLT("14.1");
-
+
PortletPreferences preferences = request.getPreferences();
boolean setOccured = false;
boolean resetOccured = false;
-
+
try {
// Set new value to overwrite the default value.
preferences.setValue(PREF_NAME, NEW_VALUE);
@@ -240,7 +240,7 @@
TestUtils.failOnException("Unable to set preference value.", ex, result);
return result;
}
-
+
// Everything is OK.
if (setOccured && resetOccured) {
result.setReturnCode(TestResult.PASSED);
@@ -259,17 +259,17 @@
}
return result;
}
-
+
protected TestResult checkResetPreferenceWithoutDefault(PortletRequest request) {
TestResult result = new TestResult();
result.setDescription("Ensure preferences are properly reset (removed) "
+ "when the default value is not defined.");
result.setSpecPLT("14.1");
-
+
PortletPreferences preferences = request.getPreferences();
boolean setOccured = false;
boolean resetOccured = false;
-
+
try {
// Set preference value to overwrite the original (null).
preferences.setValue(BOGUS_KEY, NEW_VALUE);
@@ -287,7 +287,7 @@
TestUtils.failOnException("Unable to set preference value.", ex, result);
return result;
}
-
+
// Everything is OK.
if (setOccured && resetOccured) {
result.setReturnCode(TestResult.PASSED);
@@ -307,14 +307,14 @@
}
return result;
}
-
+
protected TestResult checkModifyReadOnlyPreferences(PortletRequest request) {
TestResult result = new TestResult();
result.setDescription("Ensure that setValue() / setValues() / reset() "
+ "methods throw ReadOnlyException when invoked "
+ "on read-only preferences.");
result.setSpecPLT("14.1");
-
+
PortletPreferences preferences = request.getPreferences();
if (!preferences.isReadOnly(READ_ONLY_PREF_NAME)) {
result.setReturnCode(TestResult.WARNING);
@@ -323,32 +323,32 @@
+ "This may be due to misconfiuration.");
return result;
}
-
+
boolean setValueOK = false;
boolean setValuesOK = false;
boolean resetOK = false;
-
+
// Check setValue() method.
try {
preferences.setValue(READ_ONLY_PREF_NAME, "written");
} catch (ReadOnlyException ex) {
setValueOK = true;
}
-
+
// Check setValues() method.
try {
preferences.setValues(READ_ONLY_PREF_NAME, new String[] { "written" });
} catch (ReadOnlyException ex) {
setValuesOK = true;
}
-
+
// Check reset() method.
try {
preferences.reset(READ_ONLY_PREF_NAME);
} catch (ReadOnlyException ex) {
resetOK = true;
}
-
+
if (setValueOK && setValuesOK && resetOK) {
result.setReturnCode(TestResult.PASSED);
} else {
@@ -369,12 +369,12 @@
}
return result;
}
-
+
protected TestResult checkGetPreferenceNames(PortletRequest request) {
TestResult result = new TestResult();
result.setDescription("Ensure returned enumeration is valid.");
result.setSpecPLT("14.1");
-
+
PortletPreferences preferences = request.getPreferences();
Map prefMap = preferences.getMap();
boolean hasAll = true;
@@ -384,7 +384,7 @@
break;
}
}
-
+
if (hasAll) {
result.setReturnCode(TestResult.PASSED);
} else {
@@ -394,7 +394,7 @@
}
return result;
}
-
+
/**
* FIXME:
*/
@@ -414,13 +414,13 @@
result.setDescription("Preferences values are not modified if "
+ "the values in the returned preference Map are altered.");
result.setSpecPLT("14.1");
-
+
PortletPreferences preferences = request.getPreferences();
if (LOG.isDebugEnabled()) {
LOG.debug("Original Preferences:");
logPreferences(preferences);
}
-
+
// Modify the returned preference map.
Map prefMap = preferences.getMap();
String[] values = (String[]) prefMap.get(PREF_NAME);
@@ -430,7 +430,7 @@
originalValue = values[0];
values[0] = modifiedValue;
}
-
+
// Check if the value held by portlet preferences is modified.
if (LOG.isDebugEnabled()) {
LOG.debug("Modified Preferences:");
@@ -446,11 +446,11 @@
}
return result;
}
-
-
+
+
// Debug Methods -----------------------------------------------------------
-
-
+
+
/**
* Logs out the portlet preferences.
* @param preferences PortletPreferences to log.
@@ -475,9 +475,9 @@
// Spec allows null values.
buffer.append("NULL");
}
- buffer.append(";");
+ buffer.append(";");
}
LOG.debug("PortletPreferences: " + buffer.toString());
}
-
+
}
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceInActionTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceInActionTest.java?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceInActionTest.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceInActionTest.java Sat Sep 1 05:51:24 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 2003,2004 The Apache Software Foundation.
- *
- * Licensed 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
+ * 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
*
@@ -30,23 +31,21 @@
import javax.portlet.ValidatorException;
/**
- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>
*/
public class PreferenceInActionTest extends PreferenceCommonTest
implements ActionTest {
-
+
/** Logger. */
private static final Log LOG = LogFactory.getLog(PreferenceInActionTest.class);
-
-
+
+
// Test Methods ------------------------------------------------------------
-
+
protected TestResult checkPreferenceValidator(PortletRequest request) {
TestResult result = new TestResult();
result.setDescription("Ensure the validator catches invalid preferences.");
result.setSpecPLT("14.4");
-
+
PortletPreferences preferences = request.getPreferences();
if (LOG.isDebugEnabled()) {
LOG.debug("Original preferences:");
@@ -61,15 +60,15 @@
}
// Call store() method to invoke the validator.
preferences.store();
-
+
} catch (ReadOnlyException ex) {
TestUtils.failOnException("Unable to set preference value.", ex, result);
return result;
-
+
} catch (IOException ex) {
TestUtils.failOnException("Unable to store preference value.", ex, result);
return result;
-
+
} catch (ValidatorException ex) {
// We are expecting this exception!
exceptionThrown = true;
@@ -79,10 +78,10 @@
preferences.setValue("TEST", "OK");
preferences.reset("TEST");
} catch (Throwable th) {
- LOG.error(th);
+ LOG.error(th);
}
}
-
+
if (exceptionThrown) {
result.setReturnCode(TestResult.PASSED);
} else {
@@ -91,14 +90,14 @@
}
return result;
}
-
+
protected TestResult checkOnePreferenceValidatorPerPortletDefinition(
PortletRequest request) {
TestResult result = new TestResult();
result.setDescription("Ensure only one validator instance is created "
+ "per portlet definition.");
result.setSpecPLT("14.4");
-
+
PortletPreferences preferences = request.getPreferences();
try {
preferences.setValue(
@@ -130,15 +129,15 @@
TestResult result = new TestResult();
result.setDescription("Ensure storage works for portlet preferences.");
result.setSpecPLT("14.1");
-
+
PortletPreferences preferences = request.getPreferences();
if (LOG.isDebugEnabled()) {
LOG.debug("Preferences to store: " + preferences);
}
-
+
boolean setOccured = false;
boolean storeOccured = false;
-
+
try {
// Set new value for preference "dummyName".
preferences.setValue(PREF_NAME, NEW_VALUE);
@@ -171,7 +170,7 @@
return result;
}
}
-
+
// Everything is OK.
if (setOccured && storeOccured) {
result.setReturnCode(TestResult.PASSED);
@@ -190,5 +189,5 @@
}
return result;
}
-
+
}
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceInRenderTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceInRenderTest.java?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceInRenderTest.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/PreferenceInRenderTest.java Sat Sep 1 05:51:24 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 2003,2004 The Apache Software Foundation.
- *
- * Licensed 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
+ * 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
*
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/RenderParameterTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/RenderParameterTest.java?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/RenderParameterTest.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/RenderParameterTest.java Sat Sep 1 05:51:24 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 2003,2004 The Apache Software Foundation.
- *
- * Licensed 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
+ * 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
*
@@ -25,8 +26,6 @@
import javax.portlet.PortletRequest;
/**
- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>
*/
public class RenderParameterTest extends AbstractReflectivePortletTest {
@@ -34,22 +33,22 @@
private static final String RENDER_KEY = "org.apache.pluto.testsuite.PARAM_RENDER_KEY";
private static final String RENDER_VALUE = "org.apache.pluto.testsuite.RENDER_VALUE";
-
-
+
+
public Map getRenderParameters(PortletRequest request) {
Map parameterMap = new HashMap();
parameterMap.put(RENDER_KEY, new String[] { RENDER_VALUE });
return parameterMap;
}
-
-
+
+
// Test Methods ------------------------------------------------------------
-
+
protected TestResult checkActionParametersNotHere(PortletRequest request) {
TestResult result = new TestResult();
result.setDescription("Ensure that action parameters are not available "
+ "in the following render request.");
-
+
String value = request.getParameter(ACTION_KEY);
if (value == null) {
result.setReturnCode(TestResult.PASSED);
@@ -64,7 +63,7 @@
TestResult result = new TestResult();
result.setDescription("Ensure that render parameters set in action "
+ "response are available in the following render request.");
-
+
String value = request.getParameter(RENDER_KEY);
if (RENDER_VALUE.equals(value)) {
result.setReturnCode(TestResult.PASSED);
@@ -94,7 +93,7 @@
TestResult result = new TestResult();
result.setDescription("Ensure that render request returns the correct "
+ "parameter map.");
-
+
Map parameterMap = request.getParameterMap();
String[] values = (String[]) parameterMap.get(RENDER_KEY);
if (values != null && values.length == 1
@@ -132,7 +131,7 @@
hasRenderParameter = true;
}
}
-
+
if (!hasActionParameter && hasRenderParameter) {
result.setReturnCode(TestResult.PASSED);
} else {
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/RenderResponseNoContentTypeTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/RenderResponseNoContentTypeTest.java?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/RenderResponseNoContentTypeTest.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/RenderResponseNoContentTypeTest.java Sat Sep 1 05:51:24 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 2003,2004 The Apache Software Foundation.
- *
- * Licensed 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
+ * 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
*
@@ -27,14 +28,13 @@
/**
* FIXME: separate the two check methods to two classes.
- *
- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>
+ *
*/
public class RenderResponseNoContentTypeTest
extends AbstractReflectivePortletTest {
-
+
private static final Log LOG = LogFactory.getLog(RenderResponseNoContentTypeTest.class);
-
+
/**
* Overwrite super implementation to return null. This test requires that
* content type of the render response is not set.
@@ -43,22 +43,22 @@
public String getRenderResponseContentType() {
return null;
}
-
+
// Test Methods ------------------------------------------------------------
-
+
protected TestResult checkGetPortletOutputStream(PortletResponse response) {
TestResult result = new TestResult();
result.setDescription("Ensure If the getPortletOutputStream() method "
+ "is called before the setContentType() method, it will throw "
+ "an IllegalStateException.");
result.setSpecPLT("12.3.1");
-
+
RenderResponse renderResponse = (RenderResponse) response;
ensureContentTypeNotSet(renderResponse, result);
if (result.getReturnCode() == TestResult.WARNING) {
return result;
}
-
+
try {
renderResponse.getPortletOutputStream();
result.setReturnCode(TestResult.FAILED);
@@ -81,13 +81,13 @@
+ "is called before the setContentType() method, it will throw "
+ "an IllegalStateException.");
result.setSpecPLT("12.3.1");
-
+
RenderResponse renderResponse = (RenderResponse) response;
ensureContentTypeNotSet(renderResponse, result);
if (result.getReturnCode() == TestResult.WARNING) {
return result;
}
-
+
try {
renderResponse.getWriter();
result.setReturnCode(TestResult.FAILED);
@@ -103,10 +103,10 @@
}
return result;
}
-
-
+
+
// Private Methods ---------------------------------------------------------
-
+
/**
* Ensures that the content type of the current render response is not set.
* If the content type is already set, this method sets the test result to
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ResourceBundleTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ResourceBundleTest.java?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ResourceBundleTest.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/ResourceBundleTest.java Sat Sep 1 05:51:24 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 2003,2004 The Apache Software Foundation.
- *
- * Licensed 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
+ * 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
*
@@ -15,63 +16,69 @@
*/
package org.apache.pluto.testsuite.test;
-import org.apache.pluto.testsuite.TestResult;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.ResourceBundle;
-import javax.portlet.*;
-import java.util.*;
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletRequest;
+
+import org.apache.pluto.testsuite.TestResult;
/**
* Tests basic attribute retrieval and storage functions within
* the portlet request, session, and context objects.
*
- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>
*/
public class ResourceBundleTest extends AbstractReflectivePortletTest {
-
+
// Static Constant Definitions ---------------------------------------------
-
+
/** Key for portlet title defined in portlet.xml/init-param. */
private static final String TITLE_KEY = "javax.portlet.title";
-
+
/** Key for portlet short title defined in portlet.xml/init-param. */
private static final String SHORT_TITLE_KEY = "javax.portlet.short-title";
-
+
/** Key for portlet keywords defined in portlet.xml/init-param. */
private static final String KEYWORDS_KEY = "javax.portlet.keywords";
-
+
/**
* Parameter name for if resource bundle is declared in
* <code>testsuite-config/init-param</code>.
*/
private static final String BUNDLE_DECLARED_PARAM = "resource-bundle";
-
+
/**
* Parameter name for portlet title in
* <code>testsuite-config/init-param</code>.
*/
private static final String TITLE_PARAM = "title";
-
+
/**
* Parameter name for portlet short title in
* <code>testsuite-config/init-param</code>.
*/
private static final String SHORT_TITLE_PARAM = "short-title";
-
+
/**
* Parameter name for portlet keywords in
* <code>testsuite-config/init-param</code>.
*/
private static final String KEYWORDS_PARAM = "keywords";
-
-
+
+
// Test Methods ------------------------------------------------------------
-
+
protected TestResult checkResourceBundleExists(PortletConfig config,
PortletRequest request) {
TestResult result = new TestResult();
result.setDescription("Ensure the resource bundle is not null.");
-
+
ResourceBundle bundle = config.getResourceBundle(request.getLocale());
if (bundle != null) {
result.setReturnCode(TestResult.PASSED);
@@ -82,7 +89,7 @@
}
return result;
}
-
+
protected TestResult checkGetNames(PortletConfig config,
PortletRequest request) {
TestResult result = new TestResult();
@@ -93,7 +100,7 @@
requiredKeys.add(TITLE_KEY);
requiredKeys.add(SHORT_TITLE_KEY);
requiredKeys.add(KEYWORDS_KEY);
-
+
ResourceBundle bundle = config.getResourceBundle(request.getLocale());
if (bundle == null) {
result.setReturnCode(TestResult.WARNING);
@@ -102,12 +109,12 @@
+ "Check the other test results in this test suite.");
return result;
}
-
+
for (Enumeration en = bundle.getKeys(); en.hasMoreElements(); ) {
String key = (String) en.nextElement();
requiredKeys.remove(key);
}
-
+
if (requiredKeys.isEmpty()) {
result.setReturnCode(TestResult.PASSED);
} else {
@@ -142,17 +149,17 @@
return doGenericLocaleRequiredFields(config, req, new Locale("dflt"));
}
*/
-
-
+
+
// Private Methods ---------------------------------------------------------
-
+
private TestResult doGenericLocaleRequiredFields(PortletConfig config,
PortletRequest request,
Locale locale) {
TestResult result = new TestResult();
result.setDescription("Retrieve the title and ensure it's set properly "
- + "under local " + locale);
-
+ + "under locale " + locale);
+
// Retrieve title, short title and keywords from portlet resource bundle.
ResourceBundle bundle = config.getResourceBundle(locale);
if (bundle == null) {
@@ -165,7 +172,7 @@
String title = bundle.getString(TITLE_KEY);
String shortTitle = bundle.getString(SHORT_TITLE_KEY);
String keywords = bundle.getString(KEYWORDS_KEY);
-
+
// Retrieve expected title, short title and keywords from test config.
String suffix = isBundleDeclared() ? ("_" + locale.getLanguage()) : "";
Map initParams = getInitParameters();
@@ -175,7 +182,7 @@
SHORT_TITLE_PARAM + suffix);
String expectedKeywords = (String) initParams.get(
KEYWORDS_PARAM + suffix);
-
+
// Assert that values retrieved from resource bundler are expected.
boolean inconsistent = false;
StringBuffer buffer = new StringBuffer();
@@ -201,7 +208,7 @@
.append(keywords).append("' != '")
.append(expectedKeywords).append("'; ");
}
-
+
if (!inconsistent) {
result.setReturnCode(TestResult.PASSED);
} else {
@@ -210,7 +217,7 @@
}
return result;
}
-
+
private boolean isBundleDeclared() {
String bundleDeclared = (String) getInitParameters().get(
BUNDLE_DECLARED_PARAM);
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SecurityMappingTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SecurityMappingTest.java?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SecurityMappingTest.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SecurityMappingTest.java Sat Sep 1 05:51:24 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 2003,2004 The Apache Software Foundation.
- *
- * Licensed 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
+ * 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
*
@@ -20,20 +21,18 @@
import org.apache.pluto.testsuite.TestResult;
/**
- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>
*/
public class SecurityMappingTest extends AbstractReflectivePortletTest {
-
+
// Test Methods ------------------------------------------------------------
-
+
protected TestResult checkIsUserInMappedRole(PortletRequest request) {
TestResult result = isUserLoggedIn(request);
result.setDescription("Test if user is in mapped role.");
if (result.getReturnCode() == TestResult.WARNING) {
return result;
}
-
+
ExpectedResults expectedResults = ExpectedResults.getInstance();
String role = expectedResults.getMappedSecurityRole();
if (request.isUserInRole(role)) {
@@ -45,14 +44,14 @@
}
return result;
}
-
+
protected TestResult checkIsUserInUnmappedRole(PortletRequest request) {
TestResult result = isUserLoggedIn(request);
result.setDescription("Test if user is in unmapped role");
if (result.getReturnCode() == TestResult.WARNING) {
return result;
}
-
+
ExpectedResults expectedResults = ExpectedResults.getInstance();
String role = expectedResults.getUnmappedSecurityRole();
if (request.isUserInRole(role)) {
@@ -64,14 +63,14 @@
}
return result;
}
-
+
protected TestResult checkIsUserIndUndeclaredRole(PortletRequest request) {
TestResult result = isUserLoggedIn(request);
result.setDescription("Test if user is in undeclared role");
if (result.getReturnCode() == TestResult.WARNING) {
return result;
}
-
+
String fakeRole = "fakeTestRoleFooBar";
if (!request.isUserInRole(fakeRole)) {
result.setReturnCode(TestResult.PASSED);
@@ -81,10 +80,10 @@
}
return result;
}
-
-
+
+
// Private Methods ---------------------------------------------------------
-
+
private TestResult isUserLoggedIn(PortletRequest request) {
TestResult result = new TestResult();
if (request.getRemoteUser() == null) {
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SessionTimeoutTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SessionTimeoutTest.java?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SessionTimeoutTest.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SessionTimeoutTest.java Sat Sep 1 05:51:24 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 2003,2004 The Apache Software Foundation.
- *
- * Licensed 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
+ * 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
*
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SimpleAttributeTest.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SimpleAttributeTest.java?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SimpleAttributeTest.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/test/SimpleAttributeTest.java Sat Sep 1 05:51:24 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 2003,2004 The Apache Software Foundation.
- *
- * Licensed 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
+ * 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
*
@@ -28,17 +29,15 @@
* Tests basic attribute retrieval and storage functions within the portlet
* request, session, and context objects.
*
- * @author <a href="mailto:ddewolf@apache.org">David H. DeWolf</a>
- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>
*/
public class SimpleAttributeTest extends AbstractReflectivePortletTest {
-
+
private static final String KEY = "org.apache.pluto.testsuite.BOGUS_KEY";
private static final String VAL = "! TEST VAL !";
-
-
+
+
// Test Methods ------------------------------------------------------------
-
+
protected TestResult checkGetNullAttribute(PortletRequest req) {
TestResult result = new TestResult();
result.setDescription("Ensure that if an attribute bound to an invalid "
@@ -75,7 +74,7 @@
TestResult result = new TestResult();
result.setDescription("Ensure that attributes can be removed from "
+ "portlet request.");
-
+
req.setAttribute(KEY, VAL);
req.removeAttribute(KEY);
Object val = req.getAttribute(KEY);
@@ -91,12 +90,12 @@
TestResult result = new TestResult();
result.setDescription("Ensure that all attribute names appear in the "
+ "attribute name enumeration returned by portlet request.");
-
+
int count = 5;
for (int i = 0; i < count; i++) {
req.setAttribute(KEY + "." + i, VAL);
}
-
+
int found = 0;
for (Enumeration en = req.getAttributeNames();
en.hasMoreElements(); ) {
@@ -113,10 +112,10 @@
}
return result;
}
-
-
+
+
// Test Methods for Session Attributes -------------------------------------
-
+
protected TestResult checkGetNullAttribute(PortletSession session) {
TestResult res = new TestResult();
res.setName("Retrieve Missing Session Attribute Test");
@@ -172,10 +171,10 @@
}
protected TestResult checkEnumerateAttributes(PortletSession session) {
-
+
TestResult result = new TestResult();
result.setDescription("Sets session attributes and enumerates over them.");
-
+
int count = 5;
for (int i = 0; i < count; i++) {
session.setAttribute(KEY + "." + i, VAL);
@@ -189,7 +188,7 @@
found++;
}
}
-
+
if (count != found) {
result.setReturnCode(TestResult.FAILED);
result.setResultMessage("Expected " + count + " attributes. "
@@ -263,12 +262,12 @@
TestResult result = new TestResult();
result.setDescription("Sets attributes in portlet context "
+ "and enumerates over them.");
-
+
int count = 5;
for (int i = 0; i < count; i++) {
context.setAttribute(KEY + "." + i, VAL);
}
-
+
int found = 0;
for (Enumeration en = context.getAttributeNames();
en.hasMoreElements(); ) {
@@ -276,7 +275,7 @@
found++;
}
}
-
+
if (count == found) {
result.setReturnCode(TestResult.PASSED);
} else {
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/validator/PreferencesValidatorImpl.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/validator/PreferencesValidatorImpl.java?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/validator/PreferencesValidatorImpl.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/validator/PreferencesValidatorImpl.java Sat Sep 1 05:51:24 2007
@@ -1,12 +1,13 @@
/*
- * Copyright 2003,2004 The Apache Software Foundation.
- *
- * Licensed 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
- *
+ * 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.
@@ -30,23 +31,22 @@
/**
* Implementation of the portlet preferences validator.
- * @author <a href="mailto:zheng@apache.org">ZHENG Zhong</a>
*/
public class PreferencesValidatorImpl implements PreferencesValidator {
-
+
/** Logger. */
private static final Log LOG = LogFactory.getLog(PreferencesValidatorImpl.class);
-
+
public static final String CHECK_VALIDATOR_COUNT = "checkValidatorCount";
-
+
/** Count of instances created. */
private static final Map INSTANCE_COUNTER = new HashMap();
-
+
/** Count of invocation number of method <code>validate()</code>. */
private int validateInvoked = 0;
-
+
// Constructor -------------------------------------------------------------
-
+
/**
* Default no-arg constructor.
*/
@@ -62,10 +62,10 @@
}
INSTANCE_COUNTER.put(getClass().getName(), count);
}
-
-
+
+
// PreferencesValidator Impl -----------------------------------------------
-
+
public void validate(PortletPreferences preferences)
throws ValidatorException {
validateInvoked++;
@@ -73,7 +73,7 @@
if (value != null && value.equalsIgnoreCase("true")) {
checkValidatorCount();
}
-
+
//
// TODO: Determine why we use this - I seem to remember it's a
// spec requirement, and fix it so that we don't have issues
@@ -102,14 +102,14 @@
}
}
}
-
+
if (!failedNames.isEmpty()) {
throw new ValidatorException(
"One or more preferences do not pass the validation.",
failedNames);
}
}
-
+
private void checkValidatorCount() throws ValidatorException {
if (LOG.isDebugEnabled()) {
LOG.debug("Checking validator count...");
@@ -127,5 +127,5 @@
null);
}
}
-
+
}
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/validator/PreferencesValidatorImpl2.java
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/validator/PreferencesValidatorImpl2.java?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/validator/PreferencesValidatorImpl2.java (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/java/org/apache/pluto/testsuite/validator/PreferencesValidatorImpl2.java Sat Sep 1 05:51:24 2007
@@ -1,9 +1,10 @@
/*
- * Copyright 2003,2004 The Apache Software Foundation.
- *
- * Licensed 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
+ * 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
*
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/resources/testsuite.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/resources/testsuite.xml?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/resources/testsuite.xml (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/resources/testsuite.xml Sat Sep 1 05:51:24 2007
@@ -1,8 +1,10 @@
<!--
-Copyright 2004 The Apache Software Foundation.
-Licensed 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
+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
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet.properties
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet.properties?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet.properties (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet.properties Sat Sep 1 05:51:24 2007
@@ -1,8 +1,10 @@
#
-# Copyright 2004 The Apache Software Foundation
-# Licensed 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
+# 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
#
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet_de.properties
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet_de.properties?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet_de.properties (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet_de.properties Sat Sep 1 05:51:24 2007
@@ -1,8 +1,10 @@
#
-# Copyright 2004 The Apache Software Foundation
-# Licensed 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
+# 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
#
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet_en.properties
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet_en.properties?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet_en.properties (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/classes/TestPortlet_en.properties Sat Sep 1 05:51:24 2007
@@ -1,8 +1,10 @@
#
-# Copyright 2004 The Apache Software Foundation
-# Licensed 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
+# 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
#
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/portlet.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/portlet.xml?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/portlet.xml (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/portlet.xml Sat Sep 1 05:51:24 2007
@@ -1,9 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
-Copyright 2004 The Apache Software Foundation
-Licensed 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
+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
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/testsuite-2-config.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/testsuite-2-config.xml?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/testsuite-2-config.xml (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/testsuite-2-config.xml Sat Sep 1 05:51:24 2007
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright 2004 The Apache Software Foundation
-
- Licensed 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
+ 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
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/testsuite-config.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/testsuite-config.xml?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/testsuite-config.xml (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/testsuite-config.xml Sat Sep 1 05:51:24 2007
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright 2004 The Apache Software Foundation
-
- Licensed 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
+ 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
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/web.xml?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/web.xml (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/WEB-INF/web.xml Sat Sep 1 05:51:24 2007
@@ -4,10 +4,12 @@
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<!--
-Copyright 2004 The Apache Software Foundation
-Licensed 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
+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
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/index.jsp
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/index.jsp?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/index.jsp (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/index.jsp Sat Sep 1 05:51:24 2007
@@ -1,8 +1,10 @@
<%--
-Copyright 2004 The Apache Software Foundation.
-Licensed 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
+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
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/ExternalAppScopedAttributeTest.jsp
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/ExternalAppScopedAttributeTest.jsp?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/ExternalAppScopedAttributeTest.jsp (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/ExternalAppScopedAttributeTest.jsp Sat Sep 1 05:51:24 2007
@@ -1,8 +1,10 @@
<%--
-Copyright 2004 The Apache Software Foundation
-Licensed 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
+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
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/ExternalAppScopedAttributeTest_companion.jsp
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/ExternalAppScopedAttributeTest_companion.jsp?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/ExternalAppScopedAttributeTest_companion.jsp (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/ExternalAppScopedAttributeTest_companion.jsp Sat Sep 1 05:51:24 2007
@@ -1,8 +1,10 @@
<%--
-Copyright 2004 The Apache Software Foundation
-Licensed 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
+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
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/SessionTimeoutTest.jsp
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/SessionTimeoutTest.jsp?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/SessionTimeoutTest.jsp (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/SessionTimeoutTest.jsp Sat Sep 1 05:51:24 2007
@@ -1,8 +1,11 @@
+<%@ page import="javax.portlet.WindowState" %>
<%--
-Copyright 2004 The Apache Software Foundation
-Licensed 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
+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
@@ -24,7 +27,7 @@
<c:when test="${results.inQuestion}">
<%-- Generate portlet render URL: Start =============================== --%>
- <portlet:renderURL secure='<%= renderRequest.isSecure() ? "True" : "False" %>'
+ <portlet:renderURL windowState="<%=WindowState.MAXIMIZED.toString()%>" secure='<%= renderRequest.isSecure() ? "True" : "False" %>'
var="url">
<portlet:param name="maxInactiveIntervalSet" value="<%= Boolean.TRUE.toString() %>"/>
<portlet:param name="testId" value="<%= renderRequest.getParameter("testId") %>"/>
@@ -51,6 +54,11 @@
This test requires manual intervention. Please wait for at least
5 seconds and click <a href="<c:out value="${url}"/>">here</a>.
</p>
+ <p>
+ NOTE: Clicking the url above will maximize this portlet. This is required
+ to ensure that no other portlets on the current page recreate the session we
+ are trying to invalidate.
+ </p>
</td>
</tr>
</table>
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/edit.jsp
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/edit.jsp?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/edit.jsp (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/edit.jsp Sat Sep 1 05:51:24 2007
@@ -1,8 +1,10 @@
<%--
-Copyright 2004 The Apache Software Foundation
-Licensed 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
+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
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/help.jsp
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/help.jsp?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/help.jsp (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/help.jsp Sat Sep 1 05:51:24 2007
@@ -1,8 +1,10 @@
<%--
-Copyright 2004 The Apache Software Foundation
-Licensed 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
+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
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/introduction.jsp
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/introduction.jsp?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/introduction.jsp (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/introduction.jsp Sat Sep 1 05:51:24 2007
@@ -1,8 +1,10 @@
<%--
-Copyright 2004 The Apache Software Foundation
-Licensed 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
+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
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/navigation.inc
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/navigation.inc?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/navigation.inc (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/navigation.inc Sat Sep 1 05:51:24 2007
@@ -1,8 +1,10 @@
<%--
-Copyright 2004 The Apache Software Foundation
-Licensed 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
+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
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/portlet_mode_test.jsp
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/portlet_mode_test.jsp?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/portlet_mode_test.jsp (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/portlet_mode_test.jsp Sat Sep 1 05:51:24 2007
@@ -1,8 +1,10 @@
<%--
-Copyright 2004 The Apache Software Foundation
-Licensed 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
+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
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/test4.jsp
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/test4.jsp?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/test4.jsp (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/test4.jsp Sat Sep 1 05:51:24 2007
@@ -1,8 +1,10 @@
<!--
-Copyright 2004 The Apache Software Foundation
-Licensed 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
+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
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/test_results.inc
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/test_results.inc?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/test_results.inc (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/test_results.inc Sat Sep 1 05:51:24 2007
@@ -1,8 +1,10 @@
<%--
-Copyright 2004 The Apache Software Foundation
-Licensed 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
+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
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/test_results.jsp
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/test_results.jsp?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/test_results.jsp (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/test_results.jsp Sat Sep 1 05:51:24 2007
@@ -1,8 +1,10 @@
<%--
-Copyright 2004 The Apache Software Foundation
-Licensed 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
+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
Modified: portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/window_state_test.jsp
URL: http://svn.apache.org/viewvc/portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/window_state_test.jsp?rev=571792&r1=571791&r2=571792&view=diff
==============================================================================
--- portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/window_state_test.jsp (original)
+++ portals/pluto/branches/1.1-286-trunk-merge/pluto-testsuite/src/main/webapp/jsp/window_state_test.jsp Sat Sep 1 05:51:24 2007
@@ -1,8 +1,10 @@
<%--
-Copyright 2004 The Apache Software Foundation
-Licensed 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
+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