[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit FormSubmitTest.java,1.30,1.31 WebLinkTes
Brought to you by:
russgold
|
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();
|