[Httpunit-commit] CVS: httpunit/src/com/meterware/httpunit HTMLPage.java,1.17,1.18 WebClient.java,1.
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2002-12-13 12:57:14
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv16278/src/com/meterware/httpunit
Modified Files:
HTMLPage.java WebClient.java WebResponse.java
Log Message:
Added support for Document.cookie
Index: HTMLPage.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/HTMLPage.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- HTMLPage.java 25 Nov 2002 22:41:06 -0000 1.17
+++ HTMLPage.java 13 Dec 2002 12:57:11 -0000 1.18
@@ -236,6 +236,16 @@
public void replaceText( String text, String contentType ) {
getResponse().replaceText( text, contentType );
}
+
+
+ public void setCookie( String name, String value ) {
+ getResponse().setCookie( name, value );
+ }
+
+
+ public String getCookie() {
+ return getResponse().getCookieHeader();
+ }
}
Index: WebClient.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebClient.java,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- WebClient.java 17 Nov 2002 00:17:07 -0000 1.47
+++ WebClient.java 13 Dec 2002 12:57:11 -0000 1.48
@@ -434,6 +434,11 @@
}
+ CookieJar getCookieJar() {
+ return _cookieJar;
+ }
+
+
void updateFrameContents( WebWindow requestWindow, String requestTarget, WebResponse response, RequestContext requestContext ) throws IOException, SAXException {
WebWindow window = getTargetWindow( requestWindow, requestTarget );
if (window != null) {
Index: WebResponse.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebResponse.java,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -r1.103 -r1.104
--- WebResponse.java 25 Nov 2002 22:41:07 -0000 1.103
+++ WebResponse.java 13 Dec 2002 12:57:11 -0000 1.104
@@ -1016,6 +1016,16 @@
}
+ void setCookie( String name, String value ) {
+ _client.addCookie( name, value );
+ }
+
+
+ String getCookieHeader() {
+ return _client.getCookieJar().getCookieHeaderField( getURL() );
+ }
+
+
//=======================================================================================
|