httpunit-commit Mailing List for httpunit (Page 24)
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-12-05 04:06:56
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv27254/doc
Modified Files:
release_notes.txt
Log Message:
from Andrew Bickerton: Support form.length, control.type, control.defaultValue
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.313
retrieving revision 1.314
diff -u -r1.313 -r1.314
--- release_notes.txt 17 Oct 2003 13:44:58 -0000 1.313
+++ release_notes.txt 5 Dec 2003 04:06:52 -0000 1.314
@@ -13,6 +13,18 @@
Revision History:
+ 4-Dec-2003
+Acknowledgements:
+ Thanks to Andrew Bickerton for adding the following JavaScript support:
+ Form.length - returns the number of controls in a form
+ Control.type - returns a test description of the control type
+ Control.defaultValue - returns the default value for text controls
+ Initial page tokenizing now skips JavaScript while looking for header tags
+ Writing into an empty frame no longer corrupts all empty frames
+
+Problems fixed:
+ 1. Using JavaScript to write into an empty frame could change all empty frames to the same value
+
17-Oct-2003
Problems fixed:
1. Bug #823433: document.cookie now defaults to the empty string, like IE and Mozilla, rather than null
|
|
From: Russell G. <rus...@us...> - 2003-10-28 00:42:01
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv20882/test/com/meterware/httpunit/javascript
Modified Files:
ScriptingTest.java
Log Message:
be more tolerant of bad values in Javascript cookie setting
Index: ScriptingTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/ScriptingTest.java,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- ScriptingTest.java 17 Oct 2003 13:44:58 -0000 1.56
+++ ScriptingTest.java 27 Oct 2003 21:16:10 -0000 1.57
@@ -632,6 +632,15 @@
}
+ public void testSetCookieToNull() throws Exception {
+ defineResource( "OnCommand.html", "<html><script>" +
+ "document.cookie = null;" +
+ "</script></html>" );
+ WebConversation wc = new WebConversation();
+ wc.getResponse( getHostPath() + "/OnCommand.html" );
+ }
+
+
public void testReadCookies() throws Exception {
defineResource( "OnCommand.html", "<html><head><script language='JavaScript'>" +
"function viewCookies() { \n" +
|
|
From: Russell G. <rus...@us...> - 2003-10-27 23:12:20
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv20882/src/com/meterware/httpunit/javascript
Modified Files:
JavaScript.java
Log Message:
be more tolerant of bad values in Javascript cookie setting
Index: JavaScript.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/javascript/JavaScript.java,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- JavaScript.java 2 Oct 2003 02:43:47 -0000 1.56
+++ JavaScript.java 27 Oct 2003 21:16:10 -0000 1.57
@@ -550,6 +550,7 @@
public void jsSet_cookie( String cookieSpec ) {
final int equalsIndex = cookieSpec.indexOf( '=' );
+ if (equalsIndex <0) return;
int endIndex = cookieSpec.indexOf( ";", equalsIndex );
if (endIndex < 0) endIndex = cookieSpec.length();
String name = cookieSpec.substring( 0, equalsIndex );
|
|
From: Russell G. <rus...@us...> - 2003-10-18 02:09:36
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver
In directory sc8-pr-cvs1:/tmp/cvs-serv8893/src/com/meterware/pseudoserver
Modified Files:
PseudoServer.java
Log Message:
record thread names for pseudoserver and complete error status replies
Index: PseudoServer.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver/PseudoServer.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- PseudoServer.java 2 Oct 2003 18:15:35 -0000 1.14
+++ PseudoServer.java 17 Oct 2003 13:58:09 -0000 1.15
@@ -32,22 +32,34 @@
**/
public class PseudoServer {
- private ArrayList _classpathDirs = new ArrayList();
+ private static final int DEFAULT_SOCKET_TIMEOUT = 1000;
- private String _maxProtocolLevel = "1.1";
+ private static final int INPUT_POLL_INTERVAL = 10;
/** Time in msec to wait for an outstanding server socket to be released before creating a new one. **/
private static int _socketReleaseWaitTime = 50;
/** Number of outstanding server sockets that must be present before trying to wait for one to be released. **/
private static int _waitThreshhold = 10;
+
+ private static int _numServers = 0;
+
+ private int _serverNum = 0;
+
+ private int _connectionNum = 0;
+
+
+ private ArrayList _classpathDirs = new ArrayList();
+
+ private String _maxProtocolLevel = "1.1";
+
+
private final int _socketTimeout;
- private static final int DEFAULT_SOCKET_TIMEOUT = 1000;
/**
* Returns the amount of time the pseudo server will wait for a server socket to be released (in msec)
- * before allocating a new one. See also #getWaitThreshhold.
+ * before allocating a new one. See also {@link #getWaitThreshhold getWaitThreshhold}.
*/
public static int getSocketReleaseWaitTime() {
return _socketReleaseWaitTime;
@@ -56,7 +68,7 @@
/**
* Returns the amount of time the pseudo server will wait for a server socket to be released (in msec)
- * before allocating a new one. See also #getWaitThreshhold.
+ * before allocating a new one. See also {@link #getWaitThreshhold getWaitThreshhold}.
*/
public static void setSocketReleaseWaitTime( int socketReleaseWaitTime ) {
_socketReleaseWaitTime = socketReleaseWaitTime;
@@ -88,14 +100,14 @@
public PseudoServer( int socketTimeout ) {
_socketTimeout = socketTimeout;
- Thread t = new Thread() {
+ _serverNum = ++_numServers;
+ Thread t = new Thread( "PseudoServer " + _serverNum ) {
public void run() {
while (_active) {
try {
handleNewConnection( getServerSocket().accept() );
Thread.sleep( 20 );
} catch (InterruptedIOException e) {
- _active = false;
} catch (IOException e) {
System.out.println( "Error in pseudo server: " + e );
e.printStackTrace();
@@ -116,6 +128,7 @@
public void shutDown() {
+ if (_debug) System.out.println( "** Requested shutdown of pseudoserver: " + hashCode() );
_active = false;
}
@@ -257,7 +270,7 @@
private void handleNewConnection( final Socket socket ) {
- Thread t = new Thread() {
+ Thread t = new Thread( "PseudoServer " + _serverNum + " connection " + (++_connectionNum) ) {
public void run() {
try {
serveRequests( socket );
@@ -283,7 +296,7 @@
boolean keepAlive = respondToRequest( request, outputStream );
if (!keepAlive) break;
while (_active && 0 == inputStream.available()) {
- try { Thread.sleep(10); } catch (InterruptedException e) {}
+ try { Thread.sleep( INPUT_POLL_INTERVAL ); } catch (InterruptedException e) {}
}
}
if (_debug) System.out.println( "** Closing server thread: " + hashCode() );
@@ -295,10 +308,11 @@
private boolean respondToRequest( HttpRequest request, HttpResponseStream response ) {
if (_debug) System.out.println( "** Server thread " + hashCode() + " handling request: " + request );
boolean keepAlive = isKeepAlive( request );
+ WebResource resource = null;
try {
response.restart();
response.setProtocol( getResponseProtocol( request ) );
- WebResource resource = getResource( request );
+ resource = getResource( request );
if (resource == null) {
response.setResponse( HttpURLConnection.HTTP_NOT_FOUND, "unable to find " + request.getURI() );
} else {
@@ -311,7 +325,6 @@
if (_debug) System.out.println( "** Server thread " + hashCode() + " sending header: " + headers[i] );
response.addHeader( headers[i] );
}
- response.write( resource );
}
} catch (UnknownMethodException e) {
response.setResponse( HttpURLConnection.HTTP_BAD_METHOD, "unsupported method: " + e.getMethod() );
@@ -319,6 +332,7 @@
t.printStackTrace();
response.setResponse( HttpURLConnection.HTTP_INTERNAL_ERROR, t.toString() );
}
+ try { response.write( resource ); } catch (IOException e) { System.out.println( "*** Failed to send reply: " + e ); }
return keepAlive;
}
@@ -452,7 +466,7 @@
void write( WebResource resource ) throws IOException {
flushHeaders();
- resource.writeTo( _stream );
+ if (resource != null) resource.writeTo( _stream );
_stream.flush();
}
|
|
From: Russell G. <rus...@us...> - 2003-10-17 14:02:16
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/pseudoserver
In directory sc8-pr-cvs1:/tmp/cvs-serv8893/test/com/meterware/pseudoserver
Modified Files:
PseudoServerTest.java SocketConnection.java
Log Message:
record thread names for pseudoserver and complete error status replies
Index: PseudoServerTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/pseudoserver/PseudoServerTest.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- PseudoServerTest.java 30 Sep 2003 00:15:05 -0000 1.12
+++ PseudoServerTest.java 17 Oct 2003 13:58:10 -0000 1.13
@@ -102,6 +102,7 @@
sendHTTPLine( os, "GET /sample HTTP/1.1" );
sendHTTPLine( os, "Host: meterware.com" );
+ sendHTTPLine( os, "Connection: close" );
sendHTTPLine( os, "" );
StringBuffer sb = new StringBuffer();
Index: SocketConnection.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/pseudoserver/SocketConnection.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SocketConnection.java 30 Sep 2003 00:15:05 -0000 1.2
+++ SocketConnection.java 17 Oct 2003 13:58:10 -0000 1.3
@@ -48,6 +48,10 @@
}
+ void close() throws IOException {
+ _socket.close();
+ }
+
SocketResponse getResponse( String method, String path ) throws IOException {
if (_isChunking) throw new IllegalStateException( "May not initiate a new request while chunking." );
sendHTTPLine( method + ' ' + path + " HTTP/1.1" );
|
|
From: Russell G. <rus...@us...> - 2003-10-17 13:53:51
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv6112/doc
Modified Files:
release_notes.txt
Log Message:
bug #823433: Document.cookie now defaults to empty string
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.312
retrieving revision 1.313
diff -u -r1.312 -r1.313
--- release_notes.txt 2 Oct 2003 00:04:57 -0000 1.312
+++ release_notes.txt 17 Oct 2003 13:44:58 -0000 1.313
@@ -13,6 +13,10 @@
Revision History:
+17-Oct-2003
+Problems fixed:
+ 1. Bug #823433: document.cookie now defaults to the empty string, like IE and Mozilla, rather than null
+
1-Oct-2003
Acknowledgements:
Thanks to Patrick Lightbody for adding JavaScript support for the Style object
|
|
From: Russell G. <rus...@us...> - 2003-10-17 13:52:06
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv6112/src/com/meterware/httpunit
Modified Files:
HTMLPage.java
Log Message:
bug #823433: Document.cookie now defaults to empty string
Index: HTMLPage.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/HTMLPage.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- HTMLPage.java 6 Jul 2003 13:20:07 -0000 1.30
+++ HTMLPage.java 17 Oct 2003 13:44:58 -0000 1.31
@@ -210,7 +210,12 @@
public String getCookie() {
- return getResponse().getCookieHeader();
+ return emptyIfNull( getResponse().getCookieHeader() );
+ }
+
+
+ private String emptyIfNull( String string ) {
+ return string == null ? "" : string;
}
|
|
From: Russell G. <rus...@us...> - 2003-10-17 13:52:02
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv6112/test/com/meterware/httpunit/javascript
Modified Files:
ScriptingTest.java
Log Message:
bug #823433: Document.cookie now defaults to empty string
Index: ScriptingTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/ScriptingTest.java,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- ScriptingTest.java 2 Oct 2003 02:43:47 -0000 1.55
+++ ScriptingTest.java 17 Oct 2003 13:44:58 -0000 1.56
@@ -607,6 +607,21 @@
}
+ public void testReadNoCookie() throws Exception {
+ defineResource( "OnCommand.html", "<html><head><script language='JavaScript'>" +
+ "function viewCookies() { \n" +
+ " alert( 'cookies: ' + document.cookie );\n" +
+ "}" +
+ "</script></head>\n" +
+ "<body onLoad='viewCookies()'>\n" +
+ "</body></html>" );
+ WebConversation wc = new WebConversation();
+ wc.getResponse( getHostPath() + "/OnCommand.html" );
+ assertEquals( "Alert message 1", "cookies: ", wc.popNextAlert() );
+ assertNull( "Alert should have been removed", wc.getNextAlert() );
+ }
+
+
public void testSimpleSetCookie() throws Exception {
defineResource( "OnCommand.html", "<html><head></head>\n" +
"<body onLoad='document.cookie=\"color=red;path=/\"'>\n" +
|
|
From: Russell G. <rus...@us...> - 2003-10-02 18:15:43
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver
In directory sc8-pr-cvs1:/tmp/cvs-serv23766/src/com/meterware/pseudoserver
Modified Files:
PseudoServer.java
Log Message:
Added control over pseudoserver timeout
Index: PseudoServer.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver/PseudoServer.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- PseudoServer.java 30 Sep 2003 00:15:05 -0000 1.13
+++ PseudoServer.java 2 Oct 2003 18:15:35 -0000 1.14
@@ -41,6 +41,8 @@
/** Number of outstanding server sockets that must be present before trying to wait for one to be released. **/
private static int _waitThreshhold = 10;
+ private final int _socketTimeout;
+ private static final int DEFAULT_SOCKET_TIMEOUT = 1000;
/**
@@ -80,6 +82,12 @@
public PseudoServer() {
+ this( DEFAULT_SOCKET_TIMEOUT );
+ }
+
+
+ public PseudoServer( int socketTimeout ) {
+ _socketTimeout = socketTimeout;
Thread t = new Thread() {
public void run() {
while (_active) {
@@ -263,7 +271,7 @@
private void serveRequests( Socket socket ) throws IOException {
- socket.setSoTimeout( 1000 );
+ socket.setSoTimeout( _socketTimeout );
socket.setTcpNoDelay( true );
if (_debug) System.out.println( "** Created server thread: " + hashCode() );
|
|
From: Russell G. <rus...@us...> - 2003-10-02 02:43:51
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv2063/src/com/meterware/httpunit/javascript
Modified Files:
JavaScript.java
Log Message:
Use a set of appropriate values for style.display
Index: JavaScript.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/javascript/JavaScript.java,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- JavaScript.java 2 Oct 2003 00:04:57 -0000 1.55
+++ JavaScript.java 2 Oct 2003 02:43:47 -0000 1.56
@@ -696,7 +696,7 @@
static public class Style extends JavaScriptEngine {
- private String _display = "true";
+ private String _display = "visible";
public String getClassName() {
|
|
From: Russell G. <rus...@us...> - 2003-10-02 02:43:51
|
Update of /cvsroot/httpunit/httpunit/sitedocs/doc In directory sc8-pr-cvs1:/tmp/cvs-serv2063/sitedocs/doc Modified Files: javascript-support.html Log Message: Use a set of appropriate values for style.display Index: javascript-support.html =================================================================== RCS file: /cvsroot/httpunit/httpunit/sitedocs/doc/javascript-support.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- javascript-support.html 2 Oct 2003 00:04:57 -0000 1.4 +++ javascript-support.html 2 Oct 2003 02:43:46 -0000 1.5 @@ -110,7 +110,7 @@ <h2>Style</h2> <h4>properties</h4> <ul> -<li>display - r/w whether the element is to be displayed</li> +<li>display - r/w browser-specific display control</li> </ul> <h2>Form (inherits from HTMLElement)</h2> |
|
From: Russell G. <rus...@us...> - 2003-10-02 02:43:51
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv2063/test/com/meterware/httpunit/javascript
Modified Files:
ScriptingTest.java
Log Message:
Use a set of appropriate values for style.display
Index: ScriptingTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/ScriptingTest.java,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- ScriptingTest.java 2 Oct 2003 00:04:57 -0000 1.54
+++ ScriptingTest.java 2 Oct 2003 02:43:47 -0000 1.55
@@ -586,13 +586,14 @@
" var element = document.getElementById( id );\n" +
" alert( 'element with id ' + id + ' has style.display ' + element.style.display );\n" +
"}\n" +
- "function swapDisplay( id ) {" +
+ "function setDisplay( id, value ) {" +
" var element = document.getElementById( id );\n" +
- " element.style.display = !element.style.display;\n" +
+ " element.style.display = value;\n" +
"}\n" +
"function doAll() {\n" +
+ " setDisplay('test','hidden'); \n" +
" showDisplay('test');\n" +
- " swapDisplay('test'); \n" +
+ " setDisplay('test','visible'); \n" +
" showDisplay('test');\n" +
"}\n" +
"</script>" +
@@ -601,8 +602,8 @@
WebConversation wc = new WebConversation();
wc.getResponse( getHostPath() + "/start.html" );
- assertEquals( "element with id test has style.display true", wc.popNextAlert() );
- assertEquals( "element with id test has style.display false", wc.popNextAlert() );
+ assertEquals( "element with id test has style.display hidden", wc.popNextAlert() );
+ assertEquals( "element with id test has style.display visible", wc.popNextAlert() );
}
|
|
From: Russell G. <rus...@us...> - 2003-10-02 01:43:52
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv13727/doc
Modified Files:
release_notes.txt
Log Message:
from Patrick Lightbody: support HTMLElement.style.display
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.311
retrieving revision 1.312
diff -u -r1.311 -r1.312
--- release_notes.txt 1 Oct 2003 12:11:13 -0000 1.311
+++ release_notes.txt 2 Oct 2003 00:04:57 -0000 1.312
@@ -13,6 +13,13 @@
Revision History:
+ 1-Oct-2003
+Acknowledgements:
+ Thanks to Patrick Lightbody for adding JavaScript support for the Style object
+
+Additions:
+ 1. Added support for javascript HTMLElement.style property
+
30-Sep-2003
Problems fixed:
1. HttpUnit no longer complains about not being able to find the Rhino jar (js.jar) is scripting is disabled
|
|
From: Russell G. <rus...@us...> - 2003-10-02 01:24:28
|
Update of /cvsroot/httpunit/httpunit/sitedocs/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv13727/sitedocs/doc
Modified Files:
developers.xml javascript-support.html
Log Message:
from Patrick Lightbody: support HTMLElement.style.display
Index: developers.xml
===================================================================
RCS file: /cvsroot/httpunit/httpunit/sitedocs/doc/developers.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- developers.xml 23 Jun 2003 23:54:03 -0000 1.2
+++ developers.xml 2 Oct 2003 00:04:57 -0000 1.3
@@ -20,6 +20,7 @@
<developer name="Larry Hamel" email="htt...@co..."/>
<developer name="Daniel Jasmin" email="dj...@ra..."/>
<developer name="David D. Kilzer" email="ddk...@us..."/>
+ <developer name="Patrick Lightbody" email="Pat...@sp..."/>
<developer name="George Murnock" email="gmu...@be..."/>
<developer name="Mark Luty" email="ml...@pa..."/>
<developer name="Michael McCallum" email="mi...@gh..."/>
Index: javascript-support.html
===================================================================
RCS file: /cvsroot/httpunit/httpunit/sitedocs/doc/javascript-support.html,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- javascript-support.html 19 Sep 2003 18:53:43 -0000 1.3
+++ javascript-support.html 2 Oct 2003 00:04:57 -0000 1.4
@@ -104,6 +104,13 @@
<h4>properties</h4>
<ul>
<li>title - r/o the title attribute of the element</li>
+<li>style - r/o the style attribute</li>
+</ul>
+
+<h2>Style</h2>
+<h4>properties</h4>
+<ul>
+<li>display - r/w whether the element is to be displayed</li>
</ul>
<h2>Form (inherits from HTMLElement)</h2>
|
|
From: Russell G. <rus...@us...> - 2003-10-02 01:17:09
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv13727/test/com/meterware/httpunit/javascript
Modified Files:
ScriptingTest.java
Log Message:
from Patrick Lightbody: support HTMLElement.style.display
Index: ScriptingTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/ScriptingTest.java,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- ScriptingTest.java 23 May 2003 03:24:50 -0000 1.53
+++ ScriptingTest.java 2 Oct 2003 00:04:57 -0000 1.54
@@ -579,6 +579,33 @@
}
+ public void testStyleProperty() throws Exception {
+ defineResource( "start.html",
+ "<html><head><script language='JavaScript'>" +
+ "function showDisplay( id ) {" +
+ " var element = document.getElementById( id );\n" +
+ " alert( 'element with id ' + id + ' has style.display ' + element.style.display );\n" +
+ "}\n" +
+ "function swapDisplay( id ) {" +
+ " var element = document.getElementById( id );\n" +
+ " element.style.display = !element.style.display;\n" +
+ "}\n" +
+ "function doAll() {\n" +
+ " showDisplay('test');\n" +
+ " swapDisplay('test'); \n" +
+ " showDisplay('test');\n" +
+ "}\n" +
+ "</script>" +
+ "</head><body onLoad='doAll();'>" +
+ "<div id='test'>foo</div></body></html>" );
+ WebConversation wc = new WebConversation();
+ wc.getResponse( getHostPath() + "/start.html" );
+
+ assertEquals( "element with id test has style.display true", wc.popNextAlert() );
+ assertEquals( "element with id test has style.display false", wc.popNextAlert() );
+ }
+
+
public void testSimpleSetCookie() throws Exception {
defineResource( "OnCommand.html", "<html><head></head>\n" +
"<body onLoad='document.cookie=\"color=red;path=/\"'>\n" +
|
|
From: Russell G. <rus...@us...> - 2003-10-02 00:05:40
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv13727/src/com/meterware/httpunit/javascript
Modified Files:
JavaScript.java
Log Message:
from Patrick Lightbody: support HTMLElement.style.display
Index: JavaScript.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/javascript/JavaScript.java,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- JavaScript.java 23 Sep 2003 12:13:44 -0000 1.54
+++ JavaScript.java 2 Oct 2003 00:04:57 -0000 1.55
@@ -85,6 +85,7 @@
InvocationTargetException, ClassDefinitionException, PropertyException {
ScriptableObject.defineClass( scope, Window.class );
ScriptableObject.defineClass( scope, Document.class );
+ ScriptableObject.defineClass( scope, Style.class );
ScriptableObject.defineClass( scope, Location.class );
ScriptableObject.defineClass( scope, Navigator.class );
ScriptableObject.defineClass( scope, Screen.class );
@@ -693,6 +694,27 @@
}
+ static public class Style extends JavaScriptEngine {
+
+ private String _display = "true";
+
+
+ public String getClassName() {
+ return "Style";
+ }
+
+
+ public String jsGet_display() {
+ return _display;
+ }
+
+
+ public void jsSet_display( String display ) {
+ _display = display;
+ }
+ }
+
+
static public class Navigator extends JavaScriptEngine {
private ClientProperties _clientProperties;
@@ -840,6 +862,7 @@
static public class HTMLElement extends JavaScriptEngine {
+ private Style _style;
private Document _document;
@@ -853,10 +876,16 @@
}
+ public Style jsGet_style() {
+ return _style;
+ }
+
+
void initialize( JavaScriptEngine parent, ScriptableDelegate scriptable )
throws JavaScriptException, NotAFunctionException, PropertyException, SAXException {
super.initialize( parent, scriptable );
_document = (Document) parent;
+ _style = (Style) Context.getCurrentContext().newObject( this, "Style" );
}
}
|
|
From: Russell G. <rus...@us...> - 2003-10-01 12:11:17
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv27537/doc
Modified Files:
release_notes.txt
Log Message:
Disable 'Rhino not found' error message when scripting is disabled
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.310
retrieving revision 1.311
diff -u -r1.310 -r1.311
--- release_notes.txt 19 Sep 2003 18:53:42 -0000 1.310
+++ release_notes.txt 1 Oct 2003 12:11:13 -0000 1.311
@@ -13,6 +13,11 @@
Revision History:
+30-Sep-2003
+Problems fixed:
+ 1. HttpUnit no longer complains about not being able to find the Rhino jar (js.jar) is scripting is disabled
+ before any pages are read.
+
16-Sep-2003
Acknowledgements:
Thanks to Chris Hane for making it easier to add support for javascript properties and for providing support for
|
|
From: Russell G. <rus...@us...> - 2003-10-01 12:11:17
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv27537/src/com/meterware/httpunit
Modified Files:
HttpUnitOptions.java
Log Message:
Disable 'Rhino not found' error message when scripting is disabled
Index: HttpUnitOptions.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/HttpUnitOptions.java,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- HttpUnitOptions.java 27 Mar 2003 03:36:37 -0000 1.39
+++ HttpUnitOptions.java 1 Oct 2003 12:11:14 -0000 1.40
@@ -52,9 +52,9 @@
_characterSet = HttpUnitUtils.DEFAULT_CHARACTER_SET;
_contentType = DEFAULT_CONTENT_TYPE;
_postIncludesCharset = false;
+ _exceptionsThrownOnScriptError = true;
setScriptEngineClassName( DEFAULT_SCRIPT_ENGINE_FACTORY );
setScriptingEnabled( true );
- setExceptionsThrownOnScriptError( true );
}
|
|
From: Russell G. <rus...@us...> - 2003-09-30 00:16:52
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver
In directory sc8-pr-cvs1:/tmp/cvs-serv22169/src/com/meterware/pseudoserver
Modified Files:
HttpRequest.java PseudoServer.java PseudoServlet.java
ReceivedHttpMessage.java
Log Message:
Handle message terminator for chunked encoding
Index: HttpRequest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver/HttpRequest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- HttpRequest.java 17 Sep 2003 01:21:15 -0000 1.6
+++ HttpRequest.java 30 Sep 2003 00:15:05 -0000 1.7
@@ -31,7 +31,7 @@
/**
* Represents a single HTTP request, extracted from the input stream.
*/
-class HttpRequest extends ReceivedHttpMessage {
+public class HttpRequest extends ReceivedHttpMessage {
private String _protocol;
private String _command;
@@ -44,7 +44,7 @@
}
- protected void interpretMessageHeader( String messageHeader ) {
+ void interpretMessageHeader( String messageHeader ) {
StringTokenizer st = new StringTokenizer( messageHeader );
_command = st.nextToken();
_uri = st.nextToken();
@@ -52,21 +52,31 @@
}
- protected void appendMessageHeader( StringBuffer sb ) {
+ void appendMessageHeader( StringBuffer sb ) {
sb.append( _command ).append( ' ' ).append( _uri ).append( ' ' ).append( _protocol );
}
- String getCommand() {
+ /**
+ * Returns the command associated with this request.
+ */
+ public String getCommand() {
return _command;
}
- String getURI() {
+
+ /**
+ * Returns the URI specified in the message header for this request.
+ */
+ public String getURI() {
return _uri;
}
- String getProtocol() {
+ /**
+ * Returns the protocol string specified in the message header for this request.
+ */
+ public String getProtocol() {
return _protocol;
}
@@ -75,11 +85,20 @@
* Returns the parameter with the specified name. If no such parameter exists, will
* return null.
**/
- String[] getParameter( String name ) {
+ public String[] getParameter( String name ) {
if (_parameters == null) {
- _parameters = readParameters( new String( getBody() ) );
+ if (_command.equalsIgnoreCase( "GET" ) || _command.equalsIgnoreCase( "HEAD" )) {
+ _parameters = readParameters( getParameterString( _uri ) );
+ } else {
+ _parameters = readParameters( new String( getBody() ) );
+ }
}
return (String[]) _parameters.get( name );
+ }
+
+
+ private String getParameterString( String uri ) {
+ return uri.indexOf( '?' ) < 0 ? "" : uri.substring( uri.indexOf( '?' )+1 );
}
Index: PseudoServer.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver/PseudoServer.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- PseudoServer.java 17 Sep 2003 01:21:15 -0000 1.12
+++ PseudoServer.java 30 Sep 2003 00:15:05 -0000 1.13
@@ -327,6 +327,7 @@
private WebResource getResource( HttpRequest request ) throws IOException {
Object resource = _resources.get( request.getURI() );
+ if (resource == null) resource = _resources.get( withoutParameters( request.getURI() ) );
if (request.getCommand().equals( "GET" ) && resource instanceof WebResource) {
return (WebResource) resource;
@@ -361,6 +362,11 @@
} else {
return null;
}
+ }
+
+
+ private String withoutParameters( String uri ) {
+ return uri.indexOf( '?' ) < 0 ? uri : uri.substring( 0, uri.indexOf( '?' ) );
}
Index: PseudoServlet.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver/PseudoServlet.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- PseudoServlet.java 17 Sep 2003 01:21:15 -0000 1.4
+++ PseudoServlet.java 30 Sep 2003 00:15:05 -0000 1.5
@@ -73,7 +73,7 @@
void init( HttpRequest requestStream ) {
- _requestStream = requestStream;
+ _request = requestStream;
}
@@ -81,7 +81,7 @@
* Returns the header with the specified name. If no such header exists, will return null.
**/
protected String getHeader( String name ) {
- return _requestStream.getHeader( name );
+ return _request.getHeader( name );
}
@@ -90,7 +90,7 @@
* will return null.
**/
protected String[] getParameter( String name ) {
- return _requestStream.getParameter( name );
+ return _request.getParameter( name );
}
@@ -98,21 +98,21 @@
* Returns a reader for the body of the request.
**/
protected Reader getReader() {
- return _requestStream.getReader();
+ return _request.getReader();
}
protected byte[] getBody() {
- return _requestStream.getBody();
+ return _request.getBody();
}
protected HttpRequest getRequest() {
- return _requestStream;
+ return _request;
}
- private HttpRequest _requestStream;
+ private HttpRequest _request;
}
Index: ReceivedHttpMessage.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver/ReceivedHttpMessage.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ReceivedHttpMessage.java 17 Sep 2003 01:21:15 -0000 1.1
+++ ReceivedHttpMessage.java 30 Sep 2003 00:15:05 -0000 1.2
@@ -78,7 +78,7 @@
}
- protected void appendContents( StringBuffer sb ) {
+ void appendContents( StringBuffer sb ) {
for (Enumeration e = _headers.keys(); e.hasMoreElements();) {
Object key = e.nextElement();
sb.append( " " ).append( key ).append( ": " ).append( _headers.get( key ) ).append( "\n" );
@@ -106,6 +106,7 @@
if ("chunked".equalsIgnoreCase( getHeader( "Transfer-Encoding") )) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
while (getNextChunkLength( inputStream ) > 0) { baos.write( readDelimitedChunk( inputStream ) ); }
+ flushChunkTrailer( inputStream );
_requestBody = baos.toByteArray();
} else {
_requestBody = new byte[ getContentLength() ];
@@ -115,6 +116,12 @@
}
+ private void flushChunkTrailer( InputStream inputStream ) throws IOException {
+ byte[] line;
+ do { line = readDelimitedChunk( inputStream ); } while (line.length > 0);
+ }
+
+
private int getNextChunkLength( InputStream inputStream ) throws IOException {
try {
return Integer.parseInt( readHeaderLine( inputStream ) );
@@ -155,10 +162,10 @@
}
- protected abstract void appendMessageHeader( StringBuffer sb );
+ abstract void appendMessageHeader( StringBuffer sb );
- protected abstract void interpretMessageHeader( String messageHeader );
+ abstract void interpretMessageHeader( String messageHeader );
}
|
|
From: Russell G. <rus...@us...> - 2003-09-30 00:15:13
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/pseudoserver
In directory sc8-pr-cvs1:/tmp/cvs-serv22169/test/com/meterware/pseudoserver
Modified Files:
PseudoServerTest.java SocketConnection.java
Log Message:
Handle message terminator for chunked encoding
Index: PseudoServerTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/pseudoserver/PseudoServerTest.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- PseudoServerTest.java 17 Sep 2003 01:21:15 -0000 1.11
+++ PseudoServerTest.java 30 Sep 2003 00:15:05 -0000 1.12
@@ -156,6 +156,26 @@
}
+ public void testPseudoServletWithGET() throws Exception {
+ String resourceName = "tellMe";
+ String name = "Charlie";
+ final String prefix = "Hello there, ";
+ String expectedResponse = prefix + name;
+
+ defineResource( resourceName, new PseudoServlet() {
+ public WebResource getGetResponse() {
+ return new WebResource( prefix + getParameter( "name" )[0], "text/plain" );
+ }
+ } );
+
+ SocketConnection conn = new SocketConnection( "localhost", getHostPort() );
+ SocketConnection.SocketResponse response = conn.getResponse( "GET", '/' + resourceName + "?name=" + name );
+ assertEquals( "Response code", 200, response.getResponseCode() );
+ assertEquals( "Content type", "text/plain", response.getHeader( "Content-Type" ) );
+ assertEquals( "Response", expectedResponse, new String( response.getBody() ) );
+ }
+
+
public void testChunkedRequest() throws Exception {
super.defineResource( "/chunkedServlet", new PseudoServlet() {
public WebResource getPostResponse() {
@@ -173,10 +193,41 @@
}
+ // need test: respond with HTTP_BAD_REQUEST if header line is bad
+
+
+ public void testChunkedRequestFollowedByAnother() throws Exception {
+ super.defineResource( "/chunkedServlet", new PseudoServlet() {
+ public WebResource getPostResponse() {
+ return new WebResource( super.getBody(), "text/plain" );
+ }
+ } );
+
+
+ SocketConnection conn = new SocketConnection( "localhost", getHostPort() );
+ conn.startChunkedResponse( "POST", "/chunkedServlet" );
+ conn.sendChunk( "This " );
+ conn.sendChunk( "is " );
+ conn.sendChunk( "chunked.");
+ SocketConnection.SocketResponse response = conn.getResponse();
+ assertEquals( "retrieved body", "This is chunked.", new String( response.getBody() ) );
+
+
+ // Make a second request to duplicate the problem...
+ conn.startChunkedResponse( "POST", "/chunkedServlet" );
+ conn.sendChunk( "This " );
+ conn.sendChunk( "is " );
+ conn.sendChunk( "also " );
+ conn.sendChunk( "chunked.");
+ SocketConnection.SocketResponse response2 = conn.getResponse();
+ assertEquals( "retrieved body", "This is also chunked.", new String( response2.getBody() ) );
+ }
+
+
public void testChunkedResponse() throws Exception {
defineResource( "/chunkedServlet", new PseudoServlet() {
public WebResource getGetResponse() {
- WebResource webResource = new WebResource( "5\r\nSent \r\n3\r\nin \r\n07\r\nchunks.\r\n0\r\n", "text/plain" );
+ WebResource webResource = new WebResource( "5\r\nSent \r\n3\r\nin \r\n07\r\nchunks.\r\n0\r\n\r\n", "text/plain" );
webResource.addHeader( "Transfer-Encoding: chunked" );
return webResource;
}
Index: SocketConnection.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/pseudoserver/SocketConnection.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- SocketConnection.java 17 Sep 2003 01:21:15 -0000 1.1
+++ SocketConnection.java 30 Sep 2003 00:15:05 -0000 1.2
@@ -90,7 +90,9 @@
SocketResponse getResponse() throws IOException {
if (!_isChunking) throw new IllegalStateException( "Not chunking a request." );
+ _isChunking = false;
sendHTTPLine( "0" );
+ sendHTTPLine( "" );
return new SocketResponse( _is );
}
@@ -113,12 +115,12 @@
}
- protected void appendMessageHeader( StringBuffer sb ) {
+ void appendMessageHeader( StringBuffer sb ) {
sb.append( _protocol ).append( ' ' ).append( _responseCode ).append( ' ' ).append( _message );
}
- protected void interpretMessageHeader( String messageHeader ) {
+ void interpretMessageHeader( String messageHeader ) {
int s1 = messageHeader.indexOf( ' ' );
int s2 = messageHeader.indexOf( ' ', s1+1 );
|
|
From: Russell G. <rus...@us...> - 2003-09-23 12:16:54
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv30340/test/com/meterware/httpunit/javascript
Modified Files:
HTMLElementTest.java
Log Message:
Make scripting package accessible
Index: HTMLElementTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/HTMLElementTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- HTMLElementTest.java 19 Sep 2003 18:53:43 -0000 1.4
+++ HTMLElementTest.java 23 Sep 2003 12:13:44 -0000 1.5
@@ -113,8 +113,8 @@
WebConversation wc = new WebConversation();
WebResponse response = wc.getResponse( getHostPath() + "/start.html" );
- assertEquals( "tabindex", "1", response.getScriptableObject().evaluateURL( "document.perform.name.tabindex") );
- assertEquals( "maxlength", "20", response.getScriptableObject().evaluateURL( "document.perform.name.maxlength") );
+ assertEquals( "tabindex", "1", response.getScriptableObject().evaluateExpression( "document.perform.name.tabindex") );
+ assertEquals( "maxlength", "20", response.getScriptableObject().evaluateExpression( "document.perform.name.maxlength") );
}
|
|
From: Russell G. <rus...@us...> - 2003-09-23 12:16:53
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv30340/src/com/meterware/httpunit/javascript
Modified Files:
JavaScript.java
Log Message:
Make scripting package accessible
Index: JavaScript.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/javascript/JavaScript.java,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -r1.53 -r1.54
--- JavaScript.java 23 May 2003 21:55:12 -0000 1.53
+++ JavaScript.java 23 Sep 2003 12:13:44 -0000 1.54
@@ -171,7 +171,7 @@
/**
* Evaluates the specified string as JavaScript. Will return null if the script has no return value.
*/
- public String getURLContents( String urlString ) {
+ public String evaluateScriptExpression( String urlString ) {
try {
Object result = Context.getCurrentContext().evaluateString( this, urlString, "httpunit", 0, null );
return (result == null || result instanceof Undefined) ? null : result.toString();
|
|
From: Russell G. <rus...@us...> - 2003-09-23 12:15:28
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv30340/src/com/meterware/httpunit
Modified Files:
WebWindow.java
Log Message:
Make scripting package accessible
Index: WebWindow.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebWindow.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- WebWindow.java 23 May 2003 03:24:50 -0000 1.14
+++ WebWindow.java 23 Sep 2003 12:13:43 -0000 1.15
@@ -162,8 +162,8 @@
response = _client.newResponse( request, frameName );
} else {
WebRequestSource wrs = request.getWebRequestSource();
- String result = (wrs == null) ? getCurrentPage().getScriptableObject().evaluateURL( urlString )
- : wrs.getScriptableDelegate().evaluateURL( urlString );
+ String result = (wrs == null) ? getCurrentPage().getScriptableObject().evaluateExpression( urlString )
+ : wrs.getScriptableDelegate().evaluateExpression( urlString );
if (result != null) response = new DefaultWebResponse( _client, frameName, request.getURL(), result );
}
|
|
From: Russell G. <rus...@us...> - 2003-09-23 12:14:49
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/scripting
In directory sc8-pr-cvs1:/tmp/cvs-serv30340/src/com/meterware/httpunit/scripting
Modified Files:
ScriptableDelegate.java ScriptingEngine.java
Log Message:
Make scripting package accessible
Index: ScriptableDelegate.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/scripting/ScriptableDelegate.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ScriptableDelegate.java 2 Apr 2003 15:31:12 -0000 1.8
+++ ScriptableDelegate.java 23 Sep 2003 12:13:44 -0000 1.9
@@ -37,7 +37,7 @@
public boolean supportsScriptLanguage( String language ) { return false; }
public String executeScript( String language, String script ) { return ""; }
public boolean performEvent( String eventScript ) { return true; }
- public String getURLContents( String urlString ) { return null; }
+ public String evaluateScriptExpression( String urlString ) { return null; }
public ScriptingEngine newScriptingEngine( ScriptableDelegate child ) { return this; }
};
@@ -66,11 +66,11 @@
/**
- * Evaluates the specified javascript URL.
+ * Evaluates the specified javascript expression, returning its value.
**/
- public String evaluateURL( String urlString ) {
+ public String evaluateExpression( String urlString ) {
if (urlString.length() == 0) return null;
- return getScriptEngine().getURLContents( urlString );
+ return getScriptEngine().evaluateScriptExpression( urlString );
}
Index: ScriptingEngine.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/scripting/ScriptingEngine.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ScriptingEngine.java 9 Mar 2003 20:35:48 -0000 1.5
+++ ScriptingEngine.java 23 Sep 2003 12:13:44 -0000 1.6
@@ -49,7 +49,7 @@
/**
* Evaluates the specified string as JavaScript. Will return null if the script has no return value.
*/
- public String getURLContents( String urlString );
+ public String evaluateScriptExpression( String urlString );
/**
|
|
From: Russell G. <rus...@us...> - 2003-09-23 12:14:48
|
Update of /cvsroot/httpunit/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv30340
Modified Files:
build.xml
Log Message:
Make scripting package accessible
Index: build.xml
===================================================================
RCS file: /cvsroot/httpunit/httpunit/build.xml,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- build.xml 21 Aug 2003 11:52:36 -0000 1.68
+++ build.xml 23 Sep 2003 12:13:43 -0000 1.69
@@ -30,7 +30,7 @@
<property name="archive.dir" value="${dist.dir}/${name}-${version}" />
<property name="classpath" value="" />
<property name="web.dir" value="web" />
- <property name="packages" value="com.meterware.httpunit,com.meterware.servletunit,com.meterware.pseudoserver,com.meterware.httpunit.cookies,com.meterware.httpunit.parsing" />
+ <property name="packages" value="com.meterware.httpunit,com.meterware.servletunit,com.meterware.pseudoserver,com.meterware.httpunit.cookies,com.meterware.httpunit.scripting,com.meterware.httpunit.parsing" />
<property name="test.class" value="com.meterware.httpunit.HttpUnitSuite" />
<property name="servlet.test.class" value="com.meterware.servletunit.ServletUnitSuite" />
|