[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit WebFrameTest.java,1.5,1.6
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2001-06-13 16:38:23
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit
In directory usw-pr-cvs1:/tmp/cvs-serv19578/test/com/meterware/httpunit
Modified Files:
WebFrameTest.java
Log Message:
Added control for case-sensitivity of HTML matching
Index: WebFrameTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/WebFrameTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- WebFrameTest.java 2001/04/03 16:49:08 1.5
+++ WebFrameTest.java 2001/06/13 16:38:20 1.6
@@ -163,15 +163,22 @@
}
- private WebResponse getFrameWithURL( WebConversation wc, String urlString ) {
+ private String getNameOfFrameWithURL( WebConversation wc, String urlString ) {
String[] names = wc.getFrameNames();
for (int i = 0; i < names.length; i++) {
WebResponse candidate = wc.getFrameContents( names[i] );
if (candidate.getURL().toExternalForm().indexOf( urlString ) >= 0) {
- return candidate;
+ return names[i];
}
}
return null;
+ }
+
+
+ private WebResponse getFrameWithURL( WebConversation wc, String urlString ) {
+ String name = getNameOfFrameWithURL( wc, urlString );
+ if (name == null) return null;
+ return wc.getFrameContents( name );
}
|