httpunit-commit Mailing List for httpunit (Page 26)
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-08-20 12:37:36
|
Update of /cvsroot/httpunit/httpunit/doc/tutorial/src/tutorial In directory sc8-pr-cvs1:/tmp/cvs-serv23336/doc/tutorial/src/tutorial Modified Files: PoolEditorTest.java Log Message: Fix compiler warnings Index: PoolEditorTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/doc/tutorial/src/tutorial/PoolEditorTest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- PoolEditorTest.java 11 Dec 2001 21:39:48 -0000 1.3 +++ PoolEditorTest.java 20 Aug 2003 12:06:15 -0000 1.4 @@ -3,7 +3,6 @@ import com.meterware.httpunit.*; import com.meterware.servletunit.*; -import java.util.ArrayList; import java.util.Arrays; import junit.framework.*; |
|
From: Russell G. <rus...@us...> - 2003-08-20 12:37:05
|
Update of /cvsroot/httpunit/httpunit/examples In directory sc8-pr-cvs1:/tmp/cvs-serv23336/examples Modified Files: ExampleTest.java Log Message: Fix compiler warnings Index: ExampleTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/examples/ExampleTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ExampleTest.java 28 Jan 2002 05:05:30 -0000 1.2 +++ ExampleTest.java 20 Aug 2003 12:06:15 -0000 1.3 @@ -1,11 +1,5 @@ import com.meterware.httpunit.*; -import java.io.IOException; -import java.net.MalformedURLException; - -import org.xml.sax.*; -import org.w3c.dom.*; - import junit.framework.*; |
|
From: Russell G. <rus...@us...> - 2003-08-20 12:37:05
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/scripting In directory sc8-pr-cvs1:/tmp/cvs-serv23336/src/com/meterware/httpunit/scripting Modified Files: SelectionOptions.java Log Message: Fix compiler warnings Index: SelectionOptions.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/scripting/SelectionOptions.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SelectionOptions.java 8 Aug 2002 20:47:22 -0000 1.2 +++ SelectionOptions.java 20 Aug 2003 12:06:15 -0000 1.3 @@ -19,7 +19,6 @@ * DEALINGS IN THE SOFTWARE. * *******************************************************************************************************************/ -import java.util.*; /** |
|
From: Russell G. <rus...@us...> - 2003-08-20 12:37:01
|
Update of /cvsroot/httpunit/httpunit/doc In directory sc8-pr-cvs1:/tmp/cvs-serv23336/doc Modified Files: todo.txt Log Message: Fix compiler warnings Index: todo.txt =================================================================== RCS file: /cvsroot/httpunit/httpunit/doc/todo.txt,v retrieving revision 1.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- todo.txt 4 Feb 2003 05:32:03 -0000 1.40 +++ todo.txt 20 Aug 2003 12:06:14 -0000 1.41 @@ -1,3 +1,8 @@ +High priority: +o Writeable 'name' Javascript attribute +o NoOp request when link is to same page w/o new parameters? +o Disable content-type header in MIME encoding? + Medium priority: o Support optional tags which hide their contents (as in OBJECT, etc.) o Check conformance with RFC 2109 - not currently sending $Version=1 string |
|
From: Russell G. <rus...@us...> - 2003-07-22 01:49:12
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/servletunit
In directory sc8-pr-cvs1:/tmp/cvs-serv21234/src/com/meterware/servletunit
Modified Files:
JUnitServlet.java
Log Message:
Handle null trace class name
Index: JUnitServlet.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/JUnitServlet.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- JUnitServlet.java 23 May 2003 03:11:10 -0000 1.6
+++ JUnitServlet.java 22 Jul 2003 01:49:08 -0000 1.7
@@ -185,6 +185,7 @@
protected String sgmlEscape( String s ) {
+ if (s == null) return "NULL";
StringBuffer result = new StringBuffer( s.length() );
char[] chars = s.toCharArray();
for (int i = 0; i < chars.length; i++) {
|
|
From: Russell G. <rus...@us...> - 2003-07-22 01:49:12
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/servletunit
In directory sc8-pr-cvs1:/tmp/cvs-serv21234/test/com/meterware/servletunit
Modified Files:
StatelessTest.java
Log Message:
Handle null trace class name
Index: StatelessTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/servletunit/StatelessTest.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- StatelessTest.java 17 Jun 2003 23:23:02 -0000 1.12
+++ StatelessTest.java 22 Jul 2003 01:49:09 -0000 1.13
@@ -225,10 +225,12 @@
WebClient client = sr.newClient();
WebRequest request = new GetMethodWebRequest( "http://host/Frames" );
- client.getResponse( request );
+ WebResponse page = client.getResponse( request );
HttpUserAgentTest.assertMatchingSet( "Frames defined for the conversation", new String[] { "_top", "red", "blue" }, client.getFrameNames() );
WebResponse response = client.getFrameContents( "red" );
assertEquals( "Frame contents", SimpleGetServlet.RESPONSE_TEXT, response.getText() );
+
+ page.getSubframeContents( page.getFrameNames()[0] );
}
|
|
From: Russell G. <rus...@us...> - 2003-07-06 13:21:19
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv2045/test/com/meterware/httpunit
Modified Files:
WebClientTest.java
Log Message:
Correct handling of gzipped response
Index: WebClientTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/WebClientTest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- WebClientTest.java 23 Mar 2003 01:43:15 -0000 1.14
+++ WebClientTest.java 6 Jul 2003 13:21:16 -0000 1.15
@@ -181,7 +181,9 @@
public void testGZIPHandling() throws Exception {
- String expectedResponse = "Here is my answer";
+ String expectedResponse = "Here is my answer. It needs to be reasonably long to make compression smaller " +
+ "than the raw message. It should be obvious when you reach that point. " +
+ "Of course it is more than that - it needs to be long enough to cause a problem.";
defineResource( "Compressed.html", new CompressedPseudoServlet( expectedResponse ) );
WebConversation wc = new WebConversation();
|
|
From: Russell G. <rus...@us...> - 2003-07-06 13:21:19
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv2045/doc
Modified Files:
release_notes.txt
Log Message:
Correct handling of gzipped response
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.306
retrieving revision 1.307
diff -u -r1.306 -r1.307
--- release_notes.txt 24 Jun 2003 22:40:36 -0000 1.306
+++ release_notes.txt 6 Jul 2003 13:21:16 -0000 1.307
@@ -13,6 +13,12 @@
Revision History:
+ 6-Jul-2003
+Additions:
+ 1. WebResponse and TableCell now support getElementsWithName and getElementNames to look up HTML elements.
+Problems fixed:
+ 1. gzip'ed responses were sometimes truncated.
+
24-Jun-2003
Additions:
1. rfe #721424: You can now set checkbox values in a form via: setCheckbox(name,boolean) or toggleCheckbox(name).
|
|
From: Russell G. <rus...@us...> - 2003-07-06 13:21:19
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv2045/src/com/meterware/httpunit
Modified Files:
WebResponse.java
Log Message:
Correct handling of gzipped response
Index: WebResponse.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebResponse.java,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -r1.120 -r1.121
--- WebResponse.java 23 Jun 2003 23:54:03 -0000 1.120
+++ WebResponse.java 6 Jul 2003 13:21:16 -0000 1.121
@@ -174,7 +174,7 @@
_contentLength = (length == null) ? -1 : Integer.parseInt( length );
}
return _contentLength;
- }
+ }
/**
@@ -288,6 +288,22 @@
/**
+ * Returns a list of HTML element names contained in this HTML section.
+ */
+ public String[] getElementNames() throws SAXException {
+ return getReceivedPage().getElementNames();
+ }
+
+
+ /**
+ * Returns the HTMLElements found in this segment with the specified name.
+ */
+ public HTMLElement[] getElementsWithName( String name ) throws SAXException {
+ return getReceivedPage().getElementsWithName( name );
+ }
+
+
+ /**
* Returns the forms found in the page in the order in which they appear.
* @exception SAXException thrown if there is an error parsing the response.
**/
@@ -719,7 +735,8 @@
}
if (encodedUsingGZIP()) {
- _inputStream = new GZIPInputStream( inputStream );
+ byte[] compressedData = readFromStream( inputStream, getContentLength() );
+ _inputStream = new GZIPInputStream( new ByteArrayInputStream( compressedData ) );
} else {
_inputStream = inputStream;
}
@@ -838,29 +855,37 @@
InputStream inputStream = getInputStream();
try {
- int bytesRemaining = getContentLength() < 0 ? Integer.MAX_VALUE : getContentLength();
- ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- byte[] buffer = new byte[8 * 1024];
- int count = 0;
- do {
- outputStream.write( buffer, 0, count );
- bytesRemaining -= count;
- if (bytesRemaining <= 0) break;
- count = inputStream.read( buffer, 0, buffer.length );
- } while (count != -1);
+ final int contentLength = this.encodedUsingGZIP() ? -1 : getContentLength();
+ int bytesRemaining = contentLength < 0 ? Integer.MAX_VALUE : contentLength;
+ byte[] bytes = readFromStream( inputStream, bytesRemaining );
- byte[] bytes = outputStream.toByteArray();
readTags( bytes );
_responseText = new String( bytes, getCharacterSet() );
_inputStream = new ByteArrayInputStream( bytes );
- if (HttpUnitOptions.isCheckContentLength() && getContentLength() >= 0 && bytes.length != getContentLength()) {
- throw new IOException("Truncated message. Expected length: " + getContentLength() +
+ if (HttpUnitOptions.isCheckContentLength() && contentLength >= 0 && bytes.length != contentLength) {
+ throw new IOException("Truncated message. Expected length: " + contentLength +
", Actual length: " + bytes.length);
}
} finally {
inputStream.close();
}
+ }
+
+
+ private byte[] readFromStream( InputStream inputStream, int maxBytes ) throws IOException {
+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+ byte[] buffer = new byte[8 * 1024];
+ int count = 0;
+ do {
+ outputStream.write( buffer, 0, count );
+ maxBytes -= count;
+ if (maxBytes <= 0) break;
+ count = inputStream.read( buffer, 0, Math.min( maxBytes, buffer.length ) );
+ } while (count != -1);
+
+ byte[] bytes = outputStream.toByteArray();
+ return bytes;
}
|
|
From: Russell G. <rus...@us...> - 2003-07-06 13:20:16
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv1853/test/com/meterware/httpunit
Modified Files:
WebPageTest.java
Log Message:
Added support for getNamedElements, getElementsWithName
Index: WebPageTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/WebPageTest.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- WebPageTest.java 1 Apr 2003 12:55:25 -0000 1.31
+++ WebPageTest.java 6 Jul 2003 13:20:09 -0000 1.32
@@ -449,4 +449,19 @@
assertImplements( "element with id 'link1'", simplePage.getElementWithID( "link1" ), WebLink.class );
assertImplements( "element with id '23'", simplePage.getElementWithID( "23" ), WebImage.class );
}
+
+
+ public void testGetElementsByName() throws Exception {
+ defineResource( "SimplePage.html",
+ "<html><head><title>A Sample Page</title></head>\n" +
+ "<body><form name='aForm'><input name=color></form>" +
+ "have <a id='link1' href='/other.html'>an <b>active</b> link</A>\n" +
+ "<img id='23' src='/images/arrow.gif' ALT='Next -->' WIDTH=1 HEIGHT=4>\n" +
+ "</body></html>\n" );
+ WebConversation wc = new WebConversation();
+ WebRequest request = new GetMethodWebRequest( getHostPath() + "/SimplePage.html" );
+ WebResponse simplePage = wc.getResponse( request );
+ assertImplement( "element with name 'aForm'", simplePage.getElementsWithName( "aForm" ), WebForm.class );
+ assertImplement( "element with name 'color'", simplePage.getElementsWithName( "color" ), FormControl.class );
+ }
}
|
|
From: Russell G. <rus...@us...> - 2003-07-06 13:20:16
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver
In directory sc8-pr-cvs1:/tmp/cvs-serv1853/src/com/meterware/pseudoserver
Modified Files:
HttpUserAgentTest.java
Log Message:
Added support for getNamedElements, getElementsWithName
Index: HttpUserAgentTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver/HttpUserAgentTest.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- HttpUserAgentTest.java 24 Jun 2003 22:39:41 -0000 1.11
+++ HttpUserAgentTest.java 6 Jul 2003 13:20:09 -0000 1.12
@@ -142,6 +142,13 @@
}
+ protected void assertImplement( String comment, Object[] objects, Class expectedClass ) {
+ for (int i = 0; i < objects.length; i++) {
+ assertImplements( comment, objects[i], expectedClass );
+ }
+ }
+
+
protected void assertImplements( String comment, Object object, Class expectedClass ) {
if (object == null) {
fail( comment + " should be of class " + expectedClass.getName() + " but is null" );
|
|
From: Russell G. <rus...@us...> - 2003-07-06 13:20:16
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv1853/src/com/meterware/httpunit
Modified Files:
HTMLPage.java HTMLSegment.java ParsedHTML.java
Log Message:
Added support for getNamedElements, getElementsWithName
Index: HTMLPage.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/HTMLPage.java,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- HTMLPage.java 2 Apr 2003 15:31:04 -0000 1.29
+++ HTMLPage.java 6 Jul 2003 13:20:07 -0000 1.30
@@ -221,7 +221,7 @@
public ScriptableDelegate[] getElementsByName( String name ) {
- return getDelegates( HTMLPage.this.getElementsByName( name ) );
+ return getDelegates( HTMLPage.this.getElementsWithName( name ) );
}
Index: HTMLSegment.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/HTMLSegment.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- HTMLSegment.java 23 Jun 2003 23:54:03 -0000 1.10
+++ HTMLSegment.java 6 Jul 2003 13:20:08 -0000 1.11
@@ -37,6 +37,18 @@
/**
+ * Returns the HTMLElements found in this segment with the specified name.
+ */
+ public HTMLElement[] getElementsWithName( String name ) throws SAXException;
+
+
+ /**
+ * Returns a list of HTML element names contained in this HTML section.
+ */
+ public String[] getElementNames() throws SAXException;
+
+
+ /**
* Returns the forms found in this HTML segment in the order in which they appear.
* @exception SAXException thrown if there is an error parsing the segment.
**/
Index: ParsedHTML.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/ParsedHTML.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- ParsedHTML.java 23 Jun 2003 23:54:03 -0000 1.49
+++ ParsedHTML.java 6 Jul 2003 13:20:08 -0000 1.50
@@ -161,11 +161,22 @@
}
-
- HTMLElement[] getElementsByName( String name ) {
+ /**
+ * Returns the HTML elements with the specified name.
+ */
+ public HTMLElement[] getElementsWithName( String name ) {
loadElements();
ArrayList elements = (ArrayList) _elementsByName.get( name );
return elements == null ? NO_ELEMENTS : (HTMLElement[]) elements.toArray( new HTMLElement[ elements.size() ] );
+ }
+
+
+ /**
+ * Returns a list of HTML element names contained in this HTML section.
+ */
+ public String[] getElementNames() {
+ loadElements();
+ return (String[]) _elementsByName.keySet().toArray( new String[ _elementsByName.size() ] );
}
|
|
From: Russell G. <rus...@us...> - 2003-06-24 22:40:40
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv25478/test/com/meterware/httpunit
Modified Files:
FormParametersTest.java
Log Message:
Added support for set/toggle checkbox
Index: FormParametersTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/FormParametersTest.java,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- FormParametersTest.java 4 May 2003 12:45:10 -0000 1.20
+++ FormParametersTest.java 24 Jun 2003 22:40:36 -0000 1.21
@@ -250,6 +250,38 @@
}
+ public void testCheckboxShortcuts() throws Exception {
+ defineWebPage( "Default", "<form method=GET id='boxes'>" +
+ "<Input type=checkbox name=use_color>" +
+ "<Input type=checkbox name=running value=fast>" +
+ "<Input type=checkbox name=color value=red>Scarlet" +
+ "<Input type=checkbox name=color value=blue>Turquoise" +
+ "<Input type=text name=fish>" +
+ "<Input type=submit></form>" );
+ WebResponse page = _wc.getResponse( getHostPath() + "/Default.html" );
+ WebForm form = page.getFormWithID( "boxes" );
+ form.toggleCheckbox( "use_color" );
+ assertEquals( "'use_color' checkbox after toggle", "on", form.getParameterValue( "use_color" ) );
+ form.setCheckbox( "use_color", false );
+ assertEquals( "'use_color' checkbox after set-false", null, form.getParameterValue( "use_color" ) );
+ form.toggleCheckbox( "running" );
+ assertEquals( "'running' checkbox after toggle", "fast", form.getParameterValue( "running" ) );
+
+ try {
+ form.setCheckbox( "color", true );
+ fail( "Did not forbid setting checkbox with multiple values" );
+ } catch (IllegalRequestParameterException e) {
+ }
+
+ try {
+ form.toggleCheckbox( "fish" );
+ fail( "Did not forbid toggling non-checkbox parameter" );
+ } catch (IllegalRequestParameterException e) {
+ }
+
+ }
+
+
public void testReadOnlyControls() throws Exception {
defineWebPage( "Default", "<form method=GET action = \"/ask\">" +
"<Input readonly type=checkbox name=color value=red checked>" +
|
|
From: Russell G. <rus...@us...> - 2003-06-24 22:40:39
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv25478/src/com/meterware/httpunit
Modified Files:
FormControl.java FormParameter.java WebForm.java
Log Message:
Added support for set/toggle checkbox
Index: FormControl.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/FormControl.java,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -r1.41 -r1.42
--- FormControl.java 23 May 2003 21:55:11 -0000 1.41
+++ FormControl.java 24 Jun 2003 22:40:36 -0000 1.42
@@ -220,6 +220,22 @@
/**
+ * Toggles the value of this control.
+ */
+ public void toggle() {
+ throw new FormParameter.IllegalCheckboxParameterException( getName(), "toggleCheckbox" );
+ }
+
+
+ /**
+ * Sets the state of this boolean control.
+ */
+ public void setState( boolean state ) {
+ throw new FormParameter.IllegalCheckboxParameterException( getName(), "setCheckbox" );
+ }
+
+
+ /**
* Performs the 'onChange' event defined for this control.
*/
protected void sendOnChangeEvent() {
@@ -631,6 +647,20 @@
}
+ /**
+ * Toggles the value of this control.
+ */
+ public void toggle() {
+ setChecked( !isChecked() );
+ }
+
+
+ /**
+ * Sets the state of this boolean control.
+ */
+ public void setState( boolean state ) {
+ setChecked( state );
+ }
}
Index: FormParameter.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/FormParameter.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- FormParameter.java 6 Feb 2003 02:55:58 -0000 1.5
+++ FormParameter.java 24 Jun 2003 22:40:36 -0000 1.6
@@ -93,6 +93,20 @@
}
+ public void toggleCheckbox() {
+ FormControl[] controls = getControls();
+ if (controls.length != 1) throw new IllegalCheckboxParameterException( _name, "toggleCheckbox" );
+ controls[0].toggle();
+ }
+
+
+ public void setValue( boolean state ) {
+ FormControl[] controls = getControls();
+ if (controls.length != 1) throw new IllegalCheckboxParameterException( _name, "toggleCheckbox" );
+ controls[0].setState( state );
+ }
+
+
void setFiles( UploadFileSpec[] fileArray ) {
ArrayList list = new ArrayList( fileArray.length );
list.addAll( Arrays.asList( fileArray ) );
@@ -254,6 +268,36 @@
private int _numExpected;
private int _numSupplied;
}
+
+
+//============================= exception class IllegalCheckboxParameterException ======================================
+
+
+ /**
+ * This exception is thrown on an attempt to set a parameter to a value not permitted to it by the form.
+ **/
+ static class IllegalCheckboxParameterException extends IllegalRequestParameterException {
+
+
+ IllegalCheckboxParameterException( String parameterName, String methodName ) {
+ _parameterName = parameterName;
+ _methodName = methodName;
+ }
+
+
+ public String getMessage() {
+ StringBuffer sb = new StringBuffer(HttpUnitUtils.DEFAULT_TEXT_BUFFER_SIZE);
+ sb.append( "Attempted to invoke method '" ).append( _methodName );
+ sb.append( "' for parameter '" ).append( _parameterName ).append( "', which is not a unique checkbox control." );
+ return sb.toString();
+ }
+
+
+ private String _parameterName;
+ private String _methodName;
+ }
+
+
}
Index: WebForm.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebForm.java,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- WebForm.java 23 Jun 2003 23:54:03 -0000 1.85
+++ WebForm.java 24 Jun 2003 22:40:36 -0000 1.86
@@ -534,6 +534,33 @@
}
+ /**
+ * Toggles the value of the specified checkbox parameter.
+ * @param name the name of the checkbox parameter
+ * @throws IllegalArgumentException if the specified parameter is not a checkbox or there is more than one
+ * control with that name.
+ */
+ public void toggleCheckbox( String name ) {
+ FormParameter parameter = getParameter( name );
+ if (parameter == null) throw new NoSuchParameterException( name );
+ parameter.toggleCheckbox();
+ }
+
+
+ /**
+ * Sets the value of the specified checkbox parameter.
+ * @param name the name of the checkbox parameter
+ * @param state the new state of the checkbox
+ * @throws IllegalArgumentException if the specified parameter is not a checkbox or there is more than one
+ * control with that name.
+ */
+ public void setCheckbox( String name, boolean state ) {
+ FormParameter parameter = getParameter( name );
+ if (parameter == null) throw new NoSuchParameterException( name );
+ parameter.setValue( state );
+ }
+
+
public class Scriptable extends HTMLElementScriptable implements NamedDelegate {
public String getAction() { return WebForm.this.getAction(); }
public void setAction( String newAction ) { setDestination( newAction ); _presetParameters = null; }
|
|
From: Russell G. <rus...@us...> - 2003-06-24 22:40:39
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv25478/doc
Modified Files:
release_notes.txt
Log Message:
Added support for set/toggle checkbox
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.305
retrieving revision 1.306
diff -u -r1.305 -r1.306
--- release_notes.txt 23 Jun 2003 23:54:03 -0000 1.305
+++ release_notes.txt 24 Jun 2003 22:40:36 -0000 1.306
@@ -13,6 +13,14 @@
Revision History:
+24-Jun-2003
+Additions:
+ 1. rfe #721424: You can now set checkbox values in a form via: setCheckbox(name,boolean) or toggleCheckbox(name).
+ These methods will throw an exception if the specified parameter is not a checkbox or if more than
+ one control has the name.
+ 2. PseudoServer now permits setting the maximum protocol level. If it is 1.0, all responses will be forced to
+ HTTP/1.0 no matter the protocol of the request.
+
20-Jun-2003
Acknowledgements:
Thanks to Brian O'Kelley for supplying a way to disable use of the proxy server.
|
|
From: Russell G. <rus...@us...> - 2003-06-24 22:39:44
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver
In directory sc8-pr-cvs1:/tmp/cvs-serv25279/src/com/meterware/pseudoserver
Modified Files:
HttpRequest.java HttpUserAgentTest.java PseudoServer.java
Log Message:
Add protocol throttling
Index: HttpRequest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver/HttpRequest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- HttpRequest.java 19 Mar 2003 15:26:06 -0000 1.3
+++ HttpRequest.java 24 Jun 2003 22:39:41 -0000 1.4
@@ -192,9 +192,6 @@
boolean wantsKeepAlive() {
- /**
- return false;
- /**/
if ("Keep-alive".equalsIgnoreCase( getConnectionHeader() )) {
return true;
} else if (_protocol.equals( "HTTP/1.1" )) {
@@ -202,7 +199,6 @@
} else {
return false;
}
- /**/
}
Index: HttpUserAgentTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver/HttpUserAgentTest.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- HttpUserAgentTest.java 17 Jun 2003 23:23:02 -0000 1.10
+++ HttpUserAgentTest.java 24 Jun 2003 22:39:41 -0000 1.11
@@ -100,6 +100,11 @@
}
+ protected PseudoServer getServer() {
+ return _server;
+ }
+
+
protected void setServerDebug( boolean enabled ) {
_server.setDebug( enabled );
}
Index: PseudoServer.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver/PseudoServer.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- PseudoServer.java 19 Mar 2003 16:31:23 -0000 1.9
+++ PseudoServer.java 24 Jun 2003 22:39:41 -0000 1.10
@@ -34,6 +34,8 @@
private ArrayList _classpathDirs = new ArrayList();
+ private String _maxProtocolLevel = "1.1";
+
public PseudoServer() {
Thread t = new Thread() {
@@ -68,6 +70,11 @@
}
+ public void setMaxProtocolLevel( int majorLevel, int minorLevel ) {
+ _maxProtocolLevel = majorLevel + "." + minorLevel;
+ }
+
+
/**
* Returns the port on which this server is listening.
**/
@@ -237,10 +244,10 @@
private boolean respondToRequest( HttpRequest request, HttpResponseStream response ) {
if (_debug) System.out.println( "** Server thread " + hashCode() + " handling request: " + request );
- boolean keepAlive = request.wantsKeepAlive();
+ boolean keepAlive = isKeepAlive( request );
try {
response.restart();
- response.setProtocol( request.getProtocol() );
+ response.setProtocol( getResponseProtocol( request ) );
WebResource resource = getResource( request );
if (resource == null) {
response.setResponse( HttpURLConnection.HTTP_NOT_FOUND, "unable to find " + request.getURI() );
@@ -263,6 +270,16 @@
response.setResponse( HttpURLConnection.HTTP_INTERNAL_ERROR, t.toString() );
}
return keepAlive;
+ }
+
+
+ private boolean isKeepAlive( HttpRequest request ) {
+ return request.wantsKeepAlive() && _maxProtocolLevel.equals( "1.1" );
+ }
+
+
+ private String getResponseProtocol( HttpRequest request ) {
+ return _maxProtocolLevel.equalsIgnoreCase( "1.1" ) ? request.getProtocol() : "HTTP/1.0";
}
|
|
From: Russell G. <rus...@us...> - 2003-06-24 22:39:44
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/pseudoserver
In directory sc8-pr-cvs1:/tmp/cvs-serv25279/test/com/meterware/pseudoserver
Modified Files:
PseudoServerTest.java
Log Message:
Add protocol throttling
Index: PseudoServerTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/pseudoserver/PseudoServerTest.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- PseudoServerTest.java 18 Mar 2003 19:35:34 -0000 1.8
+++ PseudoServerTest.java 24 Jun 2003 22:39:41 -0000 1.9
@@ -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
@@ -179,7 +179,6 @@
sendHTTPLine( os, "GET /sample HTTP/1.1" );
sendHTTPLine( os, "Host: meterware.com" );
- sendHTTPLine( os, "Connection: close" );
sendHTTPLine( os, "" );
StringBuffer sb = new StringBuffer();
@@ -187,6 +186,32 @@
while (-1 != (b = is.read())) sb.append( (char) b );
String result = sb.toString();
assertTrue( "Did not find matching protocol", result.startsWith( "HTTP/1.1" ) );
+ assertTrue( "Did not find expected text", result.indexOf( "Get this" ) > 0 );
+ }
+
+
+
+
+ /**
+ * This verifies that the PseudoServer can be restricted to a HTTP/1.0.
+ */
+ public void testProtocolThrottling() throws Exception {
+ getServer().setMaxProtocolLevel( 1, 0 );
+ defineResource( "sample", "Get this", "text/plain" );
+ Socket socket = new Socket( "localhost", getHostPort() );
+ OutputStream os = socket.getOutputStream();
+ InputStream is = new BufferedInputStream( socket.getInputStream() );
+
+ sendHTTPLine( os, "GET /sample HTTP/1.1" );
+ sendHTTPLine( os, "Host: meterware.com" );
+ sendHTTPLine( os, "Connection: close" );
+ sendHTTPLine( os, "" );
+
+ StringBuffer sb = new StringBuffer();
+ int b;
+ while (-1 != (b = is.read())) sb.append( (char) b );
+ String result = sb.toString();
+ assertTrue( "Did not find matching protocol", result.startsWith( "HTTP/1.0" ) );
assertTrue( "Did not find expected text", result.indexOf( "Get this" ) > 0 );
}
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv1669/src/com/meterware/httpunit
Modified Files:
Button.java HTMLSegment.java ParsedHTML.java WebClient.java
WebForm.java WebLink.java WebResponse.java
Log Message:
Resolve several feature requests
Index: Button.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/Button.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- Button.java 23 May 2003 03:09:27 -0000 1.9
+++ Button.java 23 Jun 2003 23:54:03 -0000 1.10
@@ -64,7 +64,16 @@
* For a submit button this typically submits the form.
*/
public void click() throws IOException, SAXException {
+ if (isDisabled()) throw new IllegalStateException( "Button" + (getName().length() == 0 ? "" : " '" + getName() + "'") + " is disabled and may not be clicked." );
if (doOnClickEvent()) doButtonAction();
+ }
+
+
+ /**
+ * Returns true if this button is disabled, meaning that it cannot be clicked.
+ **/
+ public boolean isDisabled() {
+ return super.isDisabled();
}
Index: HTMLSegment.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/HTMLSegment.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- HTMLSegment.java 4 Apr 2003 14:51:27 -0000 1.9
+++ HTMLSegment.java 23 Jun 2003 23:54:03 -0000 1.10
@@ -58,6 +58,20 @@
/**
+ * Returns the first form found in the page matching the specified criteria.
+ * @exception SAXException thrown if there is an error parsing the response.
+ **/
+ public WebForm getFirstMatchingForm( HTMLElementPredicate predicate, Object value ) throws SAXException;
+
+
+ /**
+ * Returns all forms found in the page matching the specified criteria.
+ * @exception SAXException thrown if there is an error parsing the response.
+ **/
+ public WebForm[] getMatchingForms( HTMLElementPredicate predicate, Object criteria ) throws SAXException;
+
+
+ /**
* Returns the links found in this HTML segment in the order in which they appear.
* @exception SAXException thrown if there is an error parsing the segment.
**/
Index: ParsedHTML.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/ParsedHTML.java,v
retrieving revision 1.48
retrieving revision 1.49
diff -u -r1.48 -r1.49
--- ParsedHTML.java 4 Apr 2003 14:51:27 -0000 1.48
+++ ParsedHTML.java 23 Jun 2003 23:54:03 -0000 1.49
@@ -222,14 +222,35 @@
/**
- * Returns the form found in the page with the specified name.
- **/
- public WebForm getFormWithName( String name ) {
+ * Returns the first link found in the page matching the specified criteria.
+ **/
+ public WebForm getFirstMatchingForm( HTMLElementPredicate predicate, Object criteria ) {
WebForm[] forms = getForms();
for (int i = 0; i < forms.length; i++) {
- if (HttpUnitUtils.matches( name, forms[i].getName() )) return forms[i];
+ if (predicate.matchesCriteria( forms[i], criteria )) return forms[i];
}
return null;
+ }
+
+
+ /**
+ * Returns all links found in the page matching the specified criteria.
+ **/
+ public WebForm[] getMatchingForms( HTMLElementPredicate predicate, Object criteria ) {
+ ArrayList matches = new ArrayList();
+ WebForm[] forms = getForms();
+ for (int i = 0; i < forms.length; i++) {
+ if (predicate.matchesCriteria( forms[i], criteria )) matches.add( forms[i] );
+ }
+ return (WebForm[]) matches.toArray( new WebForm[ matches.size() ] );
+ }
+
+
+ /**
+ * Returns the form found in the page with the specified name.
+ **/
+ public WebForm getFormWithName( String name ) {
+ return getFirstMatchingForm( WebForm.MATCH_NAME, name );
}
Index: WebClient.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebClient.java,v
retrieving revision 1.50
retrieving revision 1.51
diff -u -r1.50 -r1.51
--- WebClient.java 16 Mar 2003 17:22:38 -0000 1.50
+++ WebClient.java 23 Jun 2003 23:54:03 -0000 1.51
@@ -220,6 +220,15 @@
/**
+ * Clears the proxy server settings. Note that at present this is global to all web clients in the VM.
+ */
+ public void clearProxyServer() {
+ System.getProperties().remove( "proxyHost" );
+ System.getProperties().remove( "proxyPort" );
+ }
+
+
+ /**
* Returns the name of the active proxy server.
*/
public String getProxyHost() {
Index: WebForm.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebForm.java,v
retrieving revision 1.84
retrieving revision 1.85
diff -u -r1.84 -r1.85
--- WebForm.java 23 May 2003 03:09:27 -0000 1.84
+++ WebForm.java 23 Jun 2003 23:54:03 -0000 1.85
@@ -46,6 +46,9 @@
private Button[] _buttons;
+ /** Predicate to match a link's name. **/
+ public final static HTMLElementPredicate MATCH_NAME;
+
/**
* Submits this form using the web client from which it was originally obtained.
**/
@@ -748,6 +751,17 @@
}
}
+
+ static {
+ MATCH_NAME = new HTMLElementPredicate() {
+ public boolean matchesCriteria( Object htmlElement, Object criteria ) {
+ return HttpUnitUtils.matches( ((WebForm) htmlElement).getName(), (String) criteria );
+ };
+ };
+
+ }
+
+
//===========================---===== exception class NoSuchParameterException =========================================
@@ -829,7 +843,7 @@
/**
* This exception is thrown on an attempt to define a form request with a button not defined on that form.
**/
- class DisabledSubmitButtonException extends IllegalRequestParameterException {
+ class DisabledSubmitButtonException extends IllegalStateException {
DisabledSubmitButtonException( SubmitButton button ) {
Index: WebLink.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebLink.java,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- WebLink.java 14 Mar 2003 17:41:28 -0000 1.40
+++ WebLink.java 23 Jun 2003 23:54:03 -0000 1.41
@@ -42,6 +42,9 @@
/** Predicate to match part or all of a link's URL string. **/
public final static HTMLElementPredicate MATCH_URL_STRING;
+ /** Predicate to match a link's text exactly. **/
+ public final static HTMLElementPredicate MATCH_TEXT;
+
/** Predicate to match part or all of a link's contained text. **/
public final static HTMLElementPredicate MATCH_CONTAINED_TEXT;
@@ -178,6 +181,14 @@
return HttpUnitUtils.contains( ((WebLink) htmlElement).getURLString(), (String) criteria );
};
};
+
+
+ MATCH_TEXT = new HTMLElementPredicate() {
+ public boolean matchesCriteria( Object htmlElement, Object criteria ) {
+ return HttpUnitUtils.matches( ((WebLink) htmlElement).asText(), (String) criteria );
+ };
+ };
+
MATCH_CONTAINED_TEXT = new HTMLElementPredicate() {
public boolean matchesCriteria( Object htmlElement, Object criteria ) {
Index: WebResponse.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebResponse.java,v
retrieving revision 1.119
retrieving revision 1.120
diff -u -r1.119 -r1.120
--- WebResponse.java 4 May 2003 15:38:03 -0000 1.119
+++ WebResponse.java 23 Jun 2003 23:54:03 -0000 1.120
@@ -315,6 +315,24 @@
/**
+ * Returns the first form found in the page matching the specified criteria.
+ * @exception SAXException thrown if there is an error parsing the response.
+ **/
+ public WebForm getFirstMatchingForm( HTMLElementPredicate predicate, Object criteria ) throws SAXException {
+ return getReceivedPage().getFirstMatchingForm( predicate, criteria );
+ }
+
+
+ /**
+ * Returns all forms found in the page matching the specified criteria.
+ * @exception SAXException thrown if there is an error parsing the response.
+ **/
+ public WebForm[] getMatchingForms( HTMLElementPredicate predicate, Object criteria ) throws SAXException {
+ return getReceivedPage().getMatchingForms( predicate, criteria );
+ }
+
+
+ /**
* Returns the links found in the page in the order in which they appear.
* @exception SAXException thrown if there is an error parsing the response.
**/
|
|
From: Russell G. <rus...@us...> - 2003-06-23 23:54:07
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv1669/test/com/meterware/httpunit/javascript
Modified Files:
FormScriptingTest.java
Log Message:
Resolve several feature requests
Index: FormScriptingTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/FormScriptingTest.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- FormScriptingTest.java 23 May 2003 21:55:12 -0000 1.23
+++ FormScriptingTest.java 23 Jun 2003 23:54:04 -0000 1.24
@@ -28,6 +28,7 @@
import junit.textui.TestRunner;
import junit.framework.TestSuite;
+import org.xml.sax.SAXException;
/**
@@ -212,6 +213,26 @@
response.getFormWithName( "spectrum" ).getButtons()[0].click();
assertEquals( "Result of submit", "You made it!", wc.getCurrentPage().getText() );
+ }
+
+
+ public void testDisabledScriptButton() throws Exception {
+ defineResource( "DoIt?color=green", "You made it!" );
+ defineResource( "OnCommand.html", "<html><head></head>" +
+ "<body>" +
+ "<form name=spectrum action='DoIt' onsubmit='return false;'>" +
+ " <input type=text name=color value=green>" +
+ " <input type=button id=submitButton disabled value=submit onClick='this.form.submit();'>" +
+ "</form>" +
+ "<a href='#' onClick='document.spectrum.submit(); return false;'>" +
+ "</body></html>" );
+ WebConversation wc = new WebConversation();
+ WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" );
+
+ try {
+ response.getFormWithName( "spectrum" ).getButtons()[0].click();
+ fail( "Should not have permitted click of disabled button" );
+ } catch (IllegalStateException e) {}
}
|
|
From: Russell G. <rus...@us...> - 2003-06-23 23:54:07
|
Update of /cvsroot/httpunit/httpunit/sitedocs/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv1669/sitedocs/doc
Modified Files:
developers.xml
Log Message:
Resolve several feature requests
Index: developers.xml
===================================================================
RCS file: /cvsroot/httpunit/httpunit/sitedocs/doc/developers.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- developers.xml 18 May 2003 05:20:47 -0000 1.1
+++ developers.xml 23 Jun 2003 23:54:03 -0000 1.2
@@ -8,26 +8,27 @@
</developer>
</group>
<group type="Contributors (partial list)">
- <developer name="Andrew Bickerton" email="an...@pw..."/>
<developer name="Artashes Aghajanyan" email="Art...@ly..."/>
- <developer name="Bernhard Wagner" email="bw...@xm..."/>
- <developer name="Brendan Boesen" email="bb...@tp..."/>
- <developer name="David D. Kilzer" email="ddk...@us..."/>
- <developer name="Daniel Jasmin" email="dj...@ra..."/>
- <developer name="Daniel Sheppard" email="da...@pr..."/>
- <developer name="Geert Bevin" email="gb...@uw..." />
- <developer name="George Murnock" email="gmu...@be..."/>
<developer name="Jason Bedell" email="jas...@di..."/>
+ <developer name="Geert Bevin" email="gb...@uw..." />
+ <developer name="Andrew Bickerton" email="an...@pw..."/>
+ <developer name="Brendan Boesen" email="bb...@tp..."/>
+ <developer name="Sergey Bondarenko" email="bo...@su..."/>
<developer name="Ken Corbin" email="Ken...@Su..."/>
+ <developer name="Raphael Corre" email="rap...@ya..."/>
+ <developer name="Richard Harris" email="ric...@mc..." />
<developer name="Larry Hamel" email="htt...@co..."/>
- <developer name="Navid Vahdat" email="na...@va..." />
+ <developer name="Daniel Jasmin" email="dj...@ra..."/>
+ <developer name="David D. Kilzer" email="ddk...@us..."/>
+ <developer name="George Murnock" email="gmu...@be..."/>
<developer name="Mark Luty" email="ml...@pa..."/>
<developer name="Michael McCallum" email="mi...@gh..."/>
- <developer name="Raphael Corre" email="rap...@ya..."/>
- <developer name="Richard Harris" email="ric...@mc..." />
- <developer name="Ron Webster" email="ron...@ge..."/>
- <developer name="Sergey Bondarenko" email="bo...@su..."/>
- <developer name="Troy Waldrep" email="twa...@da..."/>
+ <developer name="Brian O'Kelley" email="cok...@us..."/>
+ <developer name="Daniel Sheppard" email="da...@pr..."/>
<developer name="Ville Skytt&auml;"/>
+ <developer name="Navid Vahdat" email="na...@va..." />
+ <developer name="Troy Waldrep" email="twa...@da..."/>
+ <developer name="Ron Webster" email="ron...@ge..."/>
+ <developer name="Bernhard Wagner" email="bw...@xm..."/>
</group>
</developers>
|
|
From: Russell G. <rus...@us...> - 2003-06-23 23:54:07
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv1669/test/com/meterware/httpunit
Modified Files:
FormSubmitTest.java WebLinkTest.java
Log Message:
Resolve several feature requests
Index: FormSubmitTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/FormSubmitTest.java,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- FormSubmitTest.java 26 Dec 2002 18:55:19 -0000 1.30
+++ FormSubmitTest.java 23 Jun 2003 23:54:04 -0000 1.31
@@ -204,7 +204,11 @@
try {
form.getRequest( sb );
fail( "Allowed to create a request for a disabled button" );
- } catch (IllegalRequestParameterException e) {}
+ } catch (IllegalStateException e) {}
+ try {
+ sb.click();
+ fail( "Allowed to click a disabled button" );
+ } catch (IllegalStateException e) {}
}
Index: WebLinkTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/WebLinkTest.java,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- WebLinkTest.java 4 May 2003 15:38:03 -0000 1.28
+++ WebLinkTest.java 23 Jun 2003 23:54:04 -0000 1.29
@@ -78,6 +78,19 @@
}
+ public void testEmbeddedFontTags() throws Exception {
+ defineResource( "FontPage.html",
+ "<html><head><title>A Sample Page</title></head>\n" +
+ "<table><tr><td><a href='/other.html' id='activeID'><font face='Arial'>an <b>active</b> link</font></A></td>\n" +
+ "<td><a href='basic.html' name=\"nextLink\"><IMG SRC=\"/images/arrow.gif\" ALT=\"Next -->\" WIDTH=1 HEIGHT=4></a></td>\n" +
+ "<td><a href='another.html' name='myLink'>some text</a></td>\n" +
+ "</tr></table></body></html>\n" );
+ WebConversation wc = new WebConversation();
+ WebResponse wr = wc.getResponse( getHostPath() + "/FontPage.html" );
+ assertEquals( "Number of links found", 3, wr.getLinks().length );
+ }
+
+
public void testLinkRequest() throws Exception {
WebLink link = _simplePage.getLinks()[0];
WebRequest request = link.getRequest();
|
|
From: Russell G. <rus...@us...> - 2003-06-23 23:54:06
|
Update of /cvsroot/httpunit/httpunit/site/com/meterware/xml In directory sc8-pr-cvs1:/tmp/cvs-serv1669/site/com/meterware/xml Added Files: WriteableXMLElementBase.java Log Message: Resolve several feature requests ***** Error reading new file[Errno 2] No such file or directory: 'WriteableXMLElementBase.java' |
|
From: Russell G. <rus...@us...> - 2003-06-23 23:54:06
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv1669/doc
Modified Files:
release_notes.txt
Log Message:
Resolve several feature requests
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.304
retrieving revision 1.305
diff -u -r1.304 -r1.305
--- release_notes.txt 17 Jun 2003 23:26:38 -0000 1.304
+++ release_notes.txt 23 Jun 2003 23:54:03 -0000 1.305
@@ -13,6 +13,17 @@
Revision History:
+20-Jun-2003
+Acknowledgements:
+ Thanks to Brian O'Kelley for supplying a way to disable use of the proxy server.
+ Thanks to David Kilzer for submitting the WebLink.MATCH_TEXT predicate
+
+Additions:
+ 1. rfe #751505: Add clearProxyServer() to disable the use of the proxy server
+ 2. rfe #744360: Added getFirstMatchingForm and getMatchingForms() methods to WebResponse and HTMLSegment
+ 3. rfe #756453: Made Button.isDisabled() method public
+ 4: rfe #717752: Added WebLink.MATCH_TEXT predicate to match link text exactly
+
17-Jun-2003
Acknowledgements:
Thanks to Lloyd McKenzie for finding a problem with listing cookie names and suggesting a fix.
@@ -22,7 +33,7 @@
2. bug #744214: ServletUnit does not recognize subframes
Additions:
- 1. A new class CookieProperties now supports relaxing cookie matching rules for path, domain, or both.
+ 1. rfe #723895: A new class CookieProperties now supports relaxing cookie matching rules for path, domain, or both.
2. It is now possible to define a CookieListener on CookieProperties to watch for cookie rejection events
4-Jun-2003
|
|
From: Russell G. <rus...@us...> - 2003-06-20 03:21:15
|
Update of /cvsroot/httpunit/httpunit/site/com/meterware/httpunit/site
In directory sc8-pr-cvs1:/tmp/cvs-serv12439/site/com/meterware/httpunit/site
Modified Files:
Developers.java
Log Message:
cleanup website links
Index: Developers.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/site/com/meterware/httpunit/site/Developers.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Developers.java 18 May 2003 13:32:28 -0000 1.2
+++ Developers.java 20 Jun 2003 03:21:11 -0000 1.3
@@ -158,7 +158,7 @@
void appendNameTo( StringBuffer sb ) {
- if (_username == null && _email == null) {
+ if (_username == null /* && _email == null */) {
sb.append( _name );
} else {
sb.append( "<a" );
|
|
From: Russell G. <rus...@us...> - 2003-06-20 03:21:15
|
Update of /cvsroot/httpunit/httpunit/sitedocs/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv12439/sitedocs/doc
Modified Files:
faq.xml
Log Message:
cleanup website links
Index: faq.xml
===================================================================
RCS file: /cvsroot/httpunit/httpunit/sitedocs/doc/faq.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- faq.xml 18 May 2003 05:20:47 -0000 1.1
+++ faq.xml 20 Jun 2003 03:21:11 -0000 1.2
@@ -82,7 +82,7 @@
<faq id="javascript">
<question>How do I use HttpUnit to test my pages that use JavaScript?</question>
<answer><![CDATA[For most purposes, You should not have to do anything special; however, not all JavaScript constructs are supported as yet.
- See <a href="Javascript-support.html">the list of supported JavaScript features</a> for more information.]]></answer>
+ See <a href="javascript-support.html">the list of supported JavaScript features</a> for more information.]]></answer>
</faq>
<faq id="norhino">
<question>JavaScript is not being executed at all. Why not?</question>
|