[Httpunit-commit] CVS: httpunit/src/com/meterware/httpunit WebApplet.java,NONE,1.1 HTMLSegment.java,
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2002-11-12 13:41:58
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory usw-pr-cvs1:/tmp/cvs-serv24350/src/com/meterware/httpunit
Modified Files:
HTMLSegment.java ParsedHTML.java WebResponse.java
Added Files:
WebApplet.java
Log Message:
Begin applet support
***** Error reading new file[Errno 2] No such file or directory: 'WebApplet.java'
Index: HTMLSegment.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/HTMLSegment.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- HTMLSegment.java 4 Oct 2002 02:16:00 -0000 1.6
+++ HTMLSegment.java 12 Nov 2002 13:41:54 -0000 1.7
@@ -113,6 +113,13 @@
/**
+ * Returns the applets found in the page in the order in which they appear.
+ * @exception SAXException thrown if there is an error parsing the segment.
+ **/
+ public WebApplet[] getApplets() throws SAXException;
+
+
+ /**
* Returns the top-level tables 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.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- ParsedHTML.java 24 Oct 2002 13:28:53 -0000 1.33
+++ ParsedHTML.java 12 Nov 2002 13:41:54 -0000 1.34
@@ -43,6 +43,7 @@
private WebForm[] _forms;
private WebImage[] _images;
private WebLink[] _links;
+ private WebApplet[] _applets;
private WebResponse _response;
@@ -236,6 +237,22 @@
else if (HttpUnitOptions.getMatchesIgnoreCase() && images[i].getAltText().equalsIgnoreCase( altText )) return images[i];
}
return null;
+ }
+
+
+ /**
+ * Returns a proxy for each applet found embedded in this page.
+ */
+ public WebApplet[] getApplets() {
+ if (_applets == null) {
+ NodeList applets = NodeUtils.getElementsByTagName( getRootNode(), "applet" );
+
+ _applets = new WebApplet[ applets.getLength() ];
+ for (int i = 0; i < _applets.length; i++) {
+ _applets[i] = new WebApplet( _response, applets.item( i ), _baseTarget );
+ }
+ }
+ return _applets;
}
Index: WebResponse.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebResponse.java,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- WebResponse.java 5 Nov 2002 21:45:18 -0000 1.97
+++ WebResponse.java 12 Nov 2002 13:41:54 -0000 1.98
@@ -409,6 +409,11 @@
}
+ public WebApplet[] getApplets() throws SAXException {
+ return getReceivedPage().getApplets();
+ }
+
+
/**
* Returns a copy of the domain object model tree associated with this response.
* If the response is HTML, it will use a special parser which can transform HTML into an XML DOM.
|