[Httpunit-commit] CVS: httpunit/src/com/meterware/servletunit InvocationContextFactory.java,1.4,1.5
Brought to you by:
russgold
|
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() );
}
|