[Httpunit-commit] CVS: httpunit/src/com/meterware/httpunit WebResponse.java,1.95,1.96
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2002-11-03 06:31:17
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory usw-pr-cvs1:/tmp/cvs-serv18976/src/com/meterware/httpunit
Modified Files:
WebResponse.java
Log Message:
Support location.replace
Index: WebResponse.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebResponse.java,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -r1.95 -r1.96
--- WebResponse.java 1 Nov 2002 14:55:00 -0000 1.95
+++ WebResponse.java 3 Nov 2002 06:31:14 -0000 1.96
@@ -608,8 +608,6 @@
} else if (propertyName.equalsIgnoreCase( "parent" )) {
return getFrameName().equals( WebRequest.TOP_FRAME ) ? null
: _window.getFrameContents( WebFrame.getParentFrameName( getFrameName() ) ).getScriptableObject();
- } else if (propertyName.equalsIgnoreCase( "location" )) {
- return getURL().toExternalForm();
} else if (propertyName.equalsIgnoreCase( "opener" )) {
return getFrameName().equals( WebRequest.TOP_FRAME ) ? getScriptable( _window.getOpener() ) : null;
} else if (propertyName.equalsIgnoreCase( "closed" )) {
@@ -639,17 +637,14 @@
if (getFrameName().equals( WebRequest.TOP_FRAME )) {
_window.setName( value.toString() );
}
- } else if (propertyName.equalsIgnoreCase( "location" )) {
- try {
- getWindow().getResponse( new GetMethodWebRequest( _url, value.toString(), _frameName ) );
- } catch (IOException e) {
- throw new RuntimeException( "Error handling 'location=': " + e );
- } catch (SAXException e) {
- throw new RuntimeException( "Error handling 'location=': " + e );
- }
} else {
super.set( propertyName, value );
}
+ }
+
+
+ public void setLocation( String relativeURL ) throws IOException, SAXException {
+ getWindow().getResponse( new GetMethodWebRequest( _url, relativeURL, _frameName ) );
}
|