httpunit-commit Mailing List for httpunit (Page 35)
Brought to you by:
russgold
You can subscribe to this list here.
| 2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
(31) |
Oct
(39) |
Nov
(18) |
Dec
(6) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2001 |
Jan
(8) |
Feb
(5) |
Mar
(8) |
Apr
(25) |
May
(20) |
Jun
(23) |
Jul
(28) |
Aug
(10) |
Sep
(3) |
Oct
(32) |
Nov
(61) |
Dec
(24) |
| 2002 |
Jan
(50) |
Feb
(34) |
Mar
(35) |
Apr
(3) |
May
(25) |
Jun
(25) |
Jul
(30) |
Aug
(146) |
Sep
(49) |
Oct
(156) |
Nov
(121) |
Dec
(54) |
| 2003 |
Jan
(12) |
Feb
(79) |
Mar
(88) |
Apr
(26) |
May
(67) |
Jun
(29) |
Jul
(8) |
Aug
(16) |
Sep
(20) |
Oct
(17) |
Nov
|
Dec
(5) |
| 2004 |
Jan
|
Feb
(40) |
Mar
(30) |
Apr
(5) |
May
|
Jun
(83) |
Jul
(34) |
Aug
(20) |
Sep
(44) |
Oct
(46) |
Nov
|
Dec
(14) |
| 2005 |
Jan
(4) |
Feb
|
Mar
(5) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
(1) |
| 2006 |
Jan
|
Feb
|
Mar
(26) |
Apr
(8) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
(36) |
May
(38) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(4) |
Oct
|
Nov
(18) |
Dec
(4) |
| 2009 |
Jan
|
Feb
(2) |
Mar
(3) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(35) |
Sep
(1) |
Oct
|
Nov
|
Dec
(1) |
| 2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2011 |
Jan
(9) |
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
| 2012 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(21) |
Oct
(18) |
Nov
(1) |
Dec
|
|
From: Russell G. <rus...@us...> - 2003-02-28 17:31:00
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv18714/src/com/meterware/httpunit
Modified Files:
HttpUnitOptions.java
Log Message:
Support parser warnings from NekoHTML
Index: HttpUnitOptions.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/HttpUnitOptions.java,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- HttpUnitOptions.java 25 Dec 2002 15:23:11 -0000 1.36
+++ HttpUnitOptions.java 28 Feb 2003 17:30:26 -0000 1.37
@@ -42,7 +42,6 @@
* Resets all options to their default values.
*/
public static void reset() {
- HTMLParserFactory.reset();
_exceptionsOnErrorStatus = true;
_parameterValuesValidated = true;
_imagesTreatedAsAltText = false;
|
|
From: Russell G. <rus...@us...> - 2003-02-28 17:30:40
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/parsing
In directory sc8-pr-cvs1:/tmp/cvs-serv18714/test/com/meterware/httpunit/parsing
Modified Files:
ParsingTestSuite.java
Added Files:
HTMLParserListenerTest.java
Removed Files:
JTidyPrintWriterTest.java
Log Message:
Support parser warnings from NekoHTML
***** Error reading new file[Errno 2] No such file or directory: 'HTMLParserListenerTest.java'
Index: ParsingTestSuite.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/parsing/ParsingTestSuite.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ParsingTestSuite.java 24 Dec 2002 17:17:05 -0000 1.1
+++ ParsingTestSuite.java 28 Feb 2003 17:30:34 -0000 1.2
@@ -33,8 +33,7 @@
public static TestSuite suite() {
TestSuite result = new TestSuite();
result.addTest( ParserPropertiesTest.suite() );
-
- if (HTMLParserFactory.getHTMLParser().getClass().getName().indexOf("Tidy") >= 0) result.addTest( JTidyPrintWriterTest.suite() );
+ result.addTest( HTMLParserListenerTest.suite() );
return result;
}
|
|
From: Russell G. <rus...@us...> - 2003-02-28 17:29:56
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv18400/src/com/meterware/httpunit
Modified Files:
HTMLPage.java
Log Message:
Correct incompatibility between JTidy and embedded Scripts
Index: HTMLPage.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/HTMLPage.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- HTMLPage.java 4 Feb 2003 05:32:03 -0000 1.24
+++ HTMLPage.java 28 Feb 2003 17:29:51 -0000 1.25
@@ -81,7 +81,7 @@
for (int i = 0; i < nl.getLength(); i++) {
Node scriptNode = nl.item(i);
String language = NodeUtils.getNodeAttribute( scriptNode, "language", null );
- if (language != null && !language.startsWith( "JavaScript ")) continue;
+ if (language != null && !language.startsWith( "JavaScript")) continue;
String scriptLocation = NodeUtils.getNodeAttribute( scriptNode, "src", null );
if (scriptLocation == null) {
scripts.add( NodeUtils.asText( scriptNode.getChildNodes() ) );
|
|
From: Russell G. <rus...@us...> - 2003-02-27 23:36:48
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/servletunit
In directory sc8-pr-cvs1:/tmp/cvs-serv23354/src/com/meterware/servletunit
Modified Files:
InvocationContextFactory.java InvocationContextImpl.java
ServletRunner.java ServletUnitClient.java
Log Message:
Frame support now includes searching the current window
Index: InvocationContextFactory.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/InvocationContextFactory.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- InvocationContextFactory.java 17 Oct 2002 23:50:49 -0000 1.4
+++ InvocationContextFactory.java 27 Feb 2003 23:36:02 -0000 1.5
@@ -36,6 +36,6 @@
/**
* Creates and returns a new invocation context to test calling of servlet methods.
**/
- public InvocationContext newInvocation( ServletUnitClient client, WebRequest request, Dictionary clientHeaders, byte[] messageBody ) throws IOException, MalformedURLException;
+ public InvocationContext newInvocation( ServletUnitClient client, String targetFrame, WebRequest request, Dictionary clientHeaders, byte[] messageBody ) throws IOException, MalformedURLException;
}
Index: InvocationContextImpl.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/InvocationContextImpl.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- InvocationContextImpl.java 21 Feb 2003 15:44:00 -0000 1.12
+++ InvocationContextImpl.java 27 Feb 2003 23:36:02 -0000 1.13
@@ -158,11 +158,11 @@
* Constructs a servlet invocation context for a specified servlet container,
* request, and cookie headers.
**/
- InvocationContextImpl( ServletUnitClient client, ServletRunner runner, WebRequest request, Dictionary clientHeaders, byte[] messageBody ) throws IOException, MalformedURLException {
+ InvocationContextImpl( ServletUnitClient client, ServletRunner runner, String target, WebRequest request, Dictionary clientHeaders, byte[] messageBody ) throws IOException, MalformedURLException {
_client = client;
_application = runner.getApplication();
_requestURL = request.getURL();
- _target = request.getTarget();
+ _target = target;
final ServletUnitHttpRequest suhr = new ServletUnitHttpRequest( _application.getServletRequest( _requestURL ), request, runner.getContext(),
clientHeaders, messageBody );
Index: ServletRunner.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/ServletRunner.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- ServletRunner.java 3 Jan 2003 16:12:35 -0000 1.20
+++ ServletRunner.java 27 Feb 2003 23:36:03 -0000 1.21
@@ -191,8 +191,8 @@
private ServletUnitContext _context;
private InvocationContextFactory _factory = new InvocationContextFactory() {
- public InvocationContext newInvocation( ServletUnitClient client, WebRequest request, Dictionary clientHeaders, byte[] messageBody ) throws IOException, MalformedURLException {
- return new InvocationContextImpl( client, ServletRunner.this, request, clientHeaders, messageBody );
+ public InvocationContext newInvocation( ServletUnitClient client, String targetFrame, WebRequest request, Dictionary clientHeaders, byte[] messageBody ) throws IOException, MalformedURLException {
+ return new InvocationContextImpl( client, ServletRunner.this, targetFrame, request, clientHeaders, messageBody );
}
};
Index: ServletUnitClient.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/ServletUnitClient.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ServletUnitClient.java 17 Oct 2002 23:50:50 -0000 1.10
+++ ServletUnitClient.java 27 Feb 2003 23:36:03 -0000 1.11
@@ -2,7 +2,7 @@
/********************************************************************************************************************
* $Id$
*
-* Copyright (c) 2000-2002, Russell Gold
+* Copyright (c) 2000-2003, Russell Gold
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
@@ -38,6 +38,8 @@
* calling any servlet methods which may be desired. Even in this latter mode, end-to-end
* testing is supported, but requires a call to this class's getResponse method to update
* its cookies and frames.
+ *
+ * @author <a href="rus...@ht...">Russell Gold</a>
**/
public class ServletUnitClient extends WebClient {
@@ -64,7 +66,7 @@
public InvocationContext newInvocation( WebRequest request ) throws IOException, MalformedURLException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
writeMessageBody( request, baos );
- return _invocationContextFactory.newInvocation( this, request, getHeaderFields( request.getURL() ), baos.toByteArray() );
+ return _invocationContextFactory.newInvocation( this, getTargetFrame( request ), request, getHeaderFields( request.getURL() ), baos.toByteArray() );
}
|
|
From: Russell G. <rus...@us...> - 2003-02-27 23:36:43
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv23354/src/com/meterware/httpunit
Modified Files:
FrameHolder.java WebClient.java WebForm.java WebFrame.java
WebLink.java WebRequest.java WebRequestSource.java
WebWindow.java
Log Message:
Frame support now includes searching the current window
Index: FrameHolder.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/FrameHolder.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- FrameHolder.java 17 Nov 2002 00:17:06 -0000 1.7
+++ FrameHolder.java 27 Feb 2003 23:35:58 -0000 1.8
@@ -2,7 +2,7 @@
/********************************************************************************************************************
* $Id$
*
- * Copyright (c) 2002, Russell Gold
+ * Copyright (c) 2002-2003, Russell Gold
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
@@ -21,17 +21,14 @@
*******************************************************************************************************************/
import java.io.IOException;
import java.net.MalformedURLException;
-import java.util.ArrayList;
-import java.util.Enumeration;
-import java.util.Hashtable;
-import java.util.List;
+import java.util.*;
import org.xml.sax.SAXException;
/**
*
- * @author <a href="mailto:rus...@ac...">Russell Gold</a>
+ * @author <a href="mailto:rus...@ht...">Russell Gold</a>
**/
class FrameHolder {
@@ -49,7 +46,13 @@
WebResponse get( String target ) {
- return (WebResponse) _contents.get( getFrameName( target ) );
+ final WebResponse response = (WebResponse) _contents.get( getFrameName( target ) );
+ if (response != null) return response;
+ for (Iterator iterator = _contents.keySet().iterator(); iterator.hasNext();) {
+ String name = (String) iterator.next();
+ if (name.endsWith( ':' + target )) return (WebResponse) _contents.get( name );
+ }
+ return null;
}
@@ -63,6 +66,23 @@
}
+ String getTargetFrame( WebRequest request ) {
+ if (WebRequest.NEW_WINDOW.equalsIgnoreCase( request.getTarget() )) {
+ return WebRequest.TOP_FRAME;
+ } else if (WebRequest.TOP_FRAME.equalsIgnoreCase( request.getTarget() )) {
+ return WebRequest.TOP_FRAME;
+ } else {
+ final String computedTarget = getTargetFrameName( request.getSourceFrame(), request.getTarget() );
+ if (_contents.get( computedTarget ) != null) return computedTarget;
+ for (Iterator iterator = _contents.keySet().iterator(); iterator.hasNext();) {
+ String name = (String) iterator.next();
+ if (name.endsWith( ':' + request.getTarget() )) return name;
+ }
+ return request.getTarget();
+ }
+ }
+
+
String getFrameName( String target ) {
if (WebRequest.TOP_FRAME.equalsIgnoreCase( target )) {
return _frameName;
@@ -107,6 +127,15 @@
for (int i = 0; i < frameNames.length; i++) {
_contents.put( frameNames[ i ], WebResponse.BLANK_RESPONSE );
}
+ }
+
+ /**
+ * Returns the qualified name of a target frame.
+ */
+ private static String getTargetFrameName( String sourceFrameName, final String relativeName ) {
+ if (relativeName.equalsIgnoreCase( WebRequest.TOP_FRAME )) return WebRequest.TOP_FRAME;
+ if (sourceFrameName.indexOf( ':' ) < 0) return relativeName;
+ return WebFrame.getParentFrameName( sourceFrameName ) + ':' + relativeName;
}
}
Index: WebClient.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebClient.java,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- WebClient.java 13 Dec 2002 12:57:11 -0000 1.48
+++ WebClient.java 27 Feb 2003 23:35:58 -0000 1.49
@@ -2,7 +2,7 @@
/********************************************************************************************************************
* $Id$
*
-* Copyright (c) 2000-2002, Russell Gold
+* Copyright (c) 2000-2003, Russell Gold
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
@@ -396,6 +396,12 @@
final
protected void updateMainWindow( String target, WebResponse response ) throws MalformedURLException, IOException, SAXException {
getMainWindow().updateWindow( target, response, new RequestContext() );
+ }
+
+
+ final
+ protected String getTargetFrame( WebRequest request ) {
+ return getMainWindow().getTargetFrame( request );
}
Index: WebForm.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebForm.java,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -r1.78 -r1.79
--- WebForm.java 17 Feb 2003 23:54:41 -0000 1.78
+++ WebForm.java 27 Feb 2003 23:35:59 -0000 1.79
@@ -63,7 +63,7 @@
public WebResponse submit( SubmitButton button ) throws IOException, SAXException {
String event = getAttribute( "onsubmit" );
if (event.length() == 0 || getScriptableObject().doEvent( event )) return submitRequest( getRequest( button ) );
- return getBaseResponse().getWindow().getFrameContents( getTarget() );
+ return getBaseResponse().getWindow().getFrameContents( getPageFrame() );
}
Index: WebFrame.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebFrame.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- WebFrame.java 4 Feb 2003 05:32:03 -0000 1.11
+++ WebFrame.java 27 Feb 2003 23:36:00 -0000 1.12
@@ -73,17 +73,6 @@
}
- /**
- * Returns the qualified name of a target frame.
- *
- */
- static String getTargetFrameName( String sourceFrameName, final String relativeName ) {
- if (relativeName.equalsIgnoreCase( WebRequest.PARENT_FRAME )) return getParentFrameName( sourceFrameName );
- if (sourceFrameName.indexOf( ':' ) < 0) return relativeName;
- return getParentFrameName( sourceFrameName ) + ':' + relativeName;
- }
-
-
static String getParentFrameName( String parentFrameName ) {
if (parentFrameName.indexOf( ':' ) < 0) return WebRequest.TOP_FRAME;
return parentFrameName.substring( 0, parentFrameName.lastIndexOf( ':' ) );
Index: WebLink.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebLink.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- WebLink.java 30 Dec 2002 21:46:55 -0000 1.38
+++ WebLink.java 27 Feb 2003 23:36:01 -0000 1.39
@@ -2,7 +2,7 @@
/********************************************************************************************************************
* $Id$
*
-* Copyright (c) 2000-2002, Russell Gold
+* Copyright (c) 2000-2003, Russell Gold
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
@@ -87,7 +87,7 @@
WebResponse response = null;
String event = getAttribute( "onclick" );
if (event.length() == 0 || getScriptableObject().doEvent( event )) response = submitRequest();
- if (response == null) response = getBaseResponse().getWindow().getFrameContents( getTarget() );
+ if (response == null) response = getBaseResponse().getWindow().getFrameContents( getPageFrame() );
return response;
}
Index: WebRequest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebRequest.java,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- WebRequest.java 14 Feb 2003 19:04:24 -0000 1.54
+++ WebRequest.java 27 Feb 2003 23:36:01 -0000 1.55
@@ -94,9 +94,17 @@
/**
* Returns the target for this web request.
- **/
+ */
public String getTarget() {
- return _target;
+ return _requestTarget;
+ }
+
+
+ /**
+ * Returns the frame from which this request originates.
+ */
+ String getSourceFrame() {
+ return _sourceFrame;
}
@@ -281,7 +289,7 @@
* Constructs a web request using a base URL, a relative URL string, and a target.
**/
protected WebRequest( URL urlBase, String urlString, String target ) {
- this( urlBase, urlString, target, new UncheckedParameterHolder() );
+ this( urlBase, urlString, TOP_FRAME, target, new UncheckedParameterHolder() );
}
@@ -298,7 +306,7 @@
protected WebRequest( WebRequestSource requestSource ) {
- this( requestSource.getBaseURL(), requestSource.getRelativePage(), requestSource.getTarget(), newParameterHolder( requestSource ) );
+ this( requestSource.getBaseURL(), requestSource.getRelativePage(), requestSource.getPageFrame(), requestSource.getTarget(), newParameterHolder( requestSource ) );
_webRequestSource = requestSource;
setHeaderField( "Referer", requestSource.getBaseURL().toExternalForm() );
}
@@ -316,10 +324,11 @@
/**
* Constructs a web request using a base URL, a relative URL string, and a target.
**/
- private WebRequest( URL urlBase, String urlString, String target, ParameterHolder parameterHolder ) {
+ private WebRequest( URL urlBase, String urlString, String sourceFrame, String requestTarget, ParameterHolder parameterHolder ) {
_urlBase = urlBase;
+ _sourceFrame = sourceFrame;
+ _requestTarget = requestTarget;
_urlString = urlString.toLowerCase().startsWith( "http" ) ? escape( urlString ) : urlString;
- _target = target;
_parameterHolder = parameterHolder;
}
@@ -430,16 +439,18 @@
//---------------------------------- package members --------------------------------
/** The target indicating the topmost frame of a window. **/
- final static String TOP_FRAME = "_top";
+ static final String TOP_FRAME = "_top";
/** The target indicating the parent of a frame. **/
- final static String PARENT_FRAME = "_parent";
+ static final String PARENT_FRAME = "_parent";
/** The target indicating a new, empty window. **/
- final static String NEW_WINDOW = "_blank";
+ static final String NEW_WINDOW = "_blank";
+ /** The target indicating the same frame. **/
+ static final String SAME_FRAME = "_self";
- WebRequestSource getWebRequestSource() {
+ WebRequestSource getWebRequestSource() {
return _webRequestSource;
}
@@ -459,8 +470,9 @@
private final ParameterHolder _parameterHolder;
private URL _urlBase;
+ private String _sourceFrame;
+ private String _requestTarget;
private String _urlString;
- private String _target = TOP_FRAME;
private Hashtable _headers;
private WebRequestSource _webRequestSource;
Index: WebRequestSource.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebRequestSource.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- WebRequestSource.java 27 Dec 2002 13:43:11 -0000 1.23
+++ WebRequestSource.java 27 Feb 2003 23:36:01 -0000 1.24
@@ -1,7 +1,7 @@
/********************************************************************************************************************
* $Id$
*
- * Copyright (c) 2001-2002, Russell Gold
+ * Copyright (c) 2001-2003, Russell Gold
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
@@ -58,15 +58,23 @@
/**
* Returns the target for this request source.
- **/
+ */
public String getTarget() {
- if (getSpecifiedTarget().length() == 0 || getSpecifiedTarget().equalsIgnoreCase( "_self" )) {
+ if (getSpecifiedTarget().length() == 0 || getSpecifiedTarget().equalsIgnoreCase( WebRequest.SAME_FRAME )) {
return _pageFrame;
- } else if (getSpecifiedTarget().equalsIgnoreCase( "_top" )) {
- return "_top";
+ } else if (getSpecifiedTarget().equalsIgnoreCase( WebRequest.PARENT_FRAME )) {
+ return WebFrame.getParentFrameName( _pageFrame );
} else {
- return WebFrame.getTargetFrameName( _pageFrame, getSpecifiedTarget() );
+ return getSpecifiedTarget();
}
+ }
+
+
+ /**
+ * Returns the name of the frame containing this request source.
+ */
+ public String getPageFrame() {
+ return _pageFrame;
}
Index: WebWindow.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebWindow.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- WebWindow.java 17 Nov 2002 00:17:07 -0000 1.8
+++ WebWindow.java 27 Feb 2003 23:36:02 -0000 1.9
@@ -2,7 +2,7 @@
/********************************************************************************************************************
* $Id$
*
- * Copyright (c) 2002, Russell Gold
+ * Copyright (c) 2002-2003, Russell Gold
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
@@ -146,7 +146,7 @@
_client.tellListeners( request );
WebResponse response = null;
- final String frameName = getTargetFrame( request.getTarget() );
+ final String frameName = getTargetFrame( request );
String urlString = request.getURLString().trim();
if (urlString.startsWith( "about:" )) {
response = WebResponse.BLANK_RESPONSE;
@@ -164,13 +164,10 @@
}
- private String getTargetFrame( String target ) {
- if (WebRequest.NEW_WINDOW.equalsIgnoreCase( target )) {
- return WebRequest.TOP_FRAME;
- } else {
- return target;
- }
+ String getTargetFrame( WebRequest request ) {
+ return _frameContents.getTargetFrame( request );
}
+
/**
* Returns the name of the currently active frames.
|
|
From: Russell G. <rus...@us...> - 2003-02-27 23:36:36
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv23354/doc
Modified Files:
release_notes.txt
Log Message:
Frame support now includes searching the current window
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.262
retrieving revision 1.263
diff -u -r1.262 -r1.263
--- release_notes.txt 27 Feb 2003 18:40:39 -0000 1.262
+++ release_notes.txt 27 Feb 2003 23:35:53 -0000 1.263
@@ -13,7 +13,7 @@
Revision History:
- 23-Feb-2003 1.5.2 release candidate
+ 27-Feb-2003 1.5.2 release candidate
Acknowledgements:
Thanks to John Sinclair for noting the lack of line breaks in manifest.mf and proposing a fix
Thanks to Bernhard Wagner for simplifying some string comparison code in ParsedHTML and WebTable
@@ -28,6 +28,7 @@
Thanks to Raphael Corre for improving logger of transmitted headers
Thanks to Jason Bedell for supplying an implementation for HttpSession.getValueNames.
Thanks to Jianqin Qu for finding the getTableStartingWithPrefix bug when using NekoHTML
+ Thanks to Scott Fleischman for providing tests for missing frame handling functionality
Problems Fixed:
Packaging
@@ -72,13 +73,12 @@
5. Added support for <iframe> tag. IFrames work just like regular frames, except that they are embedded in a response
without a <frameset> tag. IFrame support is controlled by the ClientProperties.iframeSupported property.
6. WebForm.isHiddenParameter returns true if all parameters with the specified name are hidden
+ 7. Frame handling is now more flexible, searching within a window for a target frame rather than just below the source frame.
JavaScript
- 7. The Form.target property is now supported
8. Added support for document.getElementById
9. All HTML elements with id attributes are now accessible
+ 10. The Form.target property is now supported
ServletUnit
- 10. ServletRunner.shutDown() will invoke the destroy() methods of any servlets which have been invoked
- through that servlet runner.
11. ServletUnit now supports HttpServletRequest.getHeaderNames
12. ServletUnit now handles https requests, marking them as "secure."
13. ServletUnit now supports HttpServletResponse.flushBuffer()
@@ -87,6 +87,8 @@
the dispatched servlet. Calling popRequest reverts to the dispatching servlet.
15. ServletUnit now loads and initializes servlets specified with the <load-on-startup> element.
16. HttpServletResponse methods reset(), resetBuffer(), and setBufferSize() are now implemented.
+ 17. ServletRunner.shutDown() will invoke the destroy() methods of any servlets which have been invoked
+ through that servlet runner.
Notes:
1. Upgraded NekoHTML to 0.7.2 which no longer generates superfluous <form> tags.
|
|
From: Russell G. <rus...@us...> - 2003-02-27 23:36:21
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv23354/test/com/meterware/httpunit
Modified Files:
RequestTargetTest.java WebFrameTest.java WebLinkTest.java
Log Message:
Frame support now includes searching the current window
Index: RequestTargetTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/RequestTargetTest.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RequestTargetTest.java 10 Oct 2002 21:10:19 -0000 1.2
+++ RequestTargetTest.java 27 Feb 2003 23:36:04 -0000 1.3
@@ -1,13 +1,27 @@
package com.meterware.httpunit;
-
-import java.net.URL;
-
+/********************************************************************************************************************
+* $Id$
+*
+* Copyright (c) 2000-2003, Russell Gold
+*
+* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
+* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
+* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
+* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+*
+* The above copyright notice and this permission notice shall be included in all copies or substantial portions
+* of the Software.
+*
+* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
+* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
+* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+* DEALINGS IN THE SOFTWARE.
+*
+*******************************************************************************************************************/
import junit.framework.Test;
-import junit.framework.TestCase;
import junit.framework.TestSuite;
-import java.util.Vector;
-
/**
* Tests to ensure the proper handling of the target attribute.
@@ -45,7 +59,6 @@
assertEquals( "default response target", WebRequest.TOP_FRAME, response.getFrameName() );
WebLink link = response.getLinks()[0];
assertEquals( "default link target", WebRequest.TOP_FRAME, link.getTarget() );
- assertEquals( "default request target", WebRequest.TOP_FRAME, link.getRequest().getTarget() );
}
@@ -101,7 +114,6 @@
assertEquals( "Num forms in page", 1, response.getForms().length );
WebForm form = response.getForms()[0];
assertEquals( "default form target", WebRequest.TOP_FRAME, form.getTarget() );
- assertEquals( "default request target", WebRequest.TOP_FRAME, form.getRequest().getTarget() );
}
Index: WebFrameTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/WebFrameTest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- WebFrameTest.java 4 Feb 2003 05:32:03 -0000 1.14
+++ WebFrameTest.java 27 Feb 2003 23:36:04 -0000 1.15
@@ -348,6 +348,37 @@
}
+ private void defineNestedFrames() throws Exception {
+ defineResource( "Topmost.html",
+ "<HTML><HEAD><TITLE>Topmost</TITLE></HEAD>" +
+ "<FRAMESET cols=\"20%,80%\">" +
+ " <FRAME src=\"Target.html\" name=\"red\">" +
+ " <FRAME src=\"Inner.html\" name=\"blue\">" +
+ "</FRAMESET></HTML>" );
+ defineResource( "Inner.html",
+ "<HTML><HEAD><TITLE>Inner</TITLE></HEAD>" +
+ "<FRAMESET rows=\"20%,80%\">" +
+ " <FRAME src=\"Form.html\" name=\"green\">" +
+ "</FRAMESET></HTML>" );
+ }
+
+
+ public void testGetNestedFrameByName() throws Exception {
+ defineNestedFrames();
+ _wc.getResponse( getHostPath() + "/Topmost.html" );
+ _wc.getFrameContents( "green" );
+ }
+
+
+ public void testLinkWithAncestorTarget() throws Exception {
+ defineNestedFrames();
+ _wc.getResponse( getHostPath() + "/Topmost.html" );
+ WebResponse innerResponse = _wc.getFrameContents( "blue" ).getSubframeContents( "green" );
+ innerResponse.getLinks()[0].click();
+ assertEquals( "Title of 'red' frame", "Linker", _wc.getFrameContents( "red" ).getTitle() );
+ }
+
+
public void testIFrameDetection() throws Exception {
defineWebPage( "Frame", "This is a trivial page with <a href='mailto:rus...@ht...'>one link</a>" +
"and <iframe name=center src='Contents.html'><form name=hidden></form></iframe>" );
Index: WebLinkTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/WebLinkTest.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- WebLinkTest.java 27 Dec 2002 13:43:11 -0000 1.26
+++ WebLinkTest.java 27 Feb 2003 23:36:06 -0000 1.27
@@ -2,7 +2,7 @@
/********************************************************************************************************************
* $Id$
*
-* Copyright (c) 2000-2002, Russell Gold
+* Copyright (c) 2000-2003, Russell Gold
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
@@ -258,8 +258,7 @@
assertEquals( "Num links in initial page", 1, initialPage.getLinks().length );
WebLink link = initialPage.getLinks()[0];
- WebRequest request = link.getRequest();
- assertEquals( "Target for link", "blue", request.getTarget() );
+ assertEquals( "Target for link", "blue", link.getTarget() );
}
|
|
From: Russell G. <rus...@us...> - 2003-02-27 23:36:21
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/servletunit
In directory sc8-pr-cvs1:/tmp/cvs-serv23354/test/com/meterware/servletunit
Modified Files:
JUnitServletTest.java
Log Message:
Frame support now includes searching the current window
Index: JUnitServletTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/servletunit/JUnitServletTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- JUnitServletTest.java 19 Feb 2003 19:18:00 -0000 1.5
+++ JUnitServletTest.java 27 Feb 2003 23:36:06 -0000 1.6
@@ -179,8 +179,8 @@
static class MyFactory implements InvocationContextFactory {
private static ServletRunner _runner;
- public InvocationContext newInvocation( ServletUnitClient client, WebRequest request, Dictionary clientHeaders, byte[] messageBody ) throws IOException, MalformedURLException {
- return new InvocationContextImpl( client, _runner, request, clientHeaders, messageBody );
+ public InvocationContext newInvocation( ServletUnitClient client, String targetFrame, WebRequest request, Dictionary clientHeaders, byte[] messageBody ) throws IOException, MalformedURLException {
+ return new InvocationContextImpl( client, _runner, targetFrame, request, clientHeaders, messageBody );
}
}
}
|
|
From: Russell G. <rus...@us...> - 2003-02-27 18:40:43
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/servletunit
In directory sc8-pr-cvs1:/tmp/cvs-serv26851/test/com/meterware/servletunit
Modified Files:
HttpServletResponseTest.java
Log Message:
Implemented resetBuffer, setBufferSize, reset
Index: HttpServletResponseTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/servletunit/HttpServletResponseTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- HttpServletResponseTest.java 6 Feb 2003 02:55:32 -0000 1.8
+++ HttpServletResponseTest.java 27 Feb 2003 18:40:39 -0000 1.9
@@ -127,6 +127,47 @@
}
+ public void testSetBufferSizeAfterWrite() throws Exception {
+ ServletUnitHttpResponse servletResponse = new ServletUnitHttpResponse();
+ servletResponse.setBufferSize( 120 );
+ servletResponse.getWriter();
+ servletResponse.setBufferSize( 100 );
+ servletResponse.getWriter().print( "something" );
+ try {
+ servletResponse.setBufferSize( 80 );
+ fail( "Should not have permitted setBufferSize after write" );
+ } catch (IllegalStateException e) {}
+ }
+
+
+ public void testSetBufferSizeAfterStreamOutput() throws Exception {
+ ServletUnitHttpResponse servletResponse = new ServletUnitHttpResponse();
+ servletResponse.setBufferSize( 120 );
+ servletResponse.getOutputStream();
+ servletResponse.setBufferSize( 100 );
+ servletResponse.getOutputStream().print( "something" );
+ try {
+ servletResponse.setBufferSize( 80 );
+ fail( "Should not have permitted setBufferSize after output" );
+ } catch (IllegalStateException e) {}
+ }
+
+
+ public void testResetBuffer() throws Exception {
+ ServletUnitHttpResponse servletResponse = new ServletUnitHttpResponse();
+ servletResponse.getOutputStream().print( "something" );
+ assertEquals( "buffer size", 9, servletResponse.getContents().length );
+ servletResponse.resetBuffer();
+ assertEquals( "buffer size", 0, servletResponse.getContents().length );
+
+ servletResponse.flushBuffer();
+ try {
+ servletResponse.resetBuffer();
+ fail( "Should not have permitted resetBuffer after flush" );
+ } catch (IllegalStateException e) {}
+ }
+
+
public void testUpdateAfterFlushBuffer() throws Exception {
ServletUnitHttpResponse servletResponse = new ServletUnitHttpResponse();
servletResponse.getWriter();
|
|
From: Russell G. <rus...@us...> - 2003-02-27 18:40:42
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv26851/doc
Modified Files:
release_notes.txt
Log Message:
Implemented resetBuffer, setBufferSize, reset
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.261
retrieving revision 1.262
diff -u -r1.261 -r1.262
--- release_notes.txt 26 Feb 2003 03:02:00 -0000 1.261
+++ release_notes.txt 27 Feb 2003 18:40:39 -0000 1.262
@@ -86,6 +86,7 @@
updates the servlet, request, and response properties of the context so that subsequent calls can be done from
the dispatched servlet. Calling popRequest reverts to the dispatching servlet.
15. ServletUnit now loads and initializes servlets specified with the <load-on-startup> element.
+ 16. HttpServletResponse methods reset(), resetBuffer(), and setBufferSize() are now implemented.
Notes:
1. Upgraded NekoHTML to 0.7.2 which no longer generates superfluous <form> tags.
|
|
From: Russell G. <rus...@us...> - 2003-02-27 18:40:42
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/servletunit
In directory sc8-pr-cvs1:/tmp/cvs-serv26851/src/com/meterware/servletunit
Modified Files:
RequestDispatcherImpl.java ServletUnitHttpResponse.java
Log Message:
Implemented resetBuffer, setBufferSize, reset
Index: RequestDispatcherImpl.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/RequestDispatcherImpl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RequestDispatcherImpl.java 21 Feb 2003 15:44:00 -0000 1.4
+++ RequestDispatcherImpl.java 27 Feb 2003 18:40:39 -0000 1.5
@@ -50,7 +50,7 @@
public void forward( ServletRequest request, ServletResponse response ) throws ServletException, IOException {
- ((ServletUnitHttpResponse) response).restartResponse();
+ response.reset();
_servletMetaData.getServlet().service( DispatchedRequestWrapper.createForwardRequestWrapper( (HttpServletRequest) request, this ), response );
}
Index: ServletUnitHttpResponse.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/ServletUnitHttpResponse.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- ServletUnitHttpResponse.java 6 Feb 2003 02:55:32 -0000 1.17
+++ ServletUnitHttpResponse.java 27 Feb 2003 18:40:39 -0000 1.18
@@ -3,7 +3,7 @@
/********************************************************************************************************************
* $Id$
*
-* Copyright (c) 2000-2001, Russell Gold
+* Copyright (c) 2000-2003, Russell Gold
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
@@ -364,8 +364,8 @@
* will use a buffer at least as large as the size requested. The actual buffer size
* used can be found using getBufferSize.
**/
- public void setBufferSize( int size ) { // XXX throw IllegalStateException if anything has been written
- throw new RuntimeException( "setBufferSize not implemented" );
+ public void setBufferSize( int size ) {
+ if (getContents().length != 0) throw new IllegalStateException( "May not set buffer size after data is written" );
}
@@ -400,7 +400,10 @@
* If the response has been committed, this method throws an IllegalStateException.
**/
public void reset() {
- throw new RuntimeException( "reset not implemented" );
+ resetBuffer();
+ _headers = new Hashtable();
+ _headersComplete = false;
+ _status = SC_OK;
}
@@ -432,23 +435,14 @@
* @since 1.3
*/
public void resetBuffer() {
- // XXX implement me
- }
-
-
-//---------------------------------------------- package methods --------------------------------------------------
-
- /**
- * Clears all headers and content.
- */
- void restartResponse() {
- _headers = new Hashtable();
- _headersComplete = false;
+ if (_committed) throw new IllegalStateException( "May not resetBuffer after response is committed" );
_outputStream = null;
_servletStream = null;
- _status = SC_OK;
_writer = null;
}
+
+
+//---------------------------------------------- package methods --------------------------------------------------
/**
* Returns the content type defined for this response.
|
|
From: Russell G. <rus...@us...> - 2003-02-27 13:33:51
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/servletunit
In directory sc8-pr-cvs1:/tmp/cvs-serv3587/src/com/meterware/servletunit
Modified Files:
WebApplication.java
Log Message:
Verify that the context parameter starts with '/'
Index: WebApplication.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/WebApplication.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- WebApplication.java 19 Feb 2003 19:17:58 -0000 1.18
+++ WebApplication.java 27 Feb 2003 13:33:45 -0000 1.19
@@ -109,6 +109,7 @@
* Constructs an application spec from an XML document.
*/
WebApplication( Document document, File file, String contextPath ) throws MalformedURLException, SAXException {
+ if (contextPath != null && contextPath.length() > 0 && !contextPath.startsWith( "/" )) throw new IllegalArgumentException( "Context path " + contextPath + " must start with '/'" );
_contextDir = file;
_contextPath = contextPath == null ? "" : contextPath;
registerServlets( document );
|
|
From: Russell G. <rus...@us...> - 2003-02-26 03:02:08
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv18549/src/com/meterware/httpunit
Modified Files:
WebTable.java
Log Message:
strip off whitespace when looking up tables
Index: WebTable.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebTable.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- WebTable.java 14 Feb 2003 19:04:24 -0000 1.26
+++ WebTable.java 26 Feb 2003 03:02:01 -0000 1.27
@@ -351,7 +351,7 @@
WebTable table = ((WebTable) htmlElement);
table.purgeEmptyCells();
return table.getRowCount() > 0 &&
- HttpUnitUtils.matches( table.getCellAsText(0,0), (String) criteria );
+ HttpUnitUtils.matches( table.getCellAsText(0,0).trim(), (String) criteria );
};
};
@@ -361,7 +361,7 @@
WebTable table = ((WebTable) htmlElement);
table.purgeEmptyCells();
return table.getRowCount() > 0 &&
- HttpUnitUtils.hasPrefix( table.getCellAsText(0,0).toUpperCase(), (String) criteria );
+ HttpUnitUtils.hasPrefix( table.getCellAsText(0,0).toUpperCase().trim(), (String) criteria );
};
};
|
|
From: Russell G. <rus...@us...> - 2003-02-26 03:02:07
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv18549/test/com/meterware/httpunit
Modified Files:
HtmlTablesTest.java
Log Message:
strip off whitespace when looking up tables
Index: HtmlTablesTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/HtmlTablesTest.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- HtmlTablesTest.java 26 Dec 2002 15:33:57 -0000 1.15
+++ HtmlTablesTest.java 26 Feb 2003 03:02:02 -0000 1.16
@@ -19,6 +19,8 @@
* DEALINGS IN THE SOFTWARE.
*
*******************************************************************************************************************/
+import com.meterware.httpunit.parsing.HTMLParserFactory;
+
import junit.framework.TestSuite;
@@ -190,7 +192,7 @@
"Inner Table 1<br>" +
"<table id=you summary='inner zero'>" +
" <tr><td colspan=2> </td></tr>" +
- " <tr><td>Red</td><td>1</td></tr>" +
+ " <tr><td>\nRed\n</td><td>1</td></tr>" +
" <tr><td>Blue</td><td>2</td></tr>" +
"</table></td><td>" +
"Inner Table 2<br>" +
|
|
From: Russell G. <rus...@us...> - 2003-02-26 03:02:07
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv18549/doc
Modified Files:
release_notes.txt
Log Message:
strip off whitespace when looking up tables
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.260
retrieving revision 1.261
diff -u -r1.260 -r1.261
--- release_notes.txt 25 Feb 2003 17:17:27 -0000 1.260
+++ release_notes.txt 26 Feb 2003 03:02:00 -0000 1.261
@@ -27,6 +27,7 @@
Thanks to Ron Hanson for catching the obsolete behavior of HttpServletRequest.setAttribute.
Thanks to Raphael Corre for improving logger of transmitted headers
Thanks to Jason Bedell for supplying an implementation for HttpSession.getValueNames.
+ Thanks to Jianqin Qu for finding the getTableStartingWithPrefix bug when using NekoHTML
Problems Fixed:
Packaging
@@ -37,15 +38,15 @@
3. Forms prematurely closed because of improper nesting will now contain any controls defined before the next form.
4. Quotes in refresh URL meta tags are now recognized and stripped.
5. Headers defined per request were not being logged
+ 6. WebResponse.getTableStartingWith and getTableStartingWithPrefix was trying to match newline characters when
+ using the NekoHTML parser.
JavaScript
- 6. Opening a non-HTML window via Javascript no longer raises a NotHTMLException.
7. Bug #680695: Button.click() is now supported.
8. Bug #680695: Form control ids are now usable to locate components.
9. Scripts marked as something besides JavaScript are now ignored.
10. Calling document.close() in the middle of an immediate script no longer replaces the current page.
+ 11. Opening a non-HTML window via Javascript no longer raises a NotHTMLException.
ServletUnit
- 11. Calling HttpServletRequest.setAttribute in ServletUnit no longer throws an IllegalStateException if the value
- had previously been defined.
12. Included and forwarded servlets now inherit parameters from their calling servlet.
13. Included servlets now have access to their path information as attributes, as per the spec.
14. Forwarded servlets now have access to their path information from the standard request methods, as required.
@@ -55,6 +56,8 @@
17. ServletUnit was interpreting the getRequestDispatcher path as an absolute path. It now correctly treats it
as relative to the context root.
18. ServletUnit now supports HttpSession.getValueNames().
+ 19. Calling HttpServletRequest.setAttribute in ServletUnit no longer throws an IllegalStateException if the value
+ had previously been defined.
Additions:
Content and Parsing
|
|
From: Russell G. <rus...@us...> - 2003-02-25 17:17:33
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv21722/doc
Modified Files:
release_notes.txt
Log Message:
Support HttpSession.getValueNames
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.259
retrieving revision 1.260
diff -u -r1.259 -r1.260
--- release_notes.txt 23 Feb 2003 20:03:38 -0000 1.259
+++ release_notes.txt 25 Feb 2003 17:17:27 -0000 1.260
@@ -26,6 +26,7 @@
Thanks to Daniel Sheppard, Navid Vahdat, and Ron Hanson for help in adding capabilities to the RequestDispatcher implementation.
Thanks to Ron Hanson for catching the obsolete behavior of HttpServletRequest.setAttribute.
Thanks to Raphael Corre for improving logger of transmitted headers
+ Thanks to Jason Bedell for supplying an implementation for HttpSession.getValueNames.
Problems Fixed:
Packaging
@@ -53,6 +54,7 @@
16. ServletUnit now creates a new session if the requested session exists but is marked invalid
17. ServletUnit was interpreting the getRequestDispatcher path as an absolute path. It now correctly treats it
as relative to the context root.
+ 18. ServletUnit now supports HttpSession.getValueNames().
Additions:
Content and Parsing
|
|
From: Russell G. <rus...@us...> - 2003-02-25 17:17:33
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/servletunit In directory sc8-pr-cvs1:/tmp/cvs-serv21722/test/com/meterware/servletunit Modified Files: StatefulTest.java Log Message: Support HttpSession.getValueNames Index: StatefulTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/servletunit/StatefulTest.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- StatefulTest.java 21 Oct 2002 13:34:19 -0000 1.4 +++ StatefulTest.java 25 Feb 2003 17:17:29 -0000 1.5 @@ -2,7 +2,7 @@ /******************************************************************************************************************** * $Id$ * -* Copyright (c) 2000-2001, Russell Gold +* Copyright (c) 2000-2003, Russell Gold * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated * documentation files (the "Software"), to deal in the Software without restriction, including without limitation @@ -20,7 +20,6 @@ * *******************************************************************************************************************/ import java.io.*; -import java.net.HttpURLConnection; import java.util.Enumeration; import javax.servlet.ServletException; @@ -33,7 +32,7 @@ import com.meterware.httpunit.*; /** - * Tests support for stateless HttpServlets. + * Tests support for state-management behavior. **/ public class StatefulTest extends TestCase { @@ -128,6 +127,10 @@ assertTrue( "No attribute names in list", e.hasMoreElements() ); assertEquals( "First attribute name", "color", e.nextElement() ); assertTrue( "List did not end after one name", !e.hasMoreElements() ); + + String[] names = ic.getRequest().getSession().getValueNames(); + assertEquals( "number of value names", 1, names.length ); + assertEquals( "first name", "color", names[0] ); } |
|
From: Russell G. <rus...@us...> - 2003-02-25 17:17:33
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/servletunit
In directory sc8-pr-cvs1:/tmp/cvs-serv21722/src/com/meterware/servletunit
Modified Files:
ServletUnitHttpSession.java
Log Message:
Support HttpSession.getValueNames
Index: ServletUnitHttpSession.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/ServletUnitHttpSession.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- ServletUnitHttpSession.java 6 Feb 2003 01:33:11 -0000 1.7
+++ ServletUnitHttpSession.java 25 Feb 2003 17:17:29 -0000 1.8
@@ -146,7 +146,7 @@
**/
public String[] getValueNames() {
if (_invalid) throw new IllegalStateException();
- throw new RuntimeException( "getValueNames not implemented" );
+ return (String[]) _values.keySet().toArray( new String[ _values.size() ]);
}
|
|
From: Russell G. <rus...@us...> - 2003-02-25 17:05:38
|
Update of /cvsroot/httpunit/httpunit/doc/tutorial In directory sc8-pr-cvs1:/tmp/cvs-serv16056/doc/tutorial Modified Files: task1.html Log Message: Change reference to enumerate version 2 xerces jars Index: task1.html =================================================================== RCS file: /cvsroot/httpunit/httpunit/doc/tutorial/task1.html,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- task1.html 27 Nov 2001 16:40:47 -0000 1.3 +++ task1.html 25 Feb 2003 17:05:26 -0000 1.4 @@ -15,7 +15,8 @@ authentication is handled the same way that all forms should be.</p> <p> To begin the tutorial, create a working directory and expand <a href="task1.zip">this archive</a> into it. To run the -tutorial, you will need httpunit.jar, junit.jar, Tidy.jar, servlet.jar, and xerces.jar on your classpath. If you use +tutorial, you will need httpunit.jar, junit.jar, servlet.jar, nekohtml.jar, xercesImpl.jar, and xmlParserAPIs.jar +(all included in the HttpUnit download) on your classpath. If you use <code>ant</code>, you can either copy them into the <code>jars</code> directory just created, or invoke ant with <code>-Dclasspath="..."</code>, specifying the locations of those jars between the quotation marks. If you do not use <code>ant</code>, note that the main class is named |
|
From: Russell G. <rus...@us...> - 2003-02-23 20:03:44
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv32315/doc
Modified Files:
release_notes.txt
Log Message:
Ignore document.close() while processing immediate script
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.258
retrieving revision 1.259
diff -u -r1.258 -r1.259
--- release_notes.txt 21 Feb 2003 19:28:03 -0000 1.258
+++ release_notes.txt 23 Feb 2003 20:03:38 -0000 1.259
@@ -13,7 +13,7 @@
Revision History:
- 14-Feb-2003 1.5.2 release candidate
+ 23-Feb-2003 1.5.2 release candidate
Acknowledgements:
Thanks to John Sinclair for noting the lack of line breaks in manifest.mf and proposing a fix
Thanks to Bernhard Wagner for simplifying some string comparison code in ParsedHTML and WebTable
@@ -41,9 +41,8 @@
7. Bug #680695: Button.click() is now supported.
8. Bug #680695: Form control ids are now usable to locate components.
9. Scripts marked as something besides JavaScript are now ignored.
+ 10. Calling document.close() in the middle of an immediate script no longer replaces the current page.
ServletUnit
- 10. ServletUnit was interpreting the getRequestDispatcher path as an absolute path. It now correctly treats it
- as relative to the context root.
11. Calling HttpServletRequest.setAttribute in ServletUnit no longer throws an IllegalStateException if the value
had previously been defined.
12. Included and forwarded servlets now inherit parameters from their calling servlet.
@@ -52,6 +51,8 @@
15. All servlets within a web application now share the same instance of ServletContext, permitting attributes
set by one servlet to be visible to other servlets.
16. ServletUnit now creates a new session if the requested session exists but is marked invalid
+ 17. ServletUnit was interpreting the getRequestDispatcher path as an absolute path. It now correctly treats it
+ as relative to the context root.
Additions:
Content and Parsing
|
|
From: Russell G. <rus...@us...> - 2003-02-23 20:03:43
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv32315/src/com/meterware/httpunit
Modified Files:
WebResponse.java
Log Message:
Ignore document.close() while processing immediate script
Index: WebResponse.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebResponse.java,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -r1.109 -r1.110
--- WebResponse.java 14 Feb 2003 19:04:24 -0000 1.109
+++ WebResponse.java 23 Feb 2003 20:03:38 -0000 1.110
@@ -52,6 +52,7 @@
private boolean _hasSubframes;
private URL _baseURL;
private String _baseTarget;
+ private boolean _parsingPage;
/**
@@ -730,6 +731,7 @@
void replaceText( String text, String contentType ) {
+ if (_parsingPage) return;
_responseText = text;
_inputStream = null;
_page = null;
@@ -937,12 +939,16 @@
private HTMLPage getReceivedPage() throws SAXException {
if (_page == null) {
try {
+ _parsingPage = true;
if (!isHTML()) throw new NotHTMLException( getContentType() );
_page = new HTMLPage( this, _frameName, _baseURL, _baseTarget, getCharacterSet() );
_page.parse( getText(), _pageURL );
+ if (_page == null) throw new IllegalStateException( "replaceText called in the middle of getReceivedPage()" );
} catch (IOException e) {
e.printStackTrace();
throw new RuntimeException( e.toString() );
+ } finally {
+ _parsingPage = false;
}
}
return _page;
|
|
From: Russell G. <rus...@us...> - 2003-02-23 20:03:43
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv32315/test/com/meterware/httpunit/javascript
Modified Files:
NekoEnhancedScriptingTest.java
Log Message:
Ignore document.close() while processing immediate script
Index: NekoEnhancedScriptingTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/NekoEnhancedScriptingTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- NekoEnhancedScriptingTest.java 10 Jan 2003 18:21:48 -0000 1.3
+++ NekoEnhancedScriptingTest.java 23 Feb 2003 20:03:39 -0000 1.4
@@ -65,6 +65,24 @@
}
+ public void testEmbeddedDocumentWriteWithClose() throws Exception {
+ defineResource( "OnCommand.html", "<html><head><title>something</title></head>" +
+ "<body>" +
+ "<script language='JavaScript'>" +
+ "document.write( '<a id=here href=about:blank>' );" +
+ "document.writeln( document.title );" +
+ "document.write( '</a>' );" +
+ "document.close();" +
+ "</script>" +
+ "</body></html>" );
+ WebConversation wc = new WebConversation();
+ WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" );
+ WebLink link = response.getLinkWithID( "here" );
+ assertNotNull( "The link was not found", link );
+ assertEquals( "Link contents", "something", link.asText() );
+ }
+
+
public void testUnknownScript() throws Exception {
defineWebPage( "FunkyScript",
"<SCRIPT>" +
|
|
From: Russell G. <rus...@us...> - 2003-02-21 19:28:08
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv3821/src/com/meterware/httpunit
Modified Files:
WebConversation.java
Log Message:
raphael corre: log headers from request as well as from web conversation
Index: WebConversation.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebConversation.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- WebConversation.java 17 Oct 2002 23:50:49 -0000 1.27
+++ WebConversation.java 21 Feb 2003 19:28:04 -0000 1.28
@@ -4,12 +4,12 @@
*
* Copyright (c) 2000-2002, Russell Gold
*
-* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
-* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
+* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
+* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
*
-* The above copyright notice and this permission notice shall be included in all copies or substantial portions
+* The above copyright notice and this permission notice shall be included in all copies or substantial portions
* of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
@@ -39,7 +39,7 @@
**/
public class WebConversation extends WebClient {
-
+
/**
* Creates a new web conversation.
**/
@@ -56,12 +56,6 @@
protected WebResponse newResponse( WebRequest request, String frameName ) throws MalformedURLException, IOException {
URLConnection connection = openConnection( request.getURL() );
sendHeaders( connection, request.getHeaderDictionary() );
- if (HttpUnitOptions.isLoggingHttpHeaders()) {
- for (Enumeration e = getHeaderFields( request.getURL() ).keys(); e.hasMoreElements(); ) {
- String key = (String) e.nextElement();
- System.out.println( "Sending:: " + key + ": " + connection.getRequestProperty( key ) );
- }
- }
request.completeRequest( connection );
return new HttpWebResponse( this, frameName, request.getURL(), connection, getExceptionsThrownOnErrorStatus() );
}
@@ -91,6 +85,9 @@
for (Enumeration e = headers.keys(); e.hasMoreElements();) {
String key = (String) e.nextElement();
connection.setRequestProperty( key, (String) headers.get( key ) );
+ if (HttpUnitOptions.isLoggingHttpHeaders()) {
+ System.out.println( "Sending:: " + key + ": " + connection.getRequestProperty( key ) );
+ }
}
}
}
|
|
From: Russell G. <rus...@us...> - 2003-02-21 19:28:07
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv3821/doc
Modified Files:
release_notes.txt
Log Message:
raphael corre: log headers from request as well as from web conversation
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.257
retrieving revision 1.258
diff -u -r1.257 -r1.258
--- release_notes.txt 19 Feb 2003 19:17:56 -0000 1.257
+++ release_notes.txt 21 Feb 2003 19:28:03 -0000 1.258
@@ -25,6 +25,7 @@
Thanks to Daniel Sheppard for correcting the return status for HttpServletResponse.sendRedirect
Thanks to Daniel Sheppard, Navid Vahdat, and Ron Hanson for help in adding capabilities to the RequestDispatcher implementation.
Thanks to Ron Hanson for catching the obsolete behavior of HttpServletRequest.setAttribute.
+ Thanks to Raphael Corre for improving logger of transmitted headers
Problems Fixed:
Packaging
@@ -34,13 +35,13 @@
the ID attribute is defined.
3. Forms prematurely closed because of improper nesting will now contain any controls defined before the next form.
4. Quotes in refresh URL meta tags are now recognized and stripped.
+ 5. Headers defined per request were not being logged
JavaScript
- 5. Scripts marked as something besides JavaScript are now ignored.
6. Opening a non-HTML window via Javascript no longer raises a NotHTMLException.
7. Bug #680695: Button.click() is now supported.
8. Bug #680695: Form control ids are now usable to locate components.
+ 9. Scripts marked as something besides JavaScript are now ignored.
ServletUnit
- 9. ServletUnit now creates a new session if the requested session exists but is marked invalid
10. ServletUnit was interpreting the getRequestDispatcher path as an absolute path. It now correctly treats it
as relative to the context root.
11. Calling HttpServletRequest.setAttribute in ServletUnit no longer throws an IllegalStateException if the value
@@ -50,6 +51,7 @@
14. Forwarded servlets now have access to their path information from the standard request methods, as required.
15. All servlets within a web application now share the same instance of ServletContext, permitting attributes
set by one servlet to be visible to other servlets.
+ 16. ServletUnit now creates a new session if the requested session exists but is marked invalid
Additions:
Content and Parsing
|
|
From: Russell G. <rus...@us...> - 2003-02-21 15:44:03
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/servletunit
In directory sc8-pr-cvs1:/tmp/cvs-serv9731/src/com/meterware/servletunit
Modified Files:
InvocationContextImpl.java RequestDispatcherImpl.java
Added Files:
DispatchedRequestWrapper.java
Removed Files:
HttpServletRequestWrapper.java
Log Message:
Use standard servlet request wrapper as base
***** Error reading new file[Errno 2] No such file or directory: 'DispatchedRequestWrapper.java'
Index: InvocationContextImpl.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/InvocationContextImpl.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- InvocationContextImpl.java 13 Feb 2003 20:25:55 -0000 1.11
+++ InvocationContextImpl.java 21 Feb 2003 15:44:00 -0000 1.12
@@ -26,9 +26,15 @@
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Dictionary;
+import java.util.Stack;
+import java.util.StringTokenizer;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.Servlet;
+import javax.servlet.ServletException;
-import javax.servlet.*;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -108,7 +114,7 @@
public void pushIncludeRequest( RequestDispatcher rd, HttpServletRequest request, HttpServletResponse response ) throws ServletException {
if (_servlet == null) throw new IllegalStateException( "Get the servlet for this context before pushing a request" );
- _request = new IncludeRequestWrapper( request, rd );
+ _request = DispatchedRequestWrapper.createIncludeRequestWrapper( request, rd );
_servletStack.push( _servlet );
_servlet = ((RequestDispatcherImpl) rd).getServletMetaData().getServlet();
}
@@ -116,15 +122,15 @@
public void pushForwardRequest( RequestDispatcher rd, HttpServletRequest request, HttpServletResponse response ) throws ServletException {
if (_servlet == null) throw new IllegalStateException( "Get the servlet for this context before pushing a request" );
- _request = new ForwardRequestWrapper( request, rd );
+ _request = DispatchedRequestWrapper.createForwardRequestWrapper( request, rd );
_servletStack.push( _servlet );
_servlet = ((RequestDispatcherImpl) rd).getServletMetaData().getServlet();
}
public void popRequest() {
- if (!( _request instanceof HttpServletRequestWrapper)) throw new IllegalStateException( "May not pop the initial request" );
- _request = ((HttpServletRequestWrapper) _request).getBaseRequest();
+ if (!( _request instanceof DispatchedRequestWrapper)) throw new IllegalStateException( "May not pop the initial request" );
+ _request = ((DispatchedRequestWrapper) _request).getBaseRequest();
_servlet = (Servlet) _servletStack.pop();
}
@@ -194,115 +200,16 @@
private Cookie[] getCookies( Dictionary clientHeaders ) {
String cookieHeader = (String) clientHeaders.get( "Cookie" );
if (cookieHeader == null) return NO_COOKIES;
- Vector cookies = new Vector();
+ ArrayList cookies = new ArrayList();
StringTokenizer st = new StringTokenizer( cookieHeader, "=;" );
while (st.hasMoreTokens()) {
String name = st.nextToken();
if (st.hasMoreTokens()) {
String value = st.nextToken();
- cookies.addElement( new Cookie( name, value ) );
+ cookies.add( new Cookie( name, value ) );
}
}
- Cookie[] results = new Cookie[ cookies.size() ];
- cookies.copyInto( results );
- return results;
+ return (Cookie[]) cookies.toArray( new Cookie[ cookies.size() ] );
}
-}
-
-
-class DispatchedRequestWrapper extends HttpServletRequestWrapper {
-
- RequestContext _requestContext;
-
- public DispatchedRequestWrapper( HttpServletRequest request, RequestDispatcher dispatcher ) {
- super( request );
- _requestContext = (RequestContext) dispatcher;
- _requestContext.setParentRequest( request );
- }
-
-
- public String getParameter( String s ) {
- return _requestContext.getParameter( s );
- }
-
-
- public Enumeration getParameterNames() {
- return _requestContext.getParameterNames();
- }
-
-
- public String[] getParameterValues( String s ) {
- return _requestContext.getParameterValues( s );
- }
-
-
- public Map getParameterMap() {
- return _requestContext.getParameterMap();
- }
-
-}
-
-
-class IncludeRequestWrapper extends DispatchedRequestWrapper {
-
- final static String REQUEST_URI = "javax.servlet.include.request_uri";
- final static String CONTEXT_PATH = "javax.servlet.include.context_path";
- final static String SERVLET_PATH = "javax.servlet.include.servlet_path";
- final static String PATH_INFO = "javax.servlet.include.path_info";
- final static String QUERY_STRING = "javax.servlet.include.query_string";
-
- private Hashtable _attributes = new Hashtable();
-
-
- public IncludeRequestWrapper( HttpServletRequest request, RequestDispatcher dispatcher ) {
- super( request, dispatcher );
- _attributes.put( REQUEST_URI, ((RequestDispatcherImpl) dispatcher ).getRequestURI() );
- _attributes.put( CONTEXT_PATH, request.getContextPath() );
- _attributes.put( SERVLET_PATH, ((RequestDispatcherImpl) dispatcher ).getServletMetaData().getServletPath() );
- final String pathInfo = ((RequestDispatcherImpl) dispatcher ).getServletMetaData().getPathInfo();
- if (pathInfo != null) _attributes.put( PATH_INFO, pathInfo );
- }
-
-
- public Object getAttribute( String s ) {
- Object result = _attributes.get( s );
- return (result != null) ? result : super.getAttribute( s );
- }
-
-}
-
-
-class ForwardRequestWrapper extends DispatchedRequestWrapper {
-
- private RequestDispatcherImpl _requestContext;
-
- public ForwardRequestWrapper( HttpServletRequest request, RequestDispatcher dispatcher ) {
- super( request, dispatcher );
- _requestContext = (RequestDispatcherImpl) dispatcher;
- }
-
-
- public String getRequestURI() {
- return _requestContext.getRequestURI();
- }
-
-
- public String getQueryString() {
- return super.getQueryString();
- }
-
-
- public String getServletPath() {
- return _requestContext.getServletMetaData().getServletPath();
- }
-
-
- public String getPathInfo() {
- return _requestContext.getServletMetaData().getPathInfo();
- }
-}
-
-
-
-
+}
\ No newline at end of file
Index: RequestDispatcherImpl.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/RequestDispatcherImpl.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- RequestDispatcherImpl.java 13 Feb 2003 20:25:55 -0000 1.3
+++ RequestDispatcherImpl.java 21 Feb 2003 15:44:00 -0000 1.4
@@ -51,11 +51,11 @@
public void forward( ServletRequest request, ServletResponse response ) throws ServletException, IOException {
((ServletUnitHttpResponse) response).restartResponse();
- _servletMetaData.getServlet().service( new ForwardRequestWrapper( (HttpServletRequest) request, this ), response );
+ _servletMetaData.getServlet().service( DispatchedRequestWrapper.createForwardRequestWrapper( (HttpServletRequest) request, this ), response );
}
public void include( ServletRequest request, ServletResponse response ) throws ServletException, IOException {
- _servletMetaData.getServlet().service( new IncludeRequestWrapper( (HttpServletRequest) request, this ), response );
+ _servletMetaData.getServlet().service( DispatchedRequestWrapper.createIncludeRequestWrapper( (HttpServletRequest) request, this ), response );
}
}
|