httpunit-commit Mailing List for httpunit (Page 34)
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-03-13 18:20:55
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv16661/test/com/meterware/httpunit/javascript
Modified Files:
FormScriptingTest.java
Log Message:
Added support for select.value
Index: FormScriptingTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/FormScriptingTest.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- FormScriptingTest.java 17 Feb 2003 23:54:42 -0000 1.18
+++ FormScriptingTest.java 13 Mar 2003 18:20:50 -0000 1.19
@@ -728,4 +728,31 @@
}
+ public void testSelectValueProperty() throws Exception {
+ defineResource( "OnCommand.html", "<html><head><script language='JavaScript'>" +
+ "function testProperty( form ) {\n" +
+ " elements = form.choices;\n" +
+ " alert( 'selected item is ' + elements.value );\n" +
+ "}" +
+ "</script></head>" +
+ "<body>" +
+ "<form name='the_form'>" +
+ " <select name='choices'>" +
+ " <option>red" +
+ " <option selected>blue" +
+ " </select>" +
+ "</form>" +
+ "<a href='#' onClick='testProperty( document.the_form )'>elements</a>" +
+ "</body></html>" );
+ WebConversation wc = new WebConversation();
+ WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" );
+ response.getLinks()[0].click();
+ assertEquals( "Message 1", "selected item is blue", wc.popNextAlert() );
+ response.getScriptableObject().doEvent( "document.the_form.choices.value='red'" );
+ response.getLinks()[0].click();
+ assertEquals( "Message 2", "selected item is red", wc.popNextAlert() );
+ }
+
+
+
}
|
|
From: Russell G. <rus...@us...> - 2003-03-12 17:34:10
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv15566/test/com/meterware/httpunit/javascript
Modified Files:
DocumentScriptingTest.java
Log Message:
bug #700889: reparse page as needed for multiple <script> elements
Index: DocumentScriptingTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/DocumentScriptingTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- DocumentScriptingTest.java 9 Mar 2003 20:35:48 -0000 1.6
+++ DocumentScriptingTest.java 12 Mar 2003 17:34:07 -0000 1.7
@@ -285,5 +285,19 @@
}
+ public void testSetDocumentReparse() throws Exception {
+ defineResource( "index.html",
+ "<html><head>" +
+ "<script language='JavaScript ' >document.title = 'New title';</script>" +
+ "</head><body><form name=\"aForm\"></form>" +
+ "<script language='JavaScript'>alert(\"No of forms: \" + document.forms.length);</script>" +
+ "</body></html>");
+
+ WebConversation wc = new WebConversation();
+ WebResponse response = wc.getResponse( getHostPath() + "/index.html" );
+ assertEquals("No of forms", response.getForms().length, 1);
+ assertEquals("JavaScript no of forms", "No of forms: 1", wc.popNextAlert());
+ }
+
}
|
|
From: Russell G. <rus...@us...> - 2003-03-12 17:34:10
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/parsing
In directory sc8-pr-cvs1:/tmp/cvs-serv15566/src/com/meterware/httpunit/parsing
Modified Files:
NekoDOMParser.java
Log Message:
bug #700889: reparse page as needed for multiple <script> elements
Index: NekoDOMParser.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/parsing/NekoDOMParser.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- NekoDOMParser.java 9 Mar 2003 20:35:47 -0000 1.1
+++ NekoDOMParser.java 12 Mar 2003 17:34:07 -0000 1.2
@@ -42,7 +42,9 @@
private static final String ATTRIBUTE_NAME_CASE = "http://cyberneko.org/html/properties/names/attrs";
private DocumentAdapter _documentAdapter;
- private ScriptableDelegate _scriptableObject;
+
+ /** The node representing the document. **/
+ private Node _documentNode;
static NekoDOMParser newParser( DocumentAdapter adapter, URL url ) {
@@ -75,13 +77,13 @@
ScriptableDelegate getScriptableDelegate() {
- if (_scriptableObject == null) {
+ if (_documentNode == null) {
Node node = getCurrentElementNode();
while (!(node instanceof Document)) node = node.getParentNode();
- _documentAdapter.setRootNode( node );
- _scriptableObject = _documentAdapter.getScriptableObject();
+ _documentNode = node;
}
- return _scriptableObject;
+ _documentAdapter.setRootNode( _documentNode );
+ return _documentAdapter.getScriptableObject();
}
|
|
From: Russell G. <rus...@us...> - 2003-03-12 17:34:10
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv15566/doc
Modified Files:
release_notes.txt
Log Message:
bug #700889: reparse page as needed for multiple <script> elements
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.268
retrieving revision 1.269
diff -u -r1.268 -r1.269
--- release_notes.txt 12 Mar 2003 15:40:43 -0000 1.268
+++ release_notes.txt 12 Mar 2003 17:34:06 -0000 1.269
@@ -19,6 +19,8 @@
Problems fixed:
1. Applets were not loading properly from applets if a codebase was specified in the <applet> tag.
+ 2. Bug #700889: Under certain cases, multiple <script> sections in a document caused a problem where only those HTML elements
+ defined before the first one were actually available to the scripts.
9-Mar-2003
Additions:
|
|
From: Russell G. <rus...@us...> - 2003-03-12 15:40:47
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv22666/src/com/meterware/httpunit
Modified Files:
WebApplet.java
Log Message:
from Daniel Jasmin: correct loading of applets from an archive
Index: WebApplet.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebApplet.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- WebApplet.java 4 Feb 2003 05:32:03 -0000 1.6
+++ WebApplet.java 12 Mar 2003 15:40:44 -0000 1.7
@@ -125,7 +125,7 @@
List getArchiveList() throws MalformedURLException {
ArrayList al = new ArrayList();
StringTokenizer st = new StringTokenizer( getArchiveSpecification(), "," );
- while (st.hasMoreTokens()) al.add( new URL( _response.getURL(), st.nextToken() ) );
+ while (st.hasMoreTokens()) al.add( new URL( getCodeBaseURL(), st.nextToken() ) );
return al;
}
|
|
From: Russell G. <rus...@us...> - 2003-03-12 15:40:46
|
Update of /cvsroot/httpunit/httpunit/doc In directory sc8-pr-cvs1:/tmp/cvs-serv22666/doc Modified Files: release_notes.txt Log Message: from Daniel Jasmin: correct loading of applets from an archive Index: release_notes.txt =================================================================== RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v retrieving revision 1.267 retrieving revision 1.268 diff -u -r1.267 -r1.268 --- release_notes.txt 9 Mar 2003 20:35:45 -0000 1.267 +++ release_notes.txt 12 Mar 2003 15:40:43 -0000 1.268 @@ -13,9 +13,16 @@ Revision History: + 12-Mar-2002 +Acknowledgements: + Thanks to Daniel Jasmin for fixing the handling of applet loading from archives. + +Problems fixed: + 1. Applets were not loading properly from applets if a codebase was specified in the <applet> tag. + 9-Mar-2003 Additions: - 1. <noscript> nodes now show their content if a <script> earlier in the page is not recognized. + 1. <noscript> nodes in the body of a page now show their content if a <script> earlier in the page is not recognized. 7-Mar-2003 Acknowledgements: |
|
From: Russell G. <rus...@us...> - 2003-03-12 15:40:13
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv22390/src/com/meterware/httpunit
Modified Files:
WebResponse.java
Log Message:
remove commented out lines
Index: WebResponse.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebResponse.java,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -r1.112 -r1.113
--- WebResponse.java 9 Mar 2003 20:35:46 -0000 1.112
+++ WebResponse.java 12 Mar 2003 15:40:08 -0000 1.113
@@ -565,10 +565,6 @@
public void load() throws SAXException {
if (isHTML()) {
getReceivedPage().getForms(); // TODO be more explicit here - don't care about forms, after all
-// final String[] scripts = getReceivedPage().getScripts(); TODO delete this
-// for (int i = 0; i < scripts.length; i++) {
-// runScript( scripts[i] );
-// }
doEvent( getReceivedPage().getOnLoadEvent() );
}
}
|
|
From: Russell G. <rus...@us...> - 2003-03-12 15:39:51
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv22085/test/com/meterware/httpunit/javascript
Modified Files:
ScriptingTest.java
Log Message:
Verify external scripting
Index: ScriptingTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/ScriptingTest.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- ScriptingTest.java 5 Feb 2003 16:07:40 -0000 1.49
+++ ScriptingTest.java 12 Mar 2003 15:39:46 -0000 1.50
@@ -398,7 +398,6 @@
"<a href='#' onMouseOver=\"window.location='" + getHostPath() + "/Target.html';\">go</a>" +
"<a href='#' onMouseOver=\"document.location='" + getHostPath() + "/Target.html';\">go</a>" +
"<a href='#' onMouseOver=\"document.location.replace('" + getHostPath() + "/Target.html');\">go</a>" +
- "<a href='#' onMouseOver=\"window.location.href='" + getHostPath() + "/Target.html';\">go</a>" +
"</body>" );
WebConversation wc = new WebConversation();
WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" );
@@ -420,7 +419,7 @@
assertEquals( "4th page", "You made it!", wc.getCurrentPage().getText() );
response = wc.getResponse( getHostPath() + "/OnCommand.html" );
- response.getLinks()[3].mouseOver();
+ response.getScriptableObject().doEvent( "window.location.href='" + getHostPath() + "/Target.html'" );
assertEquals( "5th page URL", getHostPath() + "/Target.html", wc.getCurrentPage().getURL().toExternalForm() );
assertEquals( "5th page", "You made it!", wc.getCurrentPage().getText() );
}
|
|
From: Russell G. <rus...@us...> - 2003-03-09 20:36:20
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv26420/doc
Modified Files:
faq.html release_notes.txt
Log Message:
support <noscript> tags
Index: faq.html
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/faq.html,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- faq.html 3 Mar 2003 19:44:21 -0000 1.24
+++ faq.html 9 Mar 2003 20:35:45 -0000 1.25
@@ -10,24 +10,24 @@
<LI><A HREF="#api-help">I don't understand how the ... API works.</A></LI>
</ol><ol start=3>
+<LI><A HREF="#uncheck">How do I uncheck a checkbox?</A></LI>
+</ol><ol start=4>
<LI><A HREF="sslfaq.html">Does HttpUnit support https?</A></LI>
<LI><A HREF="#proxy">Can I use HttpUnit through a proxy server?</A></LI>
<LI><A HREF="#charset">Why isn't HttpUnit handling my non-English pages?</A></LI>
<LI><A HREF="#badType">The server is not sending a valid content type. How do I test HTML pages anyway?</A></LI>
-</ol><ol start=7>
-
+</ol><ol start=8>
<LI><A HREF="#buttons">HttpUnit is not finding the buttons and parameters in my forms. What is wrong?</A></LI>
<LI><A HREF="#hidden">Why can't I change hidden parameters?</A></LI>
-</ol><ol start=9>
-
+</ol><ol start=10>
<LI><A HREF="#javascript">How do I use HttpUnit to test my pages that use JavaScript?</A></LI>
<LI><A HREF="#norhino">JavaScript is not being executed at all. Why not?</A></LI>
<li><a href="#unsupported">How do I handle a page that uses JavaScript features that HttpUnit does not support?</a></li>
-</ol><ol start=12>
+</ol><ol start=13>
<LI><A HREF="#session">How can I see the servlet session between calls?</A></LI>
<li><a href="#JSP">Can I use JSPs with ServletUnit?</a></li>
</OL>
@@ -47,6 +47,19 @@
The best way to understand how the API works is to look at the samples in the <tt>test</tt> directory. This contains an example of just about
every feature of the library and is used to verify that they continue to work.
Of course, if you know a tech writer who would like to contribute to improving the documentation, that is always welcome.
+
+
+<h2>General Use</h2>
+
+<A NAME="uncheck"><h3>How do I uncheck a checkbox?</h3></A>
+The setParameter call lets you specify the values per parameter name. An unchecked checkbox has no value to transmit, so you would call:
+<pre><code>
+ form.setParameter( "checkbox-name", new String[0] );
+</code></pre>
+or
+<pre><code>
+ form.removeParameter( "checkbox-name" );
+</code></pre>
<h2>Server Issues</h2>
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.266
retrieving revision 1.267
diff -u -r1.266 -r1.267
--- release_notes.txt 7 Mar 2003 05:03:56 -0000 1.266
+++ release_notes.txt 9 Mar 2003 20:35:45 -0000 1.267
@@ -13,6 +13,10 @@
Revision History:
+ 9-Mar-2003
+Additions:
+ 1. <noscript> nodes now show their content if a <script> earlier in the page is not recognized.
+
7-Mar-2003
Acknowledgements:
Thanks to Andrew Bickerton for correcting the handling of document.open for non-HTML pages and new pages with
|
|
From: Russell G. <rus...@us...> - 2003-03-09 20:36:19
|
Update of /cvsroot/httpunit/httpunit/jars In directory sc8-pr-cvs1:/tmp/cvs-serv26420/jars Modified Files: nekohtml.jar Log Message: support <noscript> tags Index: nekohtml.jar =================================================================== RCS file: /cvsroot/httpunit/httpunit/jars/nekohtml.jar,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 Binary files /tmp/cvsUtt8cT and /tmp/cvsqyc4MB differ |
|
From: Russell G. <rus...@us...> - 2003-03-09 20:36:18
|
Update of /cvsroot/httpunit/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv26420
Modified Files:
build.xml
Log Message:
support <noscript> tags
Index: build.xml
===================================================================
RCS file: /cvsroot/httpunit/httpunit/build.xml,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- build.xml 14 Feb 2003 19:04:23 -0000 1.63
+++ build.xml 9 Mar 2003 20:35:44 -0000 1.64
@@ -84,6 +84,7 @@
<exclude name="**/JTidyHTMLParser.java" unless="jtidy.present" />
<exclude name="**/ScriptFilter.java" unless="nekoHTML.present" />
<exclude name="**/NekoHTMLParser.java" unless="nekoHTML.present" />
+ <exclude name="**/NekoDOMParser.java" unless="nekoHTML.present" />
<exclude name="**/servletunit/*" unless="jsdk.present" />
<exclude name="**/JUnitServlet.java" unless="junit.present" />
<exclude name="**/javascript/*" unless="rhino.present" />
|
|
From: Russell G. <rus...@us...> - 2003-03-09 20:35:51
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv26420/test/com/meterware/httpunit/javascript
Modified Files:
DocumentScriptingTest.java NekoEnhancedScriptingTest.java
Log Message:
support <noscript> tags
Index: DocumentScriptingTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/DocumentScriptingTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- DocumentScriptingTest.java 17 Nov 2002 16:43:41 -0000 1.5
+++ DocumentScriptingTest.java 9 Mar 2003 20:35:48 -0000 1.6
@@ -22,6 +22,7 @@
import junit.framework.TestSuite;
import junit.textui.TestRunner;
import com.meterware.httpunit.*;
+import com.meterware.httpunit.parsing.HTMLParserFactory;
public class DocumentScriptingTest extends HttpUnitTest {
@@ -50,6 +51,7 @@
public void testDocumentFindForms() throws Exception {
+ HTMLParserFactory.useJTidyParser(); // TODO remove this line
defineResource( "OnCommand.html", "<html><head><script language='JavaScript'>" +
"function getFound( object ) {" +
" return (object == null) ? \"did not find \" : \"found \";" +
Index: NekoEnhancedScriptingTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/NekoEnhancedScriptingTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- NekoEnhancedScriptingTest.java 23 Feb 2003 20:03:39 -0000 1.4
+++ NekoEnhancedScriptingTest.java 9 Mar 2003 20:35:48 -0000 1.5
@@ -21,10 +21,8 @@
*******************************************************************************************************************/
import junit.framework.TestSuite;
import junit.textui.TestRunner;
-import com.meterware.httpunit.HttpUnitTest;
-import com.meterware.httpunit.WebConversation;
-import com.meterware.httpunit.WebResponse;
-import com.meterware.httpunit.WebLink;
+
+import com.meterware.httpunit.*;
/**
@@ -108,6 +106,34 @@
assertNotNull( "No default script link found", wr.getLinkWith( "JavaScript Working" ) );
assertNotNull( "No default script link found", wr.getLinkWith( "JavaScript 1.2 Working" ) );
assertNull( "VBScript link found", wr.getLinkWith( "VBScript" ) );
+ }
+
+
+ public void testNoScriptSections() throws Exception {
+ defineResource( "OnCommand.html", "<html><head><title>something</title></head>" +
+ "<body>" +
+ "<script language='JavaScript'>" +
+ "document.write( '<a id=here href=about:blank>' );" +
+ "document.writeln( document.title );" +
+ "document.write( '</a>' );" +
+ "</script>" +
+ "<noscript>" +
+ "<a href='#' id='there'>anything</a>" +
+ "</noscript>" +
+ "</body></html>" );
+ WebConversation wc = new WebConversation();
+ WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" );
+ WebLink link = response.getLinkWithID( "here" );
+ assertNotNull( "The link was not found", link );
+ assertEquals( "Link contents", "something", link.asText() );
+ assertNull( "Should not have found link in noscript", response.getLinkWithID( "there" ) );
+
+ HttpUnitOptions.setScriptingEnabled( false );
+ response = wc.getResponse( getHostPath() + "/OnCommand.html" );
+ link = response.getLinkWithID( "there" );
+ assertNotNull( "The link was not found", link );
+ assertEquals( "Link contents", "anything", link.asText() );
+ assertNull( "Should not have found scripted link", response.getLinkWithID( "here" ) );
}
|
|
From: Russell G. <rus...@us...> - 2003-03-09 20:35:51
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/scripting
In directory sc8-pr-cvs1:/tmp/cvs-serv26420/src/com/meterware/httpunit/scripting
Modified Files:
ScriptableDelegate.java ScriptingEngine.java
Log Message:
support <noscript> tags
Index: ScriptableDelegate.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/scripting/ScriptableDelegate.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- ScriptableDelegate.java 24 Oct 2002 13:28:54 -0000 1.6
+++ ScriptableDelegate.java 9 Mar 2003 20:35:48 -0000 1.7
@@ -31,13 +31,19 @@
private static final ScriptingEngine NULL_SCRIPT_ENGINE = new ScriptingEngine() {
- public String executeScript( String script ) { return ""; }
+ public boolean supportsScriptLanguage( String language ) { return false; }
+ public String executeScript( String language, String script ) { return ""; }
public boolean performEvent( String eventScript ) { return true; }
public String getURLContents( String urlString ) { return null; }
public ScriptingEngine newScriptingEngine( ScriptableDelegate child ) { return this; }
};
+ public boolean supportsScript( String language ) {
+ return getScriptEngine().supportsScriptLanguage( language );
+ }
+
+
/**
* Executes the specified scripted event.
**/
@@ -51,8 +57,8 @@
* Executes the specified script, returning any intended replacement text.
* @return the replacement text, which may be empty.
**/
- public String runScript( String script ) {
- return (script.length() == 0) ? "" : getScriptEngine().executeScript( script );
+ public String runScript( String language, String script ) {
+ return (script.length() == 0) ? "" : getScriptEngine().executeScript( language, script );
}
Index: ScriptingEngine.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/scripting/ScriptingEngine.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ScriptingEngine.java 24 Oct 2002 13:28:54 -0000 1.4
+++ ScriptingEngine.java 9 Mar 2003 20:35:48 -0000 1.5
@@ -29,9 +29,15 @@
/**
+ * Returns true if this engine supports the specified script.
+ **/
+ public boolean supportsScriptLanguage( String language );
+
+
+ /**
* Interprets the specified script, which may include global function definitions.
*/
- public String executeScript( String script );
+ public String executeScript( String language, String script );
/**
|
|
From: Russell G. <rus...@us...> - 2003-03-09 20:35:51
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/parsing
In directory sc8-pr-cvs1:/tmp/cvs-serv26420/src/com/meterware/httpunit/parsing
Modified Files:
NekoHTMLParser.java ScriptFilter.java
Added Files:
NekoDOMParser.java
Log Message:
support <noscript> tags
--- NEW FILE ---
package com.meterware.httpunit.parsing;
import com.meterware.httpunit.scripting.ScriptableDelegate;
import java.net.URL;
import java.io.IOException;
import java.util.Enumeration;
import org.cyberneko.html.HTMLConfiguration;
import org.apache.xerces.xni.parser.XMLDocumentFilter;
import org.apache.xerces.xni.parser.XMLErrorHandler;
import org.apache.xerces.xni.parser.XMLParseException;
import org.apache.xerces.xni.XNIException;
import org.xml.sax.SAXNotRecognizedException;
import org.xml.sax.SAXNotSupportedException;
import org.w3c.dom.Node;
import org.w3c.dom.Document;
/**
*
*
* @author <a href="rus...@ac...">Russell Gold</a>
* @author <a href="mailto:Art...@ly...">Artashes Aghajanyan</a>
**/
class NekoDOMParser extends org.apache.xerces.parsers.DOMParser {
private static final String HTML_DOCUMENT_CLASS_NAME = "org.apache.html.dom.HTMLDocumentImpl";
/** Error reporting feature identifier. */
private static final String REPORT_ERRORS = "http://cyberneko.org/html/features/report-errors";
/** Augmentations feature identifier. */
private static final String AUGMENTATIONS = "http://cyberneko.org/html/features/augmentations";
/** Filters property identifier. */
private static final String FILTERS = "http://cyberneko.org/html/properties/filters";
/** Element case settings. possible values: "upper", "lower", "match" */
private static final String TAG_NAME_CASE = "http://cyberneko.org/html/properties/names/elems";
/** Attribute case settings. possible values: "upper", "lower", "no-change" */
private static final String ATTRIBUTE_NAME_CASE = "http://cyberneko.org/html/properties/names/attrs";
private DocumentAdapter _documentAdapter;
private ScriptableDelegate _scriptableObject;
static NekoDOMParser newParser( DocumentAdapter adapter, URL url ) {
final HTMLConfiguration configuration = new HTMLConfiguration();
if (!HTMLParserFactory.getHTMLParserListeners().isEmpty() || HTMLParserFactory.isParserWarningsEnabled()) {
configuration.setErrorHandler( new ErrorHandler( url ) );
configuration.setFeature( REPORT_ERRORS, true);
}
configuration.setFeature( AUGMENTATIONS, true );
final ScriptFilter javaScriptFilter = new ScriptFilter( configuration );
configuration.setProperty( FILTERS, new XMLDocumentFilter[] { javaScriptFilter } );
if (HTMLParserFactory.isPreserveTagCase()) {
configuration.setProperty( TAG_NAME_CASE, "match" );
configuration.setProperty( ATTRIBUTE_NAME_CASE, "no-change" );
}
try {
final NekoDOMParser domParser = new NekoDOMParser( configuration, adapter );
domParser.setFeature( DEFER_NODE_EXPANSION, false );
if (HTMLParserFactory.isReturnHTMLDocument()) domParser.setProperty( DOCUMENT_CLASS_NAME, HTML_DOCUMENT_CLASS_NAME );
javaScriptFilter.setParser( domParser );
return domParser;
} catch (SAXNotRecognizedException e) {
throw new RuntimeException( e.toString() );
} catch (SAXNotSupportedException e) {
throw new RuntimeException( e.toString() );
}
}
ScriptableDelegate getScriptableDelegate() {
if (_scriptableObject == null) {
Node node = getCurrentElementNode();
while (!(node instanceof Document)) node = node.getParentNode();
_documentAdapter.setRootNode( node );
_scriptableObject = _documentAdapter.getScriptableObject();
}
return _scriptableObject;
}
private Node getCurrentElementNode() {
try {
final Node node = (Node) getProperty( CURRENT_ELEMENT_NODE );
return node;
} catch (SAXNotRecognizedException e) {
throw new RuntimeException( CURRENT_ELEMENT_NODE + " property not recognized" );
} catch (SAXNotSupportedException e) {
e.printStackTrace();
throw new RuntimeException( CURRENT_ELEMENT_NODE + " property not supported" );
}
}
String getIncludedScript( String srcAttribute ) {
try {
return _documentAdapter.getIncludedScript( srcAttribute );
} catch (IOException e) {
throw new ScriptException( e );
}
}
NekoDOMParser( HTMLConfiguration configuration, DocumentAdapter adapter ) {
super( configuration );
_documentAdapter = adapter;
}
static class ScriptException extends RuntimeException {
private IOException _cause;
public ScriptException( IOException cause ) {
_cause = cause;
}
public IOException getException() {
return _cause;
}
}
}
class ErrorHandler implements XMLErrorHandler {
private URL _url = null;
ErrorHandler( URL url ) {
_url = url;
}
public void warning( String domain, String key, XMLParseException warningException ) throws XNIException {
if (HTMLParserFactory.isParserWarningsEnabled()) {
System.out.println( "At line " + warningException.getLineNumber() + ", column " + warningException.getColumnNumber() + ": " + warningException.getMessage() );
}
Enumeration enum = HTMLParserFactory.getHTMLParserListeners().elements();
while (enum.hasMoreElements()) {
((HTMLParserListener) enum.nextElement()).warning( _url, warningException.getMessage(), warningException.getLineNumber(), warningException.getColumnNumber() );
}
}
public void error( String domain, String key, XMLParseException errorException ) throws XNIException {
Enumeration enum = HTMLParserFactory.getHTMLParserListeners().elements();
while (enum.hasMoreElements()) {
((HTMLParserListener) enum.nextElement()).error( _url, errorException.getMessage(), errorException.getLineNumber(), errorException.getColumnNumber() );
}
}
public void fatalError( String domain, String key, XMLParseException fatalError ) throws XNIException {
error( domain, key, fatalError );
throw fatalError;
}
}
Index: NekoHTMLParser.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/parsing/NekoHTMLParser.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- NekoHTMLParser.java 28 Feb 2003 17:30:26 -0000 1.3
+++ NekoHTMLParser.java 9 Mar 2003 20:35:47 -0000 1.4
@@ -2,7 +2,7 @@
/********************************************************************************************************************
* $Id$
*
- * Copyright (c) 2002, Russell Gold
+ * Copyright (c) 2002-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
@@ -19,26 +19,12 @@
* DEALINGS IN THE SOFTWARE.
*
*******************************************************************************************************************/
-import org.apache.xerces.xni.parser.XMLDocumentFilter;
-import org.apache.xerces.xni.parser.XMLErrorHandler;
-import org.apache.xerces.xni.parser.XMLParseException;
-import org.apache.xerces.xni.XNIException;
-
-import org.cyberneko.html.HTMLConfiguration;
-
import org.xml.sax.SAXException;
import org.xml.sax.InputSource;
-import org.xml.sax.SAXNotRecognizedException;
-import org.xml.sax.SAXNotSupportedException;
-import org.w3c.dom.Node;
-import org.w3c.dom.Document;
import java.net.URL;
import java.io.IOException;
import java.io.StringReader;
-import java.util.Enumeration;
-
-import com.meterware.httpunit.scripting.ScriptableDelegate;
/**
*
@@ -51,10 +37,10 @@
public void parse( URL pageURL, String pageText, DocumentAdapter adapter ) throws IOException, SAXException {
try {
- DOMParser parser = DOMParser.newParser( adapter, pageURL );
+ NekoDOMParser parser = NekoDOMParser.newParser( adapter, pageURL );
parser.parse( new InputSource( new StringReader( pageText ) ) );
adapter.setRootNode( parser.getDocument() );
- } catch (DOMParser.ScriptException e) {
+ } catch (NekoDOMParser.ScriptException e) {
throw e.getException();
}
}
@@ -84,141 +70,4 @@
}
-class DOMParser extends org.apache.xerces.parsers.DOMParser {
-
- private static final String HTML_DOCUMENT_CLASS_NAME = "org.apache.html.dom.HTMLDocumentImpl";
-
- /** Error reporting feature identifier. */
- private static final String REPORT_ERRORS = "http://cyberneko.org/html/features/report-errors";
-
- /** Augmentations feature identifier. */
- private static final String AUGMENTATIONS = "http://cyberneko.org/html/features/augmentations";
-
- /** Filters property identifier. */
- private static final String FILTERS = "http://cyberneko.org/html/properties/filters";
-
- /** Element case settings. possible values: "upper", "lower", "match" */
- private static final String TAG_NAME_CASE = "http://cyberneko.org/html/properties/names/elems";
- /** Attribute case settings. possible values: "upper", "lower", "no-change" */
- private static final String ATTRIBUTE_NAME_CASE = "http://cyberneko.org/html/properties/names/attrs";
-
- private DocumentAdapter _documentAdapter;
- private ScriptableDelegate _scriptableObject;
-
-
- static DOMParser newParser( DocumentAdapter adapter, URL url ) {
- final HTMLConfiguration configuration = new HTMLConfiguration();
- if (!HTMLParserFactory.getHTMLParserListeners().isEmpty() || HTMLParserFactory.isParserWarningsEnabled()) {
- configuration.setErrorHandler( new ErrorHandler( url ) );
- configuration.setFeature( REPORT_ERRORS, true);
- }
- configuration.setFeature( AUGMENTATIONS, true );
- final ScriptFilter javaScriptFilter = new ScriptFilter( configuration );
- configuration.setProperty( FILTERS, new XMLDocumentFilter[] { javaScriptFilter } );
- if (HTMLParserFactory.isPreserveTagCase()) {
- configuration.setProperty( TAG_NAME_CASE, "match" );
- configuration.setProperty( ATTRIBUTE_NAME_CASE, "no-change" );
- }
-
- try {
- final DOMParser domParser = new DOMParser( configuration, adapter );
- domParser.setFeature( DEFER_NODE_EXPANSION, false );
- if (HTMLParserFactory.isReturnHTMLDocument()) domParser.setProperty( DOCUMENT_CLASS_NAME, HTML_DOCUMENT_CLASS_NAME );
- javaScriptFilter.setParser( domParser );
- return domParser;
- } catch (SAXNotRecognizedException e) {
- throw new RuntimeException( e.toString() );
- } catch (SAXNotSupportedException e) {
- throw new RuntimeException( e.toString() );
- }
-
- }
-
-
- ScriptableDelegate getScriptableDelegate() {
- if (_scriptableObject == null) {
- Node node = getCurrentElementNode();
- while (!(node instanceof Document)) node = node.getParentNode();
- _documentAdapter.setRootNode( node );
- _scriptableObject = _documentAdapter.getScriptableObject();
- }
- return _scriptableObject;
- }
-
-
- private Node getCurrentElementNode() {
- try {
- final Node node = (Node) getProperty( CURRENT_ELEMENT_NODE );
- return node;
- } catch (SAXNotRecognizedException e) {
- throw new RuntimeException( CURRENT_ELEMENT_NODE + " property not recognized" );
- } catch (SAXNotSupportedException e) {
- e.printStackTrace();
- throw new RuntimeException( CURRENT_ELEMENT_NODE + " property not supported" );
- }
- }
-
-
- String getIncludedScript( String srcAttribute ) {
- try {
- return _documentAdapter.getIncludedScript( srcAttribute );
- } catch (IOException e) {
- throw new ScriptException( e );
- }
- }
-
-
- DOMParser( HTMLConfiguration configuration, DocumentAdapter adapter ) {
- super( configuration );
- _documentAdapter = adapter;
- }
-
-
- static class ScriptException extends RuntimeException {
- private IOException _cause;
-
- public ScriptException( IOException cause ) {
- _cause = cause;
- }
-
- public IOException getException() {
- return _cause;
- }
- }
-}
-
-
-class ErrorHandler implements XMLErrorHandler {
-
- private URL _url = null;
-
- ErrorHandler( URL url ) {
- _url = url;
- }
-
- public void warning( String domain, String key, XMLParseException warningException ) throws XNIException {
- if (HTMLParserFactory.isParserWarningsEnabled()) {
- System.out.println( "At line " + warningException.getLineNumber() + ", column " + warningException.getColumnNumber() + ": " + warningException.getMessage() );
- }
-
- Enumeration enum = HTMLParserFactory.getHTMLParserListeners().elements();
- while (enum.hasMoreElements()) {
- ((HTMLParserListener) enum.nextElement()).warning( _url, warningException.getMessage(), warningException.getLineNumber(), warningException.getColumnNumber() );
- }
- }
-
-
- public void error( String domain, String key, XMLParseException errorException ) throws XNIException {
- Enumeration enum = HTMLParserFactory.getHTMLParserListeners().elements();
- while (enum.hasMoreElements()) {
- ((HTMLParserListener) enum.nextElement()).error( _url, errorException.getMessage(), errorException.getLineNumber(), errorException.getColumnNumber() );
- }
- }
-
-
- public void fatalError( String domain, String key, XMLParseException fatalError ) throws XNIException {
- error( domain, key, fatalError );
- throw fatalError;
- }
-}
Index: ScriptFilter.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/parsing/ScriptFilter.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ScriptFilter.java 10 Jan 2003 18:21:46 -0000 1.3
+++ ScriptFilter.java 9 Mar 2003 20:35:48 -0000 1.4
@@ -40,14 +40,15 @@
**/
class ScriptFilter extends DefaultFilter {
- protected static final String SCRIPT_TYPE = "javascript";
-
/** The NekoHTML configuration. */
private HTMLConfiguration _configuration;
/** A string buffer to collect the script. */
private StringBuffer _activeScriptBlock;
+ /** The name of the current script language. **/
+ private String _scriptLanguage;
+
/** The system identifier of the source document. */
private String _systemID = "";
@@ -55,7 +56,7 @@
private int _scriptIndex;
/** The parser in which this filter is running. **/
- private DOMParser _domParser;
+ private NekoDOMParser _domParser;
/** Constructs a script object with the specified configuration. */
@@ -64,7 +65,7 @@
}
- public void setParser( DOMParser domParser ) {
+ public void setParser( NekoDOMParser domParser ) {
_domParser = domParser;
}
@@ -77,11 +78,16 @@
}
+ /**
+ * Invoked for a start element. If the element is a <script>, overrides the normal behavior to begin collecting
+ * the script text.
+ */
public void startElement( QName element, XMLAttributes attrs, Augmentations augs ) throws XNIException {
if (!isSupportedScript( element, attrs )) {
super.startElement( element, attrs, augs );
} else {
_activeScriptBlock = new StringBuffer();
+ _scriptLanguage = getScriptLanguage( attrs );
String srcAttribute = attrs.getValue( "src" );
if (srcAttribute != null) _activeScriptBlock.append( _domParser.getIncludedScript( srcAttribute ) );
}
@@ -90,8 +96,13 @@
private boolean isSupportedScript( QName element, XMLAttributes attrs ) {
if (!element.rawname.equalsIgnoreCase( "script" ) || attrs == null) return false;
- String value = attrs.getValue( "language" );
- return value == null || value.toLowerCase().startsWith( SCRIPT_TYPE );
+ String value = getScriptLanguage( attrs );
+ return _domParser.getScriptableDelegate().supportsScript( value );
+ }
+
+
+ private String getScriptLanguage( XMLAttributes attrs ) {
+ return attrs == null ? null : attrs.getValue( "language" );
}
@@ -117,7 +128,7 @@
} else {
try {
final String scriptText = _activeScriptBlock.toString();
- String replacementText = getTranslatedScript( scriptText );
+ String replacementText = getTranslatedScript( _scriptLanguage, scriptText );
_configuration.pushInputSource( newInputSource( replacementText ) );
} catch (IOException e) { // ignore
} finally {
@@ -135,8 +146,8 @@
}
- protected String getTranslatedScript( final String scriptText ) throws IOException {
- return _domParser.getScriptableDelegate().runScript( scriptText );
+ protected String getTranslatedScript( final String language, final String scriptText ) throws IOException {
+ return _domParser.getScriptableDelegate().runScript( language, scriptText );
}
|
|
From: Russell G. <rus...@us...> - 2003-03-09 20:35:50
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv26420/src/com/meterware/httpunit
Modified Files:
HTMLPage.java ParsedHTML.java WebResponse.java
Added Files:
ContentConcealer.java
Log Message:
support <noscript> tags
***** Error reading new file[Errno 2] No such file or directory: 'ContentConcealer.java'
Index: HTMLPage.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/HTMLPage.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- HTMLPage.java 28 Feb 2003 17:29:51 -0000 1.25
+++ HTMLPage.java 9 Mar 2003 20:35:46 -0000 1.26
@@ -31,7 +31,6 @@
import java.io.IOException;
import java.net.URL;
-import java.util.ArrayList;
import java.util.Vector;
@@ -69,43 +68,6 @@
NodeList nl = ((Document) getOriginalDOM()).getElementsByTagName( "body" );
if (nl.getLength() == 0) return "";
return ((Element) nl.item(0)).getAttribute( "onload" );
- }
-
-
- /**
- * Returns the contents of any script tags on the page, concatenated.
- */
- public String[] getScripts() throws SAXException {
- NodeList nl = ((Document) getOriginalDOM()).getElementsByTagName( "script" );
- ArrayList scripts = new ArrayList();
- for (int i = 0; i < nl.getLength(); i++) {
- Node scriptNode = nl.item(i);
- String language = NodeUtils.getNodeAttribute( scriptNode, "language", null );
- if (language != null && !language.startsWith( "JavaScript")) continue;
- String scriptLocation = NodeUtils.getNodeAttribute( scriptNode, "src", null );
- if (scriptLocation == null) {
- scripts.add( NodeUtils.asText( scriptNode.getChildNodes() ) );
- } else {
- try {
- scripts.add( getIncludedScript( scriptLocation ) );
- } catch (IOException e) {
- throw new RuntimeException( "Error loading included script: " + e );
- }
- }
- }
- return (String[]) scripts.toArray( new String[ scripts.size() ] );
- }
-
-
- /**
- * Returns the contents of an included script, given its src attribute.
- * @param srcAttribute
- * @return the contents of the script.
- * @throws IOException if there is a problem retrieving the script
- */
- String getIncludedScript( String srcAttribute ) throws IOException {
- WebRequest req = new GetMethodWebRequest( getBaseURL(), srcAttribute );
- return getResponse().getWindow().getResource( req ).getText();
}
Index: ParsedHTML.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/ParsedHTML.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- ParsedHTML.java 4 Feb 2003 05:32:03 -0000 1.44
+++ ParsedHTML.java 9 Mar 2003 20:35:46 -0000 1.45
@@ -24,6 +24,7 @@
import java.net.URL;
import java.util.*;
+import java.io.IOException;
import com.meterware.httpunit.scripting.ScriptableDelegate;
@@ -47,6 +48,8 @@
private boolean _updateElements = true;
+ private boolean _enableNoScriptNodes;
+
/** map of element IDs to elements. **/
private HashMap _elementsByID = new HashMap();
@@ -191,6 +194,55 @@
}
+ private void interpretScriptElement( Element element ) {
+ String script = getScript( element );
+ if (script != null) {
+ try {
+ _updateElements = false;
+ String language = NodeUtils.getNodeAttribute( element, "language", null );
+ if (!getResponse().getScriptableObject().supportsScript( language )) _enableNoScriptNodes = true;
+ getResponse().getScriptableObject().runScript( language, script );
+ } finally {
+ setRootNode( _rootNode );
+ }
+ }
+ }
+
+
+ private String getScript( Node scriptNode ) {
+ String scriptLocation = NodeUtils.getNodeAttribute( scriptNode, "src", null );
+ if (scriptLocation == null) {
+ return NodeUtils.asText( scriptNode.getChildNodes() );
+ } else {
+ try {
+ return getIncludedScript( scriptLocation );
+ } catch (IOException e) {
+ throw new RuntimeException( "Error loading included script: " + e );
+ }
+ }
+ }
+
+
+ /**
+ * Returns the contents of an included script, given its src attribute.
+ * @param srcAttribute
+ * @return the contents of the script.
+ * @throws java.io.IOException if there is a problem retrieving the script
+ */
+ String getIncludedScript( String srcAttribute ) throws IOException {
+ WebRequest req = new GetMethodWebRequest( getBaseURL(), srcAttribute );
+ return getResponse().getWindow().getResource( req ).getText();
+ }
+
+
+ /**
+ * If noscript node content is enabled, returns null - otherwise returns a concealing element.
+ */
+ private HTMLElement toNoscriptElement( Element element ) {
+ return _enableNoScriptNodes ? null : new NoScriptElement( element );
+ }
+
+
abstract static class HTMLElementFactory {
abstract HTMLElement toHTMLElement( NodeUtils.PreOrderTraversal pot, ParsedHTML parsedHTML, Element element );
@@ -271,6 +323,30 @@
}
+ static class ScriptFactory extends HTMLElementFactory {
+
+ HTMLElement toHTMLElement( NodeUtils.PreOrderTraversal pot, ParsedHTML parsedHTML, Element element ) {
+ return null;
+ }
+
+ void recordElement( NodeUtils.PreOrderTraversal pot, Element element, ParsedHTML parsedHTML ) {
+ parsedHTML.interpretScriptElement( element );
+ }
+ }
+
+
+ static class NoScriptFactory extends HTMLElementFactory {
+
+ HTMLElement toHTMLElement( NodeUtils.PreOrderTraversal pot, ParsedHTML parsedHTML, Element element ) {
+ return parsedHTML.toNoscriptElement( element );
+ }
+
+ protected boolean addToContext() {
+ return true;
+ }
+ }
+
+
static class WebFrameFactory extends HTMLElementFactory {
HTMLElement toHTMLElement( NodeUtils.PreOrderTraversal pot, ParsedHTML parsedHTML, Element element ) {
return parsedHTML.toWebFrame( element );
@@ -280,7 +356,7 @@
static class WebIFrameFactory extends HTMLElementFactory {
HTMLElement toHTMLElement( NodeUtils.PreOrderTraversal pot, ParsedHTML parsedHTML, Element element ) {
- return parsedHTML.toWebFrame( element );
+ return parsedHTML.toWebIFrame( element );
}
@@ -372,17 +448,19 @@
private static HTMLElementFactory _defaultFactory = new DefaultElementFactory();
static {
- _htmlFactoryClasses.put( "a", new WebLinkFactory() );
- _htmlFactoryClasses.put( "area", new WebLinkFactory() );
- _htmlFactoryClasses.put( "form", new WebFormFactory() );
- _htmlFactoryClasses.put( "img", new WebImageFactory() );
- _htmlFactoryClasses.put( "applet", new WebAppletFactory() );
- _htmlFactoryClasses.put( "table", new WebTableFactory() );
- _htmlFactoryClasses.put( "tr", new TableRowFactory() );
- _htmlFactoryClasses.put( "td", new TableCellFactory() );
- _htmlFactoryClasses.put( "th", new TableCellFactory() );
- _htmlFactoryClasses.put( "frame", new WebFrameFactory() );
- _htmlFactoryClasses.put( "iframe", new WebIFrameFactory() );
+ _htmlFactoryClasses.put( "a", new WebLinkFactory() );
+ _htmlFactoryClasses.put( "area", new WebLinkFactory() );
+ _htmlFactoryClasses.put( "form", new WebFormFactory() );
+ _htmlFactoryClasses.put( "img", new WebImageFactory() );
+ _htmlFactoryClasses.put( "applet", new WebAppletFactory() );
+ _htmlFactoryClasses.put( "table", new WebTableFactory() );
+ _htmlFactoryClasses.put( "tr", new TableRowFactory() );
+ _htmlFactoryClasses.put( "td", new TableCellFactory() );
+ _htmlFactoryClasses.put( "th", new TableCellFactory() );
+ _htmlFactoryClasses.put( "frame", new WebFrameFactory() );
+ _htmlFactoryClasses.put( "iframe", new WebIFrameFactory() );
+ _htmlFactoryClasses.put( "script", new ScriptFactory() );
+ _htmlFactoryClasses.put( "noscript", new NoScriptFactory() );
for (Iterator i = Arrays.asList( FormControl.getControlElementTags() ).iterator(); i.hasNext();) {
_htmlFactoryClasses.put( i.next(), new FormControlFactory() );
@@ -402,7 +480,7 @@
public boolean processElement( NodeUtils.PreOrderTraversal pot, Element element ) {
HTMLElementFactory factory = getHTMLElementFactory( element.getNodeName().toLowerCase() );
if (factory == null || !factory.isRecognized( getClientProperties() )) return true;
- if (pot.getClosestContext( WebFrame.class ) != null) return true;
+ if (pot.getClosestContext( ContentConcealer.class ) != null) return true;
if (!_elements.containsKey( element )) factory.recordElement( pot, element, ParsedHTML.this );
if (factory.addToContext()) pot.pushContext( _elements.get( element ) );
@@ -436,6 +514,11 @@
}
+ private WebFrame toWebIFrame( Element element ) {
+ return new WebIFrame( _baseURL, element, _frameName );
+ }
+
+
private WebLink toLinkAnchor( Element child ) {
return (!isWebLink( child )) ? null : new WebLink( _response, _baseURL, _baseTarget, child );
}
@@ -723,4 +806,31 @@
return null;
}
-}
\ No newline at end of file
+
+
+ class WebIFrame extends WebFrame implements ContentConcealer {
+
+ public WebIFrame( URL baseURL, Node frameNode, String parentFrameName ) {
+ super( baseURL, frameNode, parentFrameName );
+ }
+ }
+
+
+ class NoScriptElement extends HTMLElementBase implements ContentConcealer {
+
+ public NoScriptElement( Node node ) {
+ super( node );
+ }
+
+
+ protected ScriptableDelegate newScriptable() {
+ return null;
+ }
+
+
+ protected ScriptableDelegate getParentDelegate() {
+ return null;
+ }
+ }
+
+}
Index: WebResponse.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebResponse.java,v
retrieving revision 1.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- WebResponse.java 7 Mar 2003 05:03:59 -0000 1.111
+++ WebResponse.java 9 Mar 2003 20:35:46 -0000 1.112
@@ -564,10 +564,11 @@
public void load() throws SAXException {
if (isHTML()) {
- final String[] scripts = getReceivedPage().getScripts();
- for (int i = 0; i < scripts.length; i++) {
- runScript( scripts[i] );
- }
+ getReceivedPage().getForms(); // TODO be more explicit here - don't care about forms, after all
+// final String[] scripts = getReceivedPage().getScripts(); TODO delete this
+// for (int i = 0; i < scripts.length; i++) {
+// runScript( scripts[i] );
+// }
doEvent( getReceivedPage().getOnLoadEvent() );
}
}
|
|
From: Russell G. <rus...@us...> - 2003-03-09 20:35:50
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv26420/src/com/meterware/httpunit/javascript
Modified Files:
JavaScript.java
Log Message:
support <noscript> tags
Index: JavaScript.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/javascript/JavaScript.java,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- JavaScript.java 17 Feb 2003 23:54:42 -0000 1.46
+++ JavaScript.java 9 Mar 2003 20:35:47 -0000 1.47
@@ -106,7 +106,13 @@
protected JavaScriptEngine _parent;
- public String executeScript( String script ) {
+ public boolean supportsScriptLanguage( String language ) {
+ return language == null || language.toLowerCase().startsWith( "javascript" );
+ }
+
+
+ public String executeScript( String language, String script ) {
+ if (!supportsScriptLanguage( language )) return "";
try {
script = script.trim();
if (script.startsWith( "<!--" )) {
|
|
From: Russell G. <rus...@us...> - 2003-03-07 05:04:43
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv18509/test/com/meterware/httpunit/javascript
Modified Files:
JavaScriptTestSuite.java
Added Files:
FrameScriptingTest.java
Log Message:
from Andrew Bickerton: handle writes to frames with non-HTML and with new <base> tags
***** Error reading new file[Errno 2] No such file or directory: 'FrameScriptingTest.java'
Index: JavaScriptTestSuite.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/JavaScriptTestSuite.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- JavaScriptTestSuite.java 30 Dec 2002 21:46:58 -0000 1.3
+++ JavaScriptTestSuite.java 7 Mar 2003 05:04:05 -0000 1.4
@@ -2,7 +2,7 @@
/********************************************************************************************************************
* $Id$
*
- * Copyright (c) 2002, Russell Gold
+ * Copyright (c) 2002-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
@@ -40,6 +40,7 @@
result.addTest( ScriptingTest.suite() );
result.addTest( DocumentScriptingTest.suite() );
result.addTest( FormScriptingTest.suite() );
+ result.addTest( FrameScriptingTest.suite() );
result.addTest( HTMLElementTest.suite() );
return result;
}
|
|
From: Russell G. <rus...@us...> - 2003-03-07 05:04:36
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver
In directory sc8-pr-cvs1:/tmp/cvs-serv18509/src/com/meterware/pseudoserver
Modified Files:
HttpUserAgentTest.java
Log Message:
from Andrew Bickerton: handle writes to frames with non-HTML and with new <base> tags
Index: HttpUserAgentTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/pseudoserver/HttpUserAgentTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- HttpUserAgentTest.java 11 Feb 2003 04:32:00 -0000 1.7
+++ HttpUserAgentTest.java 7 Mar 2003 05:04:02 -0000 1.8
@@ -63,6 +63,11 @@
}
+ protected void defineResource( String resourceName, byte[] value, String contentType ) {
+ _server.setResource( resourceName, value, contentType );
+ }
+
+
protected void defineResource( String resourceName, String value, int statusCode ) {
_server.setErrorResource( resourceName, statusCode, value );
}
|
|
From: Russell G. <rus...@us...> - 2003-03-07 05:04:36
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv18509/src/com/meterware/httpunit
Modified Files:
WebResponse.java
Log Message:
from Andrew Bickerton: handle writes to frames with non-HTML and with new <base> tags
Index: WebResponse.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebResponse.java,v
retrieving revision 1.110
retrieving revision 1.111
diff -u -r1.110 -r1.111
--- WebResponse.java 23 Feb 2003 20:03:38 -0000 1.110
+++ WebResponse.java 7 Mar 2003 05:03:59 -0000 1.111
@@ -544,6 +544,7 @@
public HTMLPage.Scriptable getDocument() {
try {
+ if (!isHTML()) replaceText( BLANK_HTML, HTML_CONTENT );
return getReceivedPage().getScriptableObject();
} catch (SAXException e) {
throw new RuntimeException( e.toString() );
@@ -736,6 +737,18 @@
_inputStream = null;
_page = null;
_contentType = contentType;
+ _baseURL = null;
+ _baseTarget = null;
+ _refreshHeader = null;
+ _hasSubframes = false;
+
+ try {
+ readTags( text.getBytes() );
+ } catch (UnsupportedEncodingException e) {
+ throw new RuntimeException( "Failure while attempting to reparse text: " + e );
+ } catch (MalformedURLException e) {
+ throw new RuntimeException( "Failure while attempting to reparse text: " + e );
+ }
}
|
|
From: Russell G. <rus...@us...> - 2003-03-07 05:04:33
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv18509/doc
Modified Files:
release_notes.txt
Log Message:
from Andrew Bickerton: handle writes to frames with non-HTML and with new <base> tags
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.265
retrieving revision 1.266
diff -u -r1.265 -r1.266
--- release_notes.txt 3 Mar 2003 19:44:22 -0000 1.265
+++ release_notes.txt 7 Mar 2003 05:03:56 -0000 1.266
@@ -13,6 +13,16 @@
Revision History:
+ 7-Mar-2003
+Acknowledgements:
+ Thanks to Andrew Bickerton for correcting the handling of document.open for non-HTML pages and new pages with
+ base tags.
+
+Problems fixed:
+ 1. calling Document.open() on a non-HTML page no longer throws an exception.
+ 2. Rewriting a document now properly handles any <base> tags in the new document.
+
+
3-Mar-2003 1.5.2
Acknowledgements:
Thanks to John Sinclair for noting the lack of line breaks in manifest.mf and proposing a fix
|
|
From: Russell G. <rus...@us...> - 2003-03-03 19:44:26
|
Update of /cvsroot/httpunit/httpunit/jars In directory sc8-pr-cvs1:/tmp/cvs-serv14894/jars Modified Files: jars.txt nekohtml.jar Log Message: Prepare for 1.5.2 release Index: jars.txt =================================================================== RCS file: /cvsroot/httpunit/httpunit/jars/jars.txt,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- jars.txt 17 Feb 2003 23:54:40 -0000 1.10 +++ jars.txt 3 Mar 2003 19:44:22 -0000 1.11 @@ -6,7 +6,7 @@ xerces 2.2 jtidy 04aug2000r7 rhino 1.5R4+ (patched) -NekoHTML 0.7.2 +NekoHTML 0.7.2 (patched) (for testing HttpUnit only) mail (javamail 1.2) Index: nekohtml.jar =================================================================== RCS file: /cvsroot/httpunit/httpunit/jars/nekohtml.jar,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 Binary files /tmp/cvskB1sXc and /tmp/cvs0EgOEh differ |
|
From: Russell G. <rus...@us...> - 2003-03-03 19:44:26
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv14894/doc
Modified Files:
faq.html release_notes.txt
Log Message:
Prepare for 1.5.2 release
Index: faq.html
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/faq.html,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- faq.html 13 Jan 2003 21:57:29 -0000 1.23
+++ faq.html 3 Mar 2003 19:44:21 -0000 1.24
@@ -7,6 +7,7 @@
<OL>
<LI><A HREF="#Cannot unzip">Why can't I unzip the download library?</A></LI>
<LI><A HREF="#org.xml.sax">What is the org.xml.sax package?</A></LI>
+<LI><A HREF="#api-help">I don't understand how the ... API works.</A></LI>
</ol><ol start=3>
@@ -41,6 +42,12 @@
<A NAME="org.xml.sax"><h3>What is the org.xml.sax package?</h3></A>
You may be getting compile or runtime errors asking for the org.xml.sax package.
You need to have xerces or another XML parser in your classpath. Xerces is included in the download.
+
+<A NAME="#api-help"><h3>I don't understand how the ... API works.<h3></A>
+The best way to understand how the API works is to look at the samples in the <tt>test</tt> directory. This contains an example of just about
+every feature of the library and is used to verify that they continue to work.
+Of course, if you know a tech writer who would like to contribute to improving the documentation, that is always welcome.
+
<h2>Server Issues</h2>
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.264
retrieving revision 1.265
diff -u -r1.264 -r1.265
--- release_notes.txt 28 Feb 2003 17:30:23 -0000 1.264
+++ release_notes.txt 3 Mar 2003 19:44:22 -0000 1.265
@@ -13,7 +13,7 @@
Revision History:
- 28-Feb-2003 1.5.2 release candidate
+ 3-Mar-2003 1.5.2
Acknowledgements:
Thanks to John Sinclair for noting the lack of line breaks in manifest.mf and proposing a fix
Thanks to Bernhard Wagner for simplifying some string comparison code in ParsedHTML and WebTable
|
|
From: Russell G. <rus...@us...> - 2003-02-28 17:31:04
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv18714/test/com/meterware/httpunit
Modified Files:
HttpUnitTest.java
Log Message:
Support parser warnings from NekoHTML
Index: HttpUnitTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/HttpUnitTest.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- HttpUnitTest.java 26 Dec 2002 15:33:57 -0000 1.25
+++ HttpUnitTest.java 28 Feb 2003 17:30:30 -0000 1.26
@@ -20,6 +20,7 @@
*
*******************************************************************************************************************/
import com.meterware.pseudoserver.HttpUserAgentTest;
+import com.meterware.httpunit.parsing.HTMLParserFactory;
/**
* a base class for HttpUnit regression tests.
@@ -47,6 +48,7 @@
public void setUp() throws Exception {
super.setUp();
HttpUnitOptions.reset();
+ HTMLParserFactory.reset();
if (_showTestName) {
System.out.println( "----------------------- " + getName() + " ------------------------");
_startTime = System.currentTimeMillis();
|
|
From: Russell G. <rus...@us...> - 2003-02-28 17:31:02
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/parsing
In directory sc8-pr-cvs1:/tmp/cvs-serv18714/src/com/meterware/httpunit/parsing
Modified Files:
NekoHTMLParser.java
Log Message:
Support parser warnings from NekoHTML
Index: NekoHTMLParser.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/parsing/NekoHTMLParser.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- NekoHTMLParser.java 25 Dec 2002 15:23:11 -0000 1.2
+++ NekoHTMLParser.java 28 Feb 2003 17:30:26 -0000 1.3
@@ -20,6 +20,9 @@
*
*******************************************************************************************************************/
import org.apache.xerces.xni.parser.XMLDocumentFilter;
+import org.apache.xerces.xni.parser.XMLErrorHandler;
+import org.apache.xerces.xni.parser.XMLParseException;
+import org.apache.xerces.xni.XNIException;
import org.cyberneko.html.HTMLConfiguration;
@@ -33,6 +36,7 @@
import java.net.URL;
import java.io.IOException;
import java.io.StringReader;
+import java.util.Enumeration;
import com.meterware.httpunit.scripting.ScriptableDelegate;
@@ -40,13 +44,14 @@
*
* @author <a href="mailto:rus...@ht...">Russell Gold</a>
* @author <a href="mailto:bw...@xm...">Bernhard Wagner</a>
+ * @author <a href="mailto:Art...@ly...">Artashes Aghajanyan</a>
**/
class NekoHTMLParser implements HTMLParser {
public void parse( URL pageURL, String pageText, DocumentAdapter adapter ) throws IOException, SAXException {
try {
- DOMParser parser = DOMParser.newParser( adapter );
+ DOMParser parser = DOMParser.newParser( adapter, pageURL );
parser.parse( new InputSource( new StringReader( pageText ) ) );
adapter.setRootNode( parser.getDocument() );
} catch (DOMParser.ScriptException e) {
@@ -71,7 +76,7 @@
public boolean supportsParserWarnings() {
- return false;
+ return true;
}
@@ -83,25 +88,31 @@
private static final String HTML_DOCUMENT_CLASS_NAME = "org.apache.html.dom.HTMLDocumentImpl";
+ /** Error reporting feature identifier. */
+ private static final String REPORT_ERRORS = "http://cyberneko.org/html/features/report-errors";
+
/** Augmentations feature identifier. */
- protected static final String AUGMENTATIONS = "http://cyberneko.org/html/features/augmentations";
+ private static final String AUGMENTATIONS = "http://cyberneko.org/html/features/augmentations";
/** Filters property identifier. */
- protected static final String FILTERS = "http://cyberneko.org/html/properties/filters";
+ private static final String FILTERS = "http://cyberneko.org/html/properties/filters";
/** Element case settings. possible values: "upper", "lower", "match" */
- protected static final String TAG_NAME_CASE = "http://cyberneko.org/html/properties/names/elems";
+ private static final String TAG_NAME_CASE = "http://cyberneko.org/html/properties/names/elems";
/** Attribute case settings. possible values: "upper", "lower", "no-change" */
- protected static final String ATTRIBUTE_NAME_CASE = "http://cyberneko.org/html/properties/names/attrs";
-
+ private static final String ATTRIBUTE_NAME_CASE = "http://cyberneko.org/html/properties/names/attrs";
private DocumentAdapter _documentAdapter;
private ScriptableDelegate _scriptableObject;
- static DOMParser newParser( DocumentAdapter adapter ) {
+ static DOMParser newParser( DocumentAdapter adapter, URL url ) {
final HTMLConfiguration configuration = new HTMLConfiguration();
+ if (!HTMLParserFactory.getHTMLParserListeners().isEmpty() || HTMLParserFactory.isParserWarningsEnabled()) {
+ configuration.setErrorHandler( new ErrorHandler( url ) );
+ configuration.setFeature( REPORT_ERRORS, true);
+ }
configuration.setFeature( AUGMENTATIONS, true );
final ScriptFilter javaScriptFilter = new ScriptFilter( configuration );
configuration.setProperty( FILTERS, new XMLDocumentFilter[] { javaScriptFilter } );
@@ -174,5 +185,40 @@
public IOException getException() {
return _cause;
}
+ }
+}
+
+
+class ErrorHandler implements XMLErrorHandler {
+
+ private URL _url = null;
+
+ ErrorHandler( URL url ) {
+ _url = url;
+ }
+
+ public void warning( String domain, String key, XMLParseException warningException ) throws XNIException {
+ if (HTMLParserFactory.isParserWarningsEnabled()) {
+ System.out.println( "At line " + warningException.getLineNumber() + ", column " + warningException.getColumnNumber() + ": " + warningException.getMessage() );
+ }
+
+ Enumeration enum = HTMLParserFactory.getHTMLParserListeners().elements();
+ while (enum.hasMoreElements()) {
+ ((HTMLParserListener) enum.nextElement()).warning( _url, warningException.getMessage(), warningException.getLineNumber(), warningException.getColumnNumber() );
+ }
+ }
+
+
+ public void error( String domain, String key, XMLParseException errorException ) throws XNIException {
+ Enumeration enum = HTMLParserFactory.getHTMLParserListeners().elements();
+ while (enum.hasMoreElements()) {
+ ((HTMLParserListener) enum.nextElement()).error( _url, errorException.getMessage(), errorException.getLineNumber(), errorException.getColumnNumber() );
+ }
+ }
+
+
+ public void fatalError( String domain, String key, XMLParseException fatalError ) throws XNIException {
+ error( domain, key, fatalError );
+ throw fatalError;
}
}
|
|
From: Russell G. <rus...@us...> - 2003-02-28 17:31:01
|
Update of /cvsroot/httpunit/httpunit/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv18714/doc
Modified Files:
release_notes.txt
Log Message:
Support parser warnings from NekoHTML
Index: release_notes.txt
===================================================================
RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v
retrieving revision 1.263
retrieving revision 1.264
diff -u -r1.263 -r1.264
--- release_notes.txt 27 Feb 2003 23:35:53 -0000 1.263
+++ release_notes.txt 28 Feb 2003 17:30:23 -0000 1.264
@@ -13,7 +13,7 @@
Revision History:
- 27-Feb-2003 1.5.2 release candidate
+ 28-Feb-2003 1.5.2 release candidate
Acknowledgements:
Thanks to John Sinclair for noting the lack of line breaks in manifest.mf and proposing a fix
Thanks to Bernhard Wagner for simplifying some string comparison code in ParsedHTML and WebTable
@@ -29,6 +29,7 @@
Thanks to Jason Bedell for supplying an implementation for HttpSession.getValueNames.
Thanks to Jianqin Qu for finding the getTableStartingWithPrefix bug when using NekoHTML
Thanks to Scott Fleischman for providing tests for missing frame handling functionality
+ Thanks to Artashes Aghajanyan for implementing error reporting for the NekoHTML parser
Problems Fixed:
Packaging
@@ -74,12 +75,12 @@
without a <frameset> tag. IFrame support is controlled by the ClientProperties.iframeSupported property.
6. WebForm.isHiddenParameter returns true if all parameters with the specified name are hidden
7. Frame handling is now more flexible, searching within a window for a target frame rather than just below the source frame.
+ 8. HTMLParserListeners and parser warnings now work with the NekoHTML parser.
JavaScript
- 8. Added support for document.getElementById
9. All HTML elements with id attributes are now accessible
10. The Form.target property is now supported
+ 11. Added support for document.getElementById
ServletUnit
- 11. ServletUnit now supports HttpServletRequest.getHeaderNames
12. ServletUnit now handles https requests, marking them as "secure."
13. ServletUnit now supports HttpServletResponse.flushBuffer()
14. InvocationContext now supports include and forwarded servlets: calling pushIncludeRequest or pushForwardRequest
@@ -89,6 +90,7 @@
16. HttpServletResponse methods reset(), resetBuffer(), and setBufferSize() are now implemented.
17. ServletRunner.shutDown() will invoke the destroy() methods of any servlets which have been invoked
through that servlet runner.
+ 18. ServletUnit now supports HttpServletRequest.getHeaderNames
Notes:
1. Upgraded NekoHTML to 0.7.2 which no longer generates superfluous <form> tags.
|