You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(10) |
Aug
(30) |
Sep
(15) |
Oct
(26) |
Nov
(12) |
Dec
(17) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(7) |
Feb
(27) |
Mar
(73) |
Apr
(17) |
May
(17) |
Jun
(78) |
Jul
(67) |
Aug
(60) |
Sep
(89) |
Oct
(140) |
Nov
(173) |
Dec
(46) |
2004 |
Jan
(39) |
Feb
(7) |
Mar
(21) |
Apr
(31) |
May
(13) |
Jun
(86) |
Jul
(14) |
Aug
(14) |
Sep
(53) |
Oct
(184) |
Nov
(186) |
Dec
(319) |
2005 |
Jan
(336) |
Feb
(274) |
Mar
(226) |
Apr
(102) |
May
(196) |
Jun
(130) |
Jul
(119) |
Aug
(143) |
Sep
(76) |
Oct
(85) |
Nov
(70) |
Dec
(159) |
2006 |
Jan
(125) |
Feb
(100) |
Mar
(80) |
Apr
(39) |
May
(55) |
Jun
(58) |
Jul
(50) |
Aug
(76) |
Sep
(55) |
Oct
(101) |
Nov
(163) |
Dec
(85) |
2007 |
Jan
(56) |
Feb
(53) |
Mar
(180) |
Apr
(221) |
May
(290) |
Jun
(199) |
Jul
(322) |
Aug
(515) |
Sep
(121) |
Oct
(297) |
Nov
(177) |
Dec
(103) |
2008 |
Jan
(516) |
Feb
(315) |
Mar
(586) |
Apr
(615) |
May
(197) |
Jun
(381) |
Jul
(390) |
Aug
(195) |
Sep
(603) |
Oct
(499) |
Nov
(622) |
Dec
(350) |
2009 |
Jan
(313) |
Feb
(338) |
Mar
(507) |
Apr
(317) |
May
(197) |
Jun
(375) |
Jul
(235) |
Aug
(424) |
Sep
(410) |
Oct
(338) |
Nov
(286) |
Dec
(306) |
2010 |
Jan
(367) |
Feb
(339) |
Mar
(371) |
Apr
(172) |
May
(233) |
Jun
(264) |
Jul
(421) |
Aug
(110) |
Sep
(218) |
Oct
(189) |
Nov
(185) |
Dec
(168) |
2011 |
Jan
(145) |
Feb
(213) |
Mar
(205) |
Apr
(64) |
May
(159) |
Jun
(67) |
Jul
(104) |
Aug
(126) |
Sep
(144) |
Oct
(106) |
Nov
(154) |
Dec
(225) |
2012 |
Jan
(111) |
Feb
(87) |
Mar
(131) |
Apr
(102) |
May
(180) |
Jun
(160) |
Jul
(412) |
Aug
(315) |
Sep
(311) |
Oct
(369) |
Nov
(464) |
Dec
(284) |
2013 |
Jan
(343) |
Feb
(165) |
Mar
(174) |
Apr
(120) |
May
(153) |
Jun
(134) |
Jul
(202) |
Aug
(105) |
Sep
(228) |
Oct
(332) |
Nov
(192) |
Dec
(219) |
2014 |
Jan
(348) |
Feb
(194) |
Mar
(189) |
Apr
(188) |
May
(297) |
Jun
(206) |
Jul
(79) |
Aug
(279) |
Sep
(111) |
Oct
(159) |
Nov
(61) |
Dec
(78) |
2015 |
Jan
(152) |
Feb
(145) |
Mar
(239) |
Apr
(223) |
May
(248) |
Jun
(296) |
Jul
(172) |
Aug
(189) |
Sep
(338) |
Oct
(217) |
Nov
(131) |
Dec
(184) |
2016 |
Jan
(118) |
Feb
(221) |
Mar
(414) |
Apr
(412) |
May
(303) |
Jun
(133) |
Jul
(129) |
Aug
(121) |
Sep
(136) |
Oct
(67) |
Nov
(89) |
Dec
(245) |
2017 |
Jan
(349) |
Feb
(90) |
Mar
(328) |
Apr
(430) |
May
(284) |
Jun
(199) |
Jul
(164) |
Aug
(120) |
Sep
(57) |
Oct
(105) |
Nov
(108) |
Dec
(146) |
2018 |
Jan
(85) |
Feb
(48) |
Mar
(97) |
Apr
(62) |
May
(64) |
Jun
(136) |
Jul
(123) |
Aug
(87) |
Sep
(17) |
Oct
(27) |
Nov
(9) |
Dec
(16) |
2019 |
Jan
(9) |
Feb
(17) |
Mar
(18) |
Apr
(14) |
May
(8) |
Jun
|
Jul
(6) |
Aug
(12) |
Sep
(5) |
Oct
|
Nov
(2) |
Dec
|
2020 |
Jan
(8) |
Feb
|
Mar
(6) |
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
|
Sep
(4) |
Oct
(1) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(4) |
Dec
|
2022 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(2) |
Dec
|
2023 |
Jan
|
Feb
(6) |
Mar
(9) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <no...@us...> - 2003-09-19 20:07:35
|
Log Message: ----------- Fixed remaining checkstyle warnings which had to do with utility classes not having public constructors Modified Files: -------------- /cvsroot/htmlunit/htmlunit/src/test/java/com/gargoylesoftware/htmlunit: SanityCheck.java MainTestSuite.java /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit: Version.java Revision Data ------------- Index: SanityCheck.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/SanityCheck.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- SanityCheck.java 17 Sep 2003 18:24:38 -0000 1.8 +++ SanityCheck.java 19 Sep 2003 12:53:49 -0000 1.9 @@ -67,9 +67,10 @@ /** * Main entry point for testing. * @param args the arguments. + * @throws Exception If a problem occurs. */ - public static void main( final String args[] ) { - com.gargoylesoftware.htmlunit.MainTestSuite.enableAllLogging(); + public static void main( final String args[] ) throws Exception { + new MainTestSuite("foo").enableAllLogging(); TestRunner.run( SanityCheck.class ); System.exit( 0 ); } Index: MainTestSuite.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/MainTestSuite.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- MainTestSuite.java 3 Sep 2003 15:55:23 -0000 1.4 +++ MainTestSuite.java 19 Sep 2003 12:53:49 -0000 1.5 @@ -71,7 +71,7 @@ /** * Set the appropriate logging levels for running the tests. */ - public static void enableAllLogging() { + public void enableAllLogging() { System.getProperties().put("org.apache.commons.logging.Log", "org.apache.commons.logging.impl.SimpleLog"); System.getProperties().put("org.apache.commons.logging.simplelog.defaultlog", "trace"); Index: Version.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/Version.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Version.java 10 Jun 2003 11:56:56 -0000 1.9 +++ Version.java 19 Sep 2003 12:53:49 -0000 1.10 @@ -55,7 +55,7 @@ */ public static void main( final String args[] ) throws Exception { if( args.length == 1 && args[0].equals("-SanityCheck") ) { - runSanityCheck(); + new Version().runSanityCheck(); return; } @@ -70,7 +70,7 @@ } - private static void runSanityCheck() throws Exception { + private void runSanityCheck() throws Exception { final WebClient webClient = new WebClient(); final HtmlPage page = (HtmlPage)webClient.getPage( new URL("http://htmlunit.sourceforge.net/index.html") ); |
From: <no...@us...> - 2003-09-19 19:54:27
|
Log Message: ----------- Added WebClient.getWebWindows() Modified Files: -------------- /cvsroot/htmlunit/htmlunit/src/xdocs: changes.xml /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit: WebClient.java Revision Data ------------- Index: changes.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/xdocs/changes.xml,v retrieving revision 1.134 retrieving revision 1.135 diff -u -d -r1.134 -r1.135 --- changes.xml 19 Sep 2003 14:45:22 -0000 1.134 +++ changes.xml 19 Sep 2003 15:53:26 -0000 1.135 @@ -45,6 +45,9 @@ <action type="update" dev="mbowler" id="800993"> Navigator.javaEnabled should be method not property </action> + <action type="add" dev="mbowler" id="799760"> + Added WebClient.getWebWindows() + </action> </release> <release version="1.2.3" date="July 31, 2003"> Index: WebClient.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/WebClient.java,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- WebClient.java 17 Sep 2003 18:24:39 -0000 1.48 +++ WebClient.java 19 Sep 2003 15:53:26 -0000 1.49 @@ -92,7 +92,7 @@ private PageCreator pageCreator_ = new DefaultPageCreator(); private final Set webWindowListeners_ = new HashSet(5); - private final List webWindows_ = new ArrayList(); + private final List webWindows_ = Collections.synchronizedList(new ArrayList()); private WebWindow currentWindow_ = new TopLevelWindow("", this); @@ -1212,6 +1212,14 @@ */ public HtmlElement getElementWithFocus() { return elementWithFocus_; + } + + /** + * Return an immutable list of open web windows. + * @return The web windows + */ + public List getWebWindows() { + return Collections.unmodifiableList(webWindows_); } } |
From: <no...@us...> - 2003-09-19 19:45:31
|
Log Message: ----------- Added package descriptions for all packages that didn't have them Added Files: ----------- /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/protocol/javascript: package.html /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/jelly: package.html /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/protocol/about: package.html Revision Data ------------- --- NEW FILE: package.html --- <html><head></head> <body> Support for the javascript: protocol </body></html> --- NEW FILE: package.html --- <html><head></head> <body> Support for invoking HtmlUnit via jelly tags </body></html> --- NEW FILE: package.html --- <html><head></head> <body> Support for the about: protocol </body></html> |
From: SourceForge.net <no...@so...> - 2003-09-19 19:34:10
|
Bugs item #800993, was opened at 2003-09-05 06:33 Message generated for change (Comment added) made by mbowler You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=800993&group_id=47038 Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Giles Jermy (gjermy) >Assigned to: Mike Bowler (mbowler) Summary: Navigator.javaEnabled should be method not property Initial Comment: javaEnabled is a method of the Navigator object, not a property as currently implemented. line 95 of com/gargoylesoftware/htmlunitjavascript/host/Navigator.j ava needs to change from jsGet_javaEnabled() { to jsFunction_javaEnabled() { Without this change, a piece of javascript including a line such as if (navigator.javaEnabled()) { } produces a throw with "false is not a function" in the text. I cant get logged into CVS so haven't been able to build or run the unit tests (build.xml is not present in the release) ---------------------------------------------------------------------- >Comment By: Mike Bowler (mbowler) Date: 2003-09-19 10:47 Message: Logged In: YES user_id=46756 Fixed ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=800993&group_id=47038 |
From: <no...@us...> - 2003-09-18 19:08:10
|
Log Message: ----------- Fixed bug where disabled elements were being submitted anyway. Patch supplied by Brad Clarke Modified Files: -------------- /cvsroot/htmlunit/htmlunit/src/xdocs: changes.xml /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/html: HtmlForm.java /cvsroot/htmlunit/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html: HtmlFormTest.java Revision Data ------------- Index: HtmlForm.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/html/HtmlForm.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- HtmlForm.java 15 Sep 2003 00:31:54 -0000 1.24 +++ HtmlForm.java 18 Sep 2003 19:07:22 -0000 1.25 @@ -267,7 +267,7 @@ return false; } - final Attr disabled = getElement().getAttributeNode("disabled"); + final Attr disabled = element.getAttributeNode("disabled"); if( disabled != null ) { return false; } Index: changes.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/xdocs/changes.xml,v retrieving revision 1.131 retrieving revision 1.132 diff -u -d -r1.131 -r1.132 --- changes.xml 17 Sep 2003 18:24:39 -0000 1.131 +++ changes.xml 18 Sep 2003 19:07:22 -0000 1.132 @@ -18,9 +18,7 @@ </action> <action type="update" dev="mbowler" id="803233" due-to="Brad Clarke"> an update of the version number in build.xml and outputting of - - a src jar for the current build - Patch submitted by Brad Clarke + a src jar for the current build. Patch submitted by Brad Clarke </action> <action type="update" dev="mbowler" id="803229" due-to="Brad Clarke"> Added HtmlFileInput support. Patch submitted by Brad Clarke @@ -30,13 +28,16 @@ </action> <action type="update" dev="mbowler" id="802285"> Fixed bug where HtmlPage.asText() would blow up if form tags were - found between tr and td tags. Clearly this is illegal html but the browsers support it so HtmlUnit needs to as well. </action> <action type="update" dev="mbowler" id="805332" due-to="Brad Clarke"> Fixed bug where form elements without names were being submitted anyway. Patch supplied by Brad Clarke + </action> + <action type="update" dev="mbowler" id="808776" due-to="Brad Clarke"> + Fixed bug where disabled elements were being submitted anyway. + Patch supplied by Brad Clarke </action> </release> Index: HtmlFormTest.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlFormTest.java,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- HtmlFormTest.java 17 Sep 2003 18:24:39 -0000 1.7 +++ HtmlFormTest.java 18 Sep 2003 19:07:22 -0000 1.8 @@ -678,5 +678,38 @@ assertEquals( expectedParameters, collectedParameters ); } + /** + * @throws Exception if the test fails + */ + public void testSubmit_IgnoresDisabledControls() + throws Exception { + final String htmlContent + = "<html><head><title>foo</title></head><body>" + + "<form id='form1'>" + + " <input type='text' name='textfield' value='blah' disabled />" + + " <input type='submit' name='button' value='foo'/>" + + "</form></body></html>"; + final WebClient client = new WebClient(); + + final FakeWebConnection webConnection = new FakeWebConnection( client ); + webConnection.setContent( htmlContent ); + client.setWebConnection( webConnection ); + + final HtmlPage page = ( HtmlPage )client.getPage( + new URL( "http://first" ), + SubmitMethod.POST, Collections.EMPTY_LIST ); + final HtmlForm form = ( HtmlForm )page.getHtmlElementById( "form1" ); + + final HtmlSubmitInput button = (HtmlSubmitInput)form.getInputByName("button"); + button.click(); + + final List expectedParameters = Arrays.asList( new Object[]{ + new KeyValuePair("button", "foo") + } ); + final List collectedParameters = webConnection.getLastParameters(); + + assertEquals( expectedParameters, collectedParameters ); + } + } |
From: SourceForge.net <no...@so...> - 2003-09-18 19:07:29
|
Bugs item #808776, was opened at 2003-09-18 14:26 Message generated for change (Comment added) made by mbowler You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=808776&group_id=47038 Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Brad Clarke (yourgod) >Assigned to: Mike Bowler (mbowler) Summary: Disabled controls should not be submitted Initial Comment: Reference: http://www.w3.org/TR/html401/interact/forms.html#disabled "Disabled controls cannot be successful." It looks like this was the intention but it was checking the form instead of the control and forms cannot be disabled. The patch just changes it to look at the control and adds a test for this. ---------------------------------------------------------------------- >Comment By: Mike Bowler (mbowler) Date: 2003-09-18 15:07 Message: Logged In: YES user_id=46756 Patch applied - thanks. Please change your editor settings to not put tabs in the source. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=808776&group_id=47038 |
From: <no...@us...> - 2003-09-18 18:57:01
|
Log Message: ----------- Renamed variables to avoid conflicts with protected variables in the superclass. Modified Files: -------------- /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/protocol/about: AboutURLConnection.java /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit: WebWindowEvent.java /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/protocol/javascript: JavaScriptURLConnection.java /cvsroot/htmlunit/htmlunit/src/test/java/com/gargoylesoftware/htmlunit: WebClientTest.java Revision Data ------------- Index: AboutURLConnection.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/protocol/about/AboutURLConnection.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- AboutURLConnection.java 18 Sep 2003 13:09:11 -0000 1.3 +++ AboutURLConnection.java 18 Sep 2003 18:56:57 -0000 1.4 @@ -48,15 +48,13 @@ * @version $Revision$ */ public class AboutURLConnection extends URLConnection { -// private final String content_; /** * Create an instance - * @param url The "about:" url. + * @param newUrl The "about:" url. */ - public AboutURLConnection(final URL url) { - super(url); -// content_ = url.toExternalForm().substring("about:".length()); + public AboutURLConnection(final URL newUrl) { + super(newUrl); } /** * @see java.net.URLConnection#connect() Index: WebWindowEvent.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/WebWindowEvent.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- WebWindowEvent.java 17 Sep 2003 18:24:39 -0000 1.6 +++ WebWindowEvent.java 18 Sep 2003 18:56:57 -0000 1.7 @@ -53,12 +53,12 @@ /** * Create an instance * - * @param source The WebWindow that caused the event + * @param webWindow The WebWindow that caused the event * @param oldPage The old contents of the web window * @param newPage The new contents of the web window */ - public WebWindowEvent( final WebWindow source, final Page oldPage, final Page newPage ) { - super(source); + public WebWindowEvent( final WebWindow webWindow, final Page oldPage, final Page newPage ) { + super(webWindow); oldPage_ = oldPage; newPage_ = newPage; } Index: JavaScriptURLConnection.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/protocol/javascript/JavaScriptURLConnection.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- JavaScriptURLConnection.java 10 Jun 2003 11:57:00 -0000 1.5 +++ JavaScriptURLConnection.java 18 Sep 2003 18:56:57 -0000 1.6 @@ -55,12 +55,12 @@ /** * Create an instance - * @param url The javascript url. + * @param newUrl The javascript url. */ - public JavaScriptURLConnection( final URL url ) { - super(url); + public JavaScriptURLConnection( final URL newUrl ) { + super(newUrl); - content_ = url.toExternalForm().substring("javascript:".length()); + content_ = newUrl.toExternalForm().substring("javascript:".length()); } Index: WebClientTest.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/WebClientTest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- WebClientTest.java 17 Sep 2003 18:24:38 -0000 1.5 +++ WebClientTest.java 18 Sep 2003 18:56:57 -0000 1.6 @@ -420,35 +420,6 @@ new URL("http://page1"), page1Content, 200, "OK", "text/html", Collections.EMPTY_LIST ); client.setWebConnection( webConnection ); - /** A PageCreator that collects data */ - class CollectingPageCreator implements PageCreator { - private final List list; - /** - * Create an instance - * @param list The list that will contain the data - */ - public CollectingPageCreator( final List list ) { - this.list = list; - } - /** - * Create a page - * @param webClient The web client - * @param webResponse The web response - * @param webWindow The web window - * @return The new page - * @throws IOException If an IO problem occurs - */ - public Page createPage( - final WebClient webClient, - final WebResponse webResponse, - final WebWindow webWindow ) - throws IOException { - - final Page page = new TextPage(webResponse, webWindow); - list.add(page); - return page; - } - } final List collectedPageCreationItems = new ArrayList(); client.setPageCreator( new CollectingPageCreator(collectedPageCreationItems) ); @@ -463,6 +434,36 @@ assertEquals( expectedPageCreationItems, collectedPageCreationItems ); } + + /** A PageCreator that collects data */ + private class CollectingPageCreator implements PageCreator { + private final List collectedPages_; + /** + * Create an instance + * @param list The list that will contain the data + */ + public CollectingPageCreator( final List list ) { + this.collectedPages_ = list; + } + /** + * Create a page + * @param webClient The web client + * @param webResponse The web response + * @param webWindow The web window + * @return The new page + * @throws IOException If an IO problem occurs + */ + public Page createPage( + final WebClient webClient, + final WebResponse webResponse, + final WebWindow webWindow ) + throws IOException { + + final Page page = new TextPage(webResponse, webWindow); + collectedPages_.add(page); + return page; + } + } /** * Test loading a page with POST parameters. |
From: SourceForge.net <no...@so...> - 2003-09-18 18:26:15
|
Bugs item #808776, was opened at 2003-09-18 13:26 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=808776&group_id=47038 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Brad Clarke (yourgod) Assigned to: Nobody/Anonymous (nobody) Summary: Disabled controls should not be submitted Initial Comment: Reference: http://www.w3.org/TR/html401/interact/forms.html#disabled "Disabled controls cannot be successful." It looks like this was the intention but it was checking the form instead of the control and forms cannot be disabled. The patch just changes it to look at the control and adds a test for this. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=808776&group_id=47038 |
From: <no...@us...> - 2003-09-18 14:43:36
|
Log Message: ----------- Added ".checkstyle" to account for the eclipse checkstyle plugin's configuration file Modified Files: -------------- /cvsroot/htmlunit/htmlunit: .cvsignore Revision Data ------------- Index: .cvsignore =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/.cvsignore,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- .cvsignore 3 Sep 2003 12:54:33 -0000 1.4 +++ .cvsignore 18 Sep 2003 14:43:35 -0000 1.5 @@ -4,4 +4,5 @@ target build.properties .classpath -.project \ No newline at end of file +.project +.checkstyle |
From: <no...@us...> - 2003-09-18 14:42:59
|
Log Message: ----------- Adjusted checkstyle configuration to match the style in use Modified Files: -------------- /cvsroot/htmlunit/htmlunit: checkstyle.xml Revision Data ------------- Index: checkstyle.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/checkstyle.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- checkstyle.xml 18 Sep 2003 13:09:11 -0000 1.3 +++ checkstyle.xml 18 Sep 2003 14:42:57 -0000 1.4 @@ -58,13 +58,17 @@ <!-- Checks for Javadoc comments. --> <!-- See http://checkstyle.sf.net/config_javadoc.html --> - <module name="JavadocMethod"/> + <module name="JavadocMethod"> + <property name="scope" value="protected"/> + </module> <module name="JavadocType"> <property name="scope" value="protected"/> <property name="authorFormat" value="\S"/> <property name="versionFormat" value="\$Revision.*\$"/> </module> - <module name="JavadocVariable"/> + <module name="JavadocVariable"> + <property name="scope" value="protected"/> + </module> <!-- Checks for Naming Conventions. --> <!-- See http://checkstyle.sf.net/config_naming.html --> @@ -75,7 +79,9 @@ </module> <module name="PackageName"/> <module name="ParameterName"/> - <module name="StaticVariableName"/> + <module name="StaticVariableName"> + <property name="format" value="^[A-Z][a-zA-Z0-9_]+_$"/> + </module> <module name="TypeName"/> <module name="MemberName"> <property name="format" value="^[a-z][a-zA-Z0-9_]+_$"/> @@ -154,7 +160,7 @@ <property name="format" value="\s+$"/> <property name="message" value="Line has trailing spaces."/> </module> - <module name="TodoComment"/> + <!--<module name="TodoComment"/>--> <module name="UpperEll"/> </module> |
From: <no...@us...> - 2003-09-18 13:09:18
|
Log Message: ----------- Fixed misc warnings identified by checkstyle Modified Files: -------------- /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/protocol/about: AboutURLConnection.java /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/javascript: WindowFramesArray.java JavaScriptEngine.java /cvsroot/htmlunit/htmlunit: checkstyle.xml /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit: FormEncodingType.java SubmitMethod.java ScriptFilter.java Assert.java Revision Data ------------- Index: AboutURLConnection.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/protocol/about/AboutURLConnection.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- AboutURLConnection.java 17 Sep 2003 18:24:39 -0000 1.2 +++ AboutURLConnection.java 18 Sep 2003 13:09:11 -0000 1.3 @@ -45,7 +45,7 @@ * A URLConnection for supporting "about:" urls * * @author <a href="mailto:che...@us...">Chen Jun</a> - * @version 1.0, 2003-8-24 + * @version $Revision$ */ public class AboutURLConnection extends URLConnection { // private final String content_; Index: WindowFramesArray.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/javascript/WindowFramesArray.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- WindowFramesArray.java 17 Sep 2003 18:24:38 -0000 1.2 +++ WindowFramesArray.java 18 Sep 2003 13:09:11 -0000 1.3 @@ -49,7 +49,7 @@ * An array returned by frames property of Window * * @author <a href="mailto:che...@us...>Chen Jun</a> - * @version 1.0, 2003-8-23 + * @version $Revision$ */ public class WindowFramesArray extends SimpleScriptable { private HtmlPage htmlPage_; Index: JavaScriptEngine.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine.java,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- JavaScriptEngine.java 17 Sep 2003 18:24:38 -0000 1.21 +++ JavaScriptEngine.java 18 Sep 2003 13:09:11 -0000 1.22 @@ -173,7 +173,7 @@ /** * Determine the scope for the page and element. - * @param htmlPage The page + * @param pageInfo The page info * @param htmlElementScope The element that will be used as context or null if * the page should be used as context. * @return The JavaScript execution scope. Index: checkstyle.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/checkstyle.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- checkstyle.xml 17 Sep 2003 13:38:30 -0000 1.2 +++ checkstyle.xml 18 Sep 2003 13:09:11 -0000 1.3 @@ -113,7 +113,9 @@ <!-- Checks for blocks. You know, those {}'s --> <!-- See http://checkstyle.sf.net/config_blocks.html --> <module name="AvoidNestedBlocks"/> - <module name="EmptyBlock"/> + <module name="EmptyBlock"> + <property name="option" value="text"/> + </module> <module name="NeedBraces"/> @@ -126,9 +128,13 @@ <module name="HiddenField"/> <module name="IllegalInstantiation"/> <module name="InnerAssignment"/> - <module name="MagicNumber"/> + <!--<module name="MagicNumber"/>--> <module name="MissingSwitchDefault"/> - <module name="RedundantThrows"/> + <module name="RedundantThrows"> + <property name="allowUnchecked" value="true"/> + <property name="allowSubclasses" value="true"/> + </module> + <!-- <module name="SimplifyBooleanExpression"/> --> <module name="SimplifyBooleanReturn"/> Index: FormEncodingType.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/FormEncodingType.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- FormEncodingType.java 9 Sep 2003 20:47:57 -0000 1.1 +++ FormEncodingType.java 18 Sep 2003 13:09:11 -0000 1.2 @@ -47,7 +47,7 @@ * @version $Revision$ * @author Brad Clarke */ -public class FormEncodingType { +public final class FormEncodingType { /** * URL_ENCODED Index: SubmitMethod.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/SubmitMethod.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- SubmitMethod.java 10 Jun 2003 11:56:56 -0000 1.4 +++ SubmitMethod.java 18 Sep 2003 13:09:11 -0000 1.5 @@ -44,7 +44,7 @@ * @version $Revision$ * @author <a href="mailto:mb...@Ga...">Mike Bowler</a> */ -public class SubmitMethod { +public final class SubmitMethod { /** * POST */ Index: ScriptFilter.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/ScriptFilter.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- ScriptFilter.java 11 Aug 2003 15:24:56 -0000 1.18 +++ ScriptFilter.java 18 Sep 2003 13:09:11 -0000 1.19 @@ -101,7 +101,12 @@ scriptSource_ = null; scriptCharset_ = null; scriptBuffer_ = null; - systemId_ = locator != null ? locator.getLiteralSystemId() : null; + if( locator == null ) { + systemId_ = null; + } + else { + systemId_ = locator.getLiteralSystemId(); + } super.startDocument( locator, encoding, augmentations ); } Index: Assert.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/Assert.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Assert.java 10 Jun 2003 11:56:55 -0000 1.4 +++ Assert.java 18 Sep 2003 13:09:11 -0000 1.5 @@ -44,6 +44,11 @@ * @author <a href="mailto:mb...@Ga...">Mike Bowler</a> */ public final class Assert { + + /** Private to prevent instantiation */ + private Assert() { + } + /** * Assert that the specified parameter is not null. Throw a NullPointerException * if a null is found. |
From: Mike B. <mb...@Ga...> - 2003-09-17 19:29:52
|
Tony Pei wrote: > I download htmlUnit 1.2.3 and followed "Getting Started with HtmlUnit" > I tested following code. I got a compile error. couldn't find the method > assertEquals( "Welcome to HtmlUnit", page.getTitleText()); > My question is which class has the method assertEquals? > and which jar contains this class? assertEquals() is part of junit so it would be in junit.jar. > Where can I get the class com.gargoylesoftware.base.testing.BaseTestCase ? http://gsbase.sourceforge.net -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Tony P. <tp...@at...> - 2003-09-17 18:23:41
|
I download htmlUnit 1.2.3 and followed "Getting Started with HtmlUnit" I tested following code. I got a compile error. couldn't find the method assertEquals( "Welcome to HtmlUnit", page.getTitleText()); My question is which class has the method assertEquals? and which jar contains this class? import com.gargoylesoftware.htmlunit.WebClient; import com.gargoylesoftware.htmlunit.html.HtmlPage; import java.net.URL; import java.io.IOException; public void testHomePage() throws Exception { final WebClient webClient =3D new WebClient(); final URL url =3D new URL("http://htmlunit.sourceforge.net"); final HtmlPage page =3D (HtmlPage)webClient.getPage(url); assertEquals( "Welcome to HtmlUnit", page.getTitleText()); } I also looked at the WebClientTest.java and WebTestCase.java inside = directory src/test/java/com/gargoylesoftware/htmlunit There is a import com.gargoylesoftware.base.testing.BaseTestCase; in = WebTestCase.java=20 I beleved that method assertEquals is in = com.gargoylesoftware.base.testing.BaseTestCase. Where can I get the class com.gargoylesoftware.base.testing.BaseTestCase = ? Thanks Tony Pei |
From: <no...@us...> - 2003-09-17 13:39:06
|
Log Message: ----------- Converted tabs to spaces in all xml files. Removed trailing spaces Modified Files: -------------- /cvsroot/htmlunit/htmlunit: maven.xml project.xml build.xml checkstyle.xml /cvsroot/htmlunit/htmlunit/src/xdocs: gettingStarted.xml todo.xml navigation.xml changes.xml index.xml buildingFromCvs.xml jsse.xml table-howto.xml window-howto.xml codingConventions.xml /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/javascript: JavaScriptConfiguration.xml Revision Data ------------- Index: gettingStarted.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/xdocs/gettingStarted.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- gettingStarted.xml 5 May 2003 23:01:45 -0000 1.4 +++ gettingStarted.xml 17 Sep 2003 13:38:30 -0000 1.5 @@ -34,7 +34,6 @@ ]]></source> </section> - <section name="Imitating a specific browser"> <p> Often you will want to simulate a specific browser. This is done by passing a @@ -57,7 +56,6 @@ </p> </section> - <section name="Using a proxy server"> <p> The last WebClient constructor allows you to specify proxy server information in those cases @@ -77,7 +75,6 @@ specific javascript behaviour still needs a lot of work. </p> </section> - <section name="Submitting a form"> <p> Index: todo.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/xdocs/todo.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- todo.xml 23 Jun 2003 14:27:34 -0000 1.8 +++ todo.xml 17 Sep 2003 13:38:31 -0000 1.9 @@ -17,7 +17,6 @@ </p> </section> - <section name="Code todo's"> <ol> <li>implement Document.write()</li> @@ -26,7 +25,6 @@ <li>Use HtmlUnit to verify all links in generated documentation</li> </ol> </section> - <section name="Documentation todo's"> <ol> Index: navigation.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/xdocs/navigation.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- navigation.xml 24 Jul 2003 12:38:55 -0000 1.7 +++ navigation.xml 17 Sep 2003 13:38:31 -0000 1.8 @@ -9,8 +9,8 @@ </properties> <body> - <search/> - + <search/> + <menu name="SourceForge.net"> <item name="SourceForge project page" @@ -36,16 +36,16 @@ <item name="JavaScript engine" href="/javascript.html"/> <item name="TODO" href="/todo.html"/> </menu> - - <footer> - <div style="text-align: right"> - Project hosting by:<br /> - <a href="http://sourceforge.net/projects/htmlunit"> - <img src="http://sourceforge.net/sflogo.php?group_id=47038&type=2" alt="Sourceforge Logo" border="0" /> - </a> - </div> - </footer> + + <footer> + <div style="text-align: right"> + Project hosting by:<br /> + <a href="http://sourceforge.net/projects/htmlunit"> + <img src="http://sourceforge.net/sflogo.php?group_id=47038&type=2" alt="Sourceforge Logo" border="0" /> + </a> + </div> + </footer> + </body> </project> - Index: changes.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/xdocs/changes.xml,v retrieving revision 1.129 retrieving revision 1.130 diff -u -d -r1.129 -r1.130 --- changes.xml 15 Sep 2003 00:31:54 -0000 1.129 +++ changes.xml 17 Sep 2003 13:38:31 -0000 1.130 @@ -17,20 +17,22 @@ Added support for window frames - patch from Jun Chen </action> <action type="update" dev="mbowler" id="803233" due-to="Brad Clarke"> - an update of the version number in build.xml and outputting of - a src jar for the current build - Patch submitted by Brad Clarke + an update of the version number in build.xml and outputting of + + a src jar for the current build + Patch submitted by Brad Clarke </action> <action type="update" dev="mbowler" id="803229" due-to="Brad Clarke"> - Added HtmlFileInput support. Patch submitted by Brad Clarke + Added HtmlFileInput support. Patch submitted by Brad Clarke </action> <action type="update" dev="mbowler" id="803237" due-to="Brad Clarke"> - Upgraded junit.jar to 3.8.1 + Upgraded junit.jar to 3.8.1 </action> <action type="update" dev="mbowler" id="802285"> - Fixed bug where HtmlPage.asText() would blow up if form tags were - found between tr and td tags. Clearly this is illegal html but - the browsers support it so HtmlUnit needs to as well. + Fixed bug where HtmlPage.asText() would blow up if form tags were + + found between tr and td tags. Clearly this is illegal html but + the browsers support it so HtmlUnit needs to as well. </action> <action type="update" dev="mbowler" id="805332" due-to="Brad Clarke"> Fixed bug where form elements without names were being submitted anyway. Patch @@ -38,7 +40,6 @@ </action> </release> - <release version="1.2.3" date="July 31, 2003"> <action type="add" dev="mbowler"> Initial support for Maven @@ -143,54 +144,54 @@ Input.onclick. </action> <action type="update" dev="mbowler" due-to="Barnaby Court"> - Moved all logic from the HtmlInput subclasses up into HtmlInput itself. - Patch provided by Barnaby Court. + Moved all logic from the HtmlInput subclasses up into HtmlInput itself. + Patch provided by Barnaby Court. </action> <action type="update" dev="mbowler" due-to="Barnaby Court"> - Added instructions for the "how to compile from cvs" document. - Patch provided by Barnaby Court. + Added instructions for the "how to compile from cvs" document. + Patch provided by Barnaby Court. </action> <action type="update" dev="mbowler" due-to="Barnaby Court" id="759217"> - Changed HtmlTextArea.setText() to actually modify the DOM - Patch provided by Barnaby Court. + Changed HtmlTextArea.setText() to actually modify the DOM + Patch provided by Barnaby Court. </action> <action type="update" dev="mbowler" id="738548"> - Fix for bug 738548 - "Form values are not Posted Properly to Server" + Fix for bug 738548 - "Form values are not Posted Properly to Server" </action> <action type="add" dev="mbowler"> - Added support for the property Window.name + Added support for the property Window.name </action> <action type="add" dev="mbowler"> - Added read-only support for Document.cookie. + Added read-only support for Document.cookie. </action> <action type="add" dev="mbowler" id="675597"> - Added support for the javascript method Window.setTimeout() + Added support for the javascript method Window.setTimeout() </action> <action type="update" dev="mbowler"> - Upgraded the rhino engine to 1.5R4.1 + Upgraded the rhino engine to 1.5R4.1 </action> <action type="update" dev="mbowler"> - Upgraded the xerces to 2.4 + Upgraded the xerces to 2.4 </action> <action type="add" dev="mbowler" id="742515"> - New method HtmlPage.getAllForms() + New method HtmlPage.getAllForms() </action> <action type="update" dev="mbowler"> - Fixed bug where inputs would not submit properly if the type attribute - wasn't lowercase. + Fixed bug where inputs would not submit properly if the type attribute + wasn't lowercase. </action> <action type="update" dev="mbowler" id="744381"> - Changed behaviour of HtmlImageInput submission to be consistent with - what the browsers do. If the input's name was foo we would previously - send the following values to the server: foo, foo.x and foo.y. The browsers - only send foo.x and foo.y. + Changed behaviour of HtmlImageInput submission to be consistent with + + what the browsers do. If the input's name was foo we would previously + send the following values to the server: foo, foo.x and foo.y. The browsers + only send foo.x and foo.y. </action> <action type="add" dev="mbowler"> - Added docs on configuring JSSE - contributed by Tom Hamilton + Added docs on configuring JSSE - contributed by Tom Hamilton </action> </release> - </body> - + </body> <body> <release version="1.2.2" date="March 29, 2003"> @@ -240,7 +241,6 @@ </action> </release> - <release version="1.2.1" date="March 20, 2003"> <action type="add" dev="mbowler"> Added method <javadoc>com.gargoylesoftware.htmlunit.html.HtmlButtonInput#click()</javadoc> @@ -262,7 +262,6 @@ </action> </release> - <release version="1.2" date="March 10, 2003"> <action type="update" dev="mbowler"> Fixed bug where redirection didn't happen correctly if the location header contained @@ -360,7 +359,6 @@ </action> </release> - <release version="1.1" date="November 25, 2002"> <action type="update" dev="mbowler"> Fixed bug where loading of external javascript files would not follow redirects. @@ -380,7 +378,6 @@ </action> </release> - <release version="1.1-rc2" date="November 16, 2002"> <action type="update" dev="mbowler"> Fixed bug where calling WebClient.open() would open a new top level window every time. @@ -412,7 +409,6 @@ </action> </release> - <release version="1.1-rc1" date="October 29, 2002"> <action type="update" dev="mbowler"> Upgraded commons-logging.jar to 1.0.2 @@ -508,7 +504,6 @@ </action> </release> - <release version="1.1-pre5" date="September 24, 2002"> <action type="update" dev="mbowler"> Changed html parser from @@ -597,7 +592,6 @@ </action> </release> - <release version="1.1-pre4" date="August 23, 2002"> <action type="update" dev="mbowler"> Changed the <a href="license.html">license</a> used by HtmlUnit to an apache style one @@ -737,7 +731,6 @@ </action> </release> - <release version="1.1-pre3" date="July 23, 2002"> <action type="add" dev="mbowler"> Added HtmlElement.getParent() @@ -793,7 +786,6 @@ </action> </release> - <release version="1.1-pre2" date="July 10, 2002"> <action type="update" dev="mbowler"> Fixed NullPointerException due to a bug in JTidy - thanks to @@ -861,7 +853,6 @@ </action> </release> - <release version="1.1-pre1" date="July 2, 2002"> <action type="add" dev="mbowler"> Added initial javascript support @@ -870,7 +861,6 @@ Lots of bug fixes </action> </release> - <release version="1.0" date="May 22, 2002"> <action type="add" dev="mbowler"> Index: index.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/xdocs/index.xml,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- index.xml 31 Jul 2003 23:18:17 -0000 1.29 +++ index.xml 17 Sep 2003 13:38:31 -0000 1.30 @@ -31,10 +31,10 @@ "<a href="gettingStarted.html">Getting Started with HtmlUnit</a>" for an introduction. </p> <p> - NOTE: This documentation is for the current code in CVS and may not accurately - reflect the version of HtmlUnit that you have downloaded. Refer to the - documentation that came with your download for the most correct information - </p> + NOTE: This documentation is for the current code in CVS and may not accurately + reflect the version of HtmlUnit that you have downloaded. Refer to the + documentation that came with your download for the most correct information + </p> </section> <section name="Where to find..."> @@ -102,7 +102,6 @@ </ul> </p> </section> - <section name="Features"> <p> Index: buildingFromCvs.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/xdocs/buildingFromCvs.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- buildingFromCvs.xml 20 Jun 2003 17:38:37 -0000 1.6 +++ buildingFromCvs.xml 17 Sep 2003 13:38:31 -0000 1.7 @@ -17,7 +17,6 @@ </p> </section> - <section name="Checking out"> <p> Create a directory for HtmlUnit (ie c:\htmlunit or ~/htmlunit). Change to that directory and execute the @@ -34,7 +33,6 @@ </warning> </section> - <section name="Compiling the code"> <p> Make sure that you have <a href="http://jakarta.apache.org/ant">Ant</a> 1.5 installed. @@ -51,7 +49,6 @@ </p> </section> - <section name="Running the tests"> <p> All the tests are based on <a href="http://www.junit.org/">JUnit</a>. JUnit is already provided @@ -70,7 +67,6 @@ the javascript engine and the logging framework don't like to be reloaded. </p> </section> - <section name="Packaging the code"> <source>ant build</source> Index: jsse.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/xdocs/jsse.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- jsse.xml 24 Jul 2003 12:38:55 -0000 1.1 +++ jsse.xml 17 Sep 2003 13:38:32 -0000 1.2 @@ -11,117 +11,119 @@ <body> <section name="Configuring JSSE"> <p> - The following instructions were initially provided by Tom Hamilton in response - to a question on the htmlunit-develop mailing list. - </p> - <ol> - <li> - Make sure that you have <a href="http://java.sun.com/products/jsse">jsse</a>! - </li> - <li> - Make sure that you pass in the following param to the jvm - <source><![CDATA[<jvmarg value="-Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol"/>]]></source> - </li> - <li> - Change your java.security file to include the following (it's the - security.provider.3 line!) - <source> + The following instructions were initially provided by Tom Hamilton in response + to a question on the htmlunit-develop mailing list. + </p> + <ol> + <li> + Make sure that you have <a href="http://java.sun.com/products/jsse">jsse</a>! + </li> + <li> + Make sure that you pass in the following param to the jvm + <source><![CDATA[<jvmarg value="-Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol"/>]]></source> + </li> + <li> + Change your java.security file to include the following (it's the + security.provider.3 line!) + <source> # # List of providers and their preference orders (see above): # security.provider.1=sun.security.provider.Sun security.provider.2=com.sun.rsajca.Provider security.provider.3=com.sun.net.ssl.internal.ssl.Provider - </source> - </li> - <li> - Make sure your class path includes the right jars - in the right order! - Here is a cut from my ant script that I use to run all of my tests, seeing - as I had it written down... - Some things to note about this class path, I'm using cactus, WebLogic, - struts, log4j and Xalan. You may not need all of these, but the key part is - the html unit bits and their integration with jsse. Note that all of these - come first. - <source><![CDATA[ + </source> + </li> + <li> + Make sure your class path includes the right jars - in the right order! + Here is a cut from my ant script that I use to run all of my tests, seeing + as I had it written down... + Some things to note about this class path, I'm using cactus, WebLogic, + struts, log4j and Xalan. You may not need all of these, but the key part is + the html unit bits and their integration with jsse. Note that all of these + come first. + <source><![CDATA[ <path id="test.classpath"> - <!-- note - the order of the classpath is important for the html unit stuff to work --> - <!-- the html unit classes --> - <pathelement path="C:\HtmlUnit-1.2.2\lib\commons-httpclient.jar"/> - <pathelement path="C:\HtmlUnit-1.2.2\lib\commons-logging.jar"/> - <pathelement path="C:\HtmlUnit-1.2.2\lib\HtmlUnit.jar"/> + <!-- note - the order of the classpath is important for the html unit stuff to work --> + <!-- the html unit classes --> + <pathelement path="C:\HtmlUnit-1.2.2\lib\commons-httpclient.jar"/> + <pathelement path="C:\HtmlUnit-1.2.2\lib\commons-logging.jar"/> + <pathelement path="C:\HtmlUnit-1.2.2\lib\HtmlUnit.jar"/> - <!-- jsse libs --> - <pathelement path="C:\jsse1.0.3_02\lib\jcert.jar"/> - <pathelement path="C:\jsse1.0.3_02\lib\jnet.jar"/> - <pathelement path="C:\HtmlUnit-1.2.2\lib\js.jar"/> - <pathelement path="C:\jsse1.0.3_02\lib\jsse.jar"/> + <!-- jsse libs --> + <pathelement path="C:\jsse1.0.3_02\lib\jcert.jar"/> + <pathelement path="C:\jsse1.0.3_02\lib\jnet.jar"/> + <pathelement path="C:\HtmlUnit-1.2.2\lib\js.jar"/> + <pathelement path="C:\jsse1.0.3_02\lib\jsse.jar"/> - <!-- some more html unit libs --> - <pathelement path="C:\HtmlUnit-1.2.2\lib\nekohtml.jar"/> - <pathelement path="C:\HtmlUnit-1.2.2\lib\xercesImpl.jar"/> - <pathelement path="C:\HtmlUnit-1.2.2\lib\xmlParserAPIs.jar"/> + <!-- some more html unit libs --> + <pathelement path="C:\HtmlUnit-1.2.2\lib\nekohtml.jar"/> + <pathelement path="C:\HtmlUnit-1.2.2\lib\xercesImpl.jar"/> + <pathelement path="C:\HtmlUnit-1.2.2\lib\xmlParserAPIs.jar"/> - <!-- jdbc classes for oracle --> - <pathelement path="C:\oracle\ora81\jdbc\lib\classes12.zip"/> - <pathelement path="C:\oracle\ora81\jdbc\lib\nls_charset12.zip"/> - <pathelement path="C:\oracle\ora81\orb\classes\yoj.jar"/> + <!-- jdbc classes for oracle --> + <pathelement path="C:\oracle\ora81\jdbc\lib\classes12.zip"/> + <pathelement path="C:\oracle\ora81\jdbc\lib\nls_charset12.zip"/> + <pathelement path="C:\oracle\ora81\orb\classes\yoj.jar"/> - <!-- the test classes are all in here --> - <pathelement location="c:\projects\nbkrel3/webifServices/.antbuild/classes/war/"/> + <!-- the test classes are all in here --> + <pathelement location="c:\projects\nbkrel3/webifServices/.antbuild/classes/war/"/> - <!-- the cactus libs --> - <pathelement path="C:\jakarta-cactus-13-1.4\lib\cactus-1.4.jar"/> - <pathelement path="C:\jakarta-cactus-13-1.4\lib\aspectjrt-1.0.5.jar"/> - <pathelement path="C:\jakarta-cactus-13-1.4\lib\commons-logging-1.0.jar"/> - <pathelement path="C:\jakarta-cactus-13-1.4\lib\junit-3.7.jar"/> - <pathelement path="C:\jakarta-cactus-13-1.4\lib\httpunit-1.4.1.jar"/> - <pathelement path="C:\jakarta-cactus-13-1.4\lib\commons-httpclient-2.0alpha1-20020606.jar"/> + <!-- the cactus libs --> + <pathelement path="C:\jakarta-cactus-13-1.4\lib\cactus-1.4.jar"/> + <pathelement path="C:\jakarta-cactus-13-1.4\lib\aspectjrt-1.0.5.jar"/> + <pathelement path="C:\jakarta-cactus-13-1.4\lib\commons-logging-1.0.jar"/> + <pathelement path="C:\jakarta-cactus-13-1.4\lib\junit-3.7.jar"/> + <pathelement path="C:\jakarta-cactus-13-1.4\lib\httpunit-1.4.1.jar"/> + <pathelement path="C:\jakarta-cactus-13-1.4\lib\commons-httpclient-2.0alpha1-20020606.jar"/> - <!-- log4j --> - <pathelement path="${project.root.dir}/dependencies/lib/log4j.jar"/> + <!-- log4j --> + <pathelement path="${project.root.dir}/dependencies/lib/log4j.jar"/> - <!-- struts --> - <pathelement path="${project.root.dir}/dependencies/lib/jakarta-oro-2.0.6.jar"/> - <pathelement path="${project.root.dir}/dependencies/lib/struts.jar"/> + <!-- struts --> + <pathelement path="${project.root.dir}/dependencies/lib/jakarta-oro-2.0.6.jar"/> + <pathelement path="${project.root.dir}/dependencies/lib/struts.jar"/> - <!-- junit classes --> - <pathelement path="${project.root.dir}/dependencies/lib/junit.jar"/> - <pathelement path="${project.root.dir}/dependencies/lib/junitx.jar"/> + <!-- junit classes --> + <pathelement path="${project.root.dir}/dependencies/lib/junit.jar"/> + <pathelement path="${project.root.dir}/dependencies/lib/junitx.jar"/> - <!-- math routines --> - <pathelement path="${project.root.dir}/dependencies/lib/IBMMath.jar"/> + <!-- math routines --> + <pathelement path="${project.root.dir}/dependencies/lib/IBMMath.jar"/> - <!-- jce --> - <pathelement path="${project.root.dir}/dependencies/lib/jce1_2-do.jar"/> + <!-- jce --> + <pathelement path="${project.root.dir}/dependencies/lib/jce1_2-do.jar"/> - <!-- weblogic classes --> - <pathelement path="${weblogic.dir}/lib/weblogic_sp.jar"/> - <pathelement path="${weblogic.dir}/lib/weblogic.jar"/> + <!-- weblogic classes --> + <pathelement path="${weblogic.dir}/lib/weblogic_sp.jar"/> + <pathelement path="${weblogic.dir}/lib/weblogic.jar"/> - <!-- xml classes --> - <pathelement path="${xalan.dir}/bin/xml-apis.jar"/> - <pathelement path="${xalan.dir}/bin/xercesImpl.jar"/> - <pathelement path="${xalan.dir}/bin/xalan.jar"/> + <!-- xml classes --> + <pathelement path="${xalan.dir}/bin/xml-apis.jar"/> + <pathelement path="${xalan.dir}/bin/xercesImpl.jar"/> + <pathelement path="${xalan.dir}/bin/xalan.jar"/> - <!-- jakarta commons lib --> - <pathelement path="${weblogic.dir}/lib/commons-collections.jar"/> - ]]></source> - The xalan stuff is in here so that the xslt transalation works when I do the - junitreports - </li> - <li> - Finally you will need to import the certificate into your jssecacerts - file - this is simple enough, just lookup how to do it on javasoft.com - </li> - <li> - Finally finally pass in the param - <source><![CDATA[<jvmarg value="-Djavax.net.debug=all"/>]]></source> - to check what is going wrong - 'cos it's bound to! - Once it's working turn the flag to - <source><![CDATA[<jvmarg value="-Djavax.net.debugx=all"/>]]></source> - Then it all works, no debug comes out, and you don't forget what the flag is - for next time! - </li> + <!-- jakarta commons lib --> + <pathelement path="${weblogic.dir}/lib/commons-collections.jar"/> + ]]></source> + The xalan stuff is in here so that the xslt transalation works when I do the + junitreports + </li> + <li> + Finally you will need to import the certificate into your jssecacerts + file - this is simple enough, just lookup how to do it on javasoft.com + </li> + <li> + Finally finally pass in the param + + <source><![CDATA[<jvmarg value="-Djavax.net.debug=all"/>]]></source> + to check what is going wrong - 'cos it's bound to! + Once it's working turn the flag to + + <source><![CDATA[<jvmarg value="-Djavax.net.debugx=all"/>]]></source> + Then it all works, no debug comes out, and you don't forget what the flag is + for next time! + </li> </ol> </section> </body> Index: table-howto.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/xdocs/table-howto.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- table-howto.xml 11 Apr 2003 19:29:18 -0000 1.3 +++ table-howto.xml 17 Sep 2003 13:38:32 -0000 1.4 @@ -60,7 +60,6 @@ </p> </section> - <section name="More complex table"> <p> The next examples will use a more complicated table that includes table header, footer and body Index: window-howto.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/xdocs/window-howto.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- window-howto.xml 19 Jul 2003 19:25:47 -0000 1.8 +++ window-howto.xml 17 Sep 2003 13:38:32 -0000 1.9 @@ -27,7 +27,6 @@ </p> </section> - <section name="WebWindowEvents"> <p> If you wish to be notified when windows are created or pages are loaded, you need to register a Index: codingConventions.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/xdocs/codingConventions.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- codingConventions.xml 7 May 2003 10:38:53 -0000 1.4 +++ codingConventions.xml 17 Sep 2003 13:38:32 -0000 1.5 @@ -28,7 +28,6 @@ </p> </section> - <section name="Unit tests"> <p> All code must have 100% automated test coverage using the <a href="http://www.junit.org">JUnit</a> @@ -42,7 +41,6 @@ </p> </section> - <section name="Abbreviations"> <p> Abbreviations obscure meaning and therefore they are not to be used in variable/method names. @@ -89,7 +87,6 @@ </p> </section> - <section name="The final keyword"> <p> The final keyword should be used wherever possible. It provides information to the @@ -121,7 +118,6 @@ </p> </section> - <section name="Import statements"> <p> Use fully qualified import statements not wildcards. In other words, use @@ -143,11 +139,11 @@ <p> A common complaint about this convention is "how will I know if an import isn't needed anymore?". The answer is, use a tool that warns you about this. Eclipse and IDEA can - be configured to warn you about unused imports. If your editor doesn't perform this + be configured to warn you about unused imports. If your editor doesn't perform this + check then use the ant "checkstyle" target. </p> </section> - <section name="Indenting"> <p> Index: maven.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/maven.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- maven.xml 10 Aug 2003 19:35:03 -0000 1.5 +++ maven.xml 17 Sep 2003 13:38:29 -0000 1.6 @@ -114,7 +114,6 @@ </j:file> </goal> - <goal name="buildzip" prereqs="xdoc:init, java:jar, javadoc:generate" @@ -173,7 +172,7 @@ </ant:fileset> </ant:copy> - <!-- Build the zip --> + <!-- Build the zip --> <zip destfile="${maven.dist.bin.assembly.dir}/${maven.final.name}.zip" basedir="${maven.dist.bin.assembly.dir}/${maven.final.name}"/> Index: project.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/project.xml,v retrieving revision 1.31 retrieving revision 1.32 diff -u -d -r1.31 -r1.32 --- project.xml 10 Sep 2003 18:04:43 -0000 1.31 +++ project.xml 17 Sep 2003 13:38:29 -0000 1.32 @@ -107,8 +107,8 @@ <name>Andreas Hangler</name> </contributor> <contributer> - <name>Jun Chen</name> - </contributer> + <name>Jun Chen</name> + </contributer> </contributors> <dependencies> @@ -203,7 +203,7 @@ <htmlunit.description>Javabean support</htmlunit.description> </properties> </dependency> - + <dependency> <groupId>commons-httpclient</groupId> <artifactId>commons-httpclient</artifactId> Index: build.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/build.xml,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- build.xml 9 Sep 2003 20:22:05 -0000 1.42 +++ build.xml 17 Sep 2003 13:38:29 -0000 1.43 @@ -3,15 +3,14 @@ This is a configuration file for the ant build tool http://jakarta.apache.org/ant/index.html $Revision$ - + Authors: - Mike Bowler - David K. Taylor + Mike Bowler + David K. Taylor --> <project name="HtmlUnit" default="cleancompile" basedir="."> - <!--<property name="build.compiler" value="jikes" />--> <property name="build.compiler.pedantic" value="true"/> <property name="version" value="HtmlUnit-1.2.3" /> @@ -24,7 +23,6 @@ classname="com.puppycrawl.tools.checkstyle.CheckStyleTask" classpath="build/lib/checkstyle-all.jar" /> - <path id="base.class.path"> <pathelement path="target/classes"/> @@ -54,7 +52,6 @@ <pathelement path="/System/Library/Frameworks/JavaVM.framework/Versions/1.4.1/Classes/classes.jar"/> </path> - <path id="test.class.path"> <pathelement path="target/test-classes"/> </path> @@ -83,7 +80,6 @@ </javac> </target> - <target name="cleancompile" description="clean compile"> <delete quiet="true"> <fileset dir="target/classes" includes="**/*.class"/> @@ -92,11 +88,10 @@ <antcall target="compile"/> </target> - <target name="clean" description="clean"> - <!-- Note that we can't just delete 'target' because this would then blow - away the repository which is needed for the compile. Instead we delete - all the individual directories under target *except* for 'repository' --> + <!-- Note that we can't just delete 'target' because this would then blow + away the repository which is needed for the compile. Instead we delete + all the individual directories under target *except* for 'repository' --> <delete dir="target/classes" quiet="true"/> <delete dir="target/test-classes" quiet="true"/> @@ -105,7 +100,6 @@ <delete file="dist/${version}.zip"/> </target> - <target name="validate" description="Validate"> <xmlvalidate failonerror="yes" lenient="no" warn="yes" @@ -121,7 +115,6 @@ </xmlvalidate> </target> - <target name="build" depends="compile" description="build"> <tstamp> <format property="timestamp-now" pattern="d-MMM-yyyy hh:mma" locale="en"/> @@ -269,7 +262,6 @@ --> </target> - <target name="doclint" description="doclint"> <javadoc sourcepath="src/java" @@ -286,7 +278,6 @@ </javadoc> </target> - <target name="junit" description="junit"> <java fork="true" classname="junit.textui.TestRunner" dir="target/test-classes"> <arg value="com.gargoylesoftware.htmlunit.MainTestSuite"/> @@ -295,7 +286,6 @@ </java> </target> - <target name="junitui" description="junitui"> <java fork="yes" classname="junit.swingui.TestRunner" dir="src/java"> <arg value="com.gargoylesoftware.htmlunit.test.MainTestSuite"/> @@ -303,7 +293,6 @@ </java> </target> - <target name="SanityCheck" description="DO NOT RUN THIS TASK"> <java fork="yes" classname="com.gargoylesoftware.htmlunit.SanityCheck" dir="src/java"> <classpath refid="base.class.path"/> @@ -311,7 +300,6 @@ </java> </target> - <target name="checkstyle" description="Check all the coding conventions"> <!-- Check production code --> <!-- @@ -325,7 +313,6 @@ </checkstyle> </target> - <target name="jellytest" description="DO NOT RUN THIS TASK"> <java fork="yes" classname="org.apache.commons.jelly.Jelly" dir="."> <classpath refid="base.class.path"/> @@ -334,16 +321,20 @@ </target> <target name="get-dependency"> - <mkdir dir="${local-repository}/${project}/jars/"/> - <get - src="${remote-repository}/${project}/jars/${jarName}" - dest="${local-repository}/${project}/jars/${jarName}"/> + <mkdir dir="${local-repository}/${project}/jars/"/> + <get + + src="${remote-repository}/${project}/jars/${jarName}" + + dest="${local-repository}/${project}/jars/${jarName}"/> </target> -<target - name="initialize" - description="Get all the required dependencies from a remote repository"> - +<target + + name="initialize" + + description="Get all the required dependencies from a remote repository"> + <antcall target="get-dependency"> <param name="project" value="commons-jelly"/> <param name="jarName" value="commons-jelly-SNAPSHOT.jar"/> Index: checkstyle.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/checkstyle.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- checkstyle.xml 29 Jun 2003 13:27:46 -0000 1.1 +++ checkstyle.xml 17 Sep 2003 13:38:30 -0000 1.2 @@ -66,7 +66,6 @@ </module> <module name="JavadocVariable"/> - <!-- Checks for Naming Conventions. --> <!-- See http://checkstyle.sf.net/config_naming.html --> <module name="LocalFinalVariableName"/> @@ -89,13 +88,11 @@ <module name="RedundantImport"/> <module name="UnusedImports"/> - <!-- Checks for Size Violations. --> <!-- See http://checkstyle.sf.net/config_sizes.html --> <module name="FileLength"/> <module name="ParameterNumber"/> - <!-- Checks for whitespace --> <!-- See http://checkstyle.sf.net/config_whitespace.html --> <!-- @@ -108,13 +105,11 @@ --> <module name="TabCharacter"/> - <!-- Modifier Checks --> <!-- See http://checkstyle.sf.net/config_modifiers.html --> <module name="ModifierOrder"/> <module name="RedundantModifier"/> - <!-- Checks for blocks. You know, those {}'s --> <!-- See http://checkstyle.sf.net/config_blocks.html --> <module name="AvoidNestedBlocks"/> @@ -122,7 +117,6 @@ <module name="NeedBraces"/> - <!-- Checks for common coding problems --> <!-- See http://checkstyle.sf.net/config_coding.html --> <module name="AvoidInlineConditionals"/> @@ -145,7 +139,6 @@ <module name="HideUtilityClassConstructor"/> <module name="InterfaceIsType"/> <module name="VisibilityModifier"/> - <!-- Miscellaneous other checks. --> <!-- See http://checkstyle.sf.net/config_misc.html --> Index: JavaScriptConfiguration.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptConfiguration.xml,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- JavaScriptConfiguration.xml 4 Jul 2003 15:21:02 -0000 1.23 +++ JavaScriptConfiguration.xml 17 Sep 2003 13:38:32 -0000 1.24 @@ -12,13 +12,10 @@ </property> </class> - <class name="Button" extends="Input"/> - <class name="Checkbox" extends="Input"/> - <class name="Document" extends="HTMLElement"><!-- NOT FINISHED --> <property name="alinkColor" readable="true" writable="false"/> <property name="anchors" readable="true" writable="false"/> @@ -203,7 +200,6 @@ </function> </class> - <class name="Image" extends="Input"> </class> @@ -234,20 +230,17 @@ <function name="onblur"/> </class> - <class name="Location"> <function name="reload"/> <function name="refresh"/> </class> - <class name="Option" extends="HTMLElement"> <property name="text" readable="true" writable="false"/> <property name="value" readable="true" writable="false"/> <property name="defaultSelected" readable="true" writable="false"/> <property name="selected" readable="true" writable="false"/> </class> - <class name="Password" extends="Input"/><!-- NOT FINISHED --> <class name="Radio" extends="Input"/><!-- NOT FINISHED --> |
From: Mike B. <mb...@Ga...> - 2003-09-17 11:19:22
|
Cort Schaefer wrote: > My problem now is that I think there is a problem with the cookies. The > site that I am working on makes use of "dictionary" cookies and they seem to > be messed up on the second request that I make to the site. I am not sure > that I know where the cookie support in HtmlUnit is, but I know this worked > before my update to the 1.2.3 version. Cookie support is all handled by commons-httpclient. You might want to try a different version of that to see if it fixes your problem. http://jakarta.apache.org/commons/httpclient/downloads.html -- Mike Bowler Principal, Gargoyle Software Inc. Voice: (416) 822-0973 | Email : mb...@Ga... Fax : (416) 822-0975 | Website: http://www.GargoyleSoftware.com |
From: Cort S. <co...@xm...> - 2003-09-17 07:31:30
|
Well, I think I misspoke....the problem was definitely that my location was urlencoded, but I think that is because the cookie was encoded that I was using to redirect. I changed my asp page to urldecode the cookie before redirecting and I was able to take out the code below that I had added. My problem now is that I think there is a problem with the cookies. The site that I am working on makes use of "dictionary" cookies and they seem to be messed up on the second request that I make to the site. I am not sure that I know where the cookie support in HtmlUnit is, but I know this worked before my update to the 1.2.3 version. Any help would be much appreciated. Cort -----Original Message----- From: htm...@li... [mailto:htm...@li...] On Behalf Of Cort Schaefer Sent: Monday, September 15, 2003 1:18 PM To: htm...@li... Subject: [HtmlUnit] Redirection location value is url encoded I have been happily using an older version of HtmlUnit (from before your change to NekoHtml) and have decided to upgrade to see if NekoHtml is any more friendly on poorly formed Html and to see if it is any more conducive in my stress testing framework. Upgrading to the newest version was not hard from a compile perspective, but I ran into a problem where the "Location" response value is urlencoded from my web server and the code is not expecting that. I was able to get around the problem by modifying loadWebResponse as follows: if( statusCode >= 301 && statusCode <=307 && isRedirectEnabled() ) { URL newUrl = null; String locationString = null; try { locationString = webResponse.getResponseHeaderValue("Location"); > getLog().info("locationString=" + locationString); > locationString = java.net.URLDecoder.decode(locationString); > locationString = java.net.URLDecoder.decode(locationString); > getLog().info("locationString=" + locationString); if( locationString != null ) { I know that URLDecoder.decode is deprecated, so this is not a suitable patch, but did prove to resolve my problem. Also, in order to decode all of the encoded characters I had to run decode twice (no idea why). I didn't look any further to see if there was a more appropriate place for the decoding either. I am running my tests against Windows 2000 Server IIS 5.0 running an ASP application, so this might be a reason for the difference. If this does not seem like something that HtmlUnit should handle, please let me know. Thanks. Cort ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ HtmlUnit-develop mailing list Htm...@li... https://lists.sourceforge.net/lists/listinfo/htmlunit-develop |
From: Cort S. <co...@xm...> - 2003-09-15 19:17:58
|
I have been happily using an older version of HtmlUnit (from before your change to NekoHtml) and have decided to upgrade to see if NekoHtml is any more friendly on poorly formed Html and to see if it is any more conducive in my stress testing framework. Upgrading to the newest version was not hard from a compile perspective, but I ran into a problem where the "Location" response value is urlencoded from my web server and the code is not expecting that. I was able to get around the problem by modifying loadWebResponse as follows: if( statusCode >= 301 && statusCode <=307 && isRedirectEnabled() ) { URL newUrl = null; String locationString = null; try { locationString = webResponse.getResponseHeaderValue("Location"); > getLog().info("locationString=" + locationString); > locationString = java.net.URLDecoder.decode(locationString); > locationString = java.net.URLDecoder.decode(locationString); > getLog().info("locationString=" + locationString); if( locationString != null ) { I know that URLDecoder.decode is deprecated, so this is not a suitable patch, but did prove to resolve my problem. Also, in order to decode all of the encoded characters I had to run decode twice (no idea why). I didn't look any further to see if there was a more appropriate place for the decoding either. I am running my tests against Windows 2000 Server IIS 5.0 running an ASP application, so this might be a reason for the difference. If this does not seem like something that HtmlUnit should handle, please let me know. Thanks. Cort |
From: <no...@us...> - 2003-09-15 00:31:58
|
Log Message: ----------- Fixed bug where form elements without names were being submitted anyway. Patch supplied by Brad Clarke Modified Files: -------------- /cvsroot/htmlunit/htmlunit/src/xdocs: changes.xml /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/html: HtmlForm.java /cvsroot/htmlunit/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html: HtmlFormTest.java Revision Data ------------- Index: HtmlForm.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/java/com/gargoylesoftware/htmlunit/html/HtmlForm.java,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- HtmlForm.java 9 Sep 2003 20:47:57 -0000 1.23 +++ HtmlForm.java 15 Sep 2003 00:31:54 -0000 1.24 @@ -271,7 +271,9 @@ if( disabled != null ) { return false; } - + if( ! tagName.equals( "isindex" ) && getAttributeValue(element, "name" ).equals("") ) { + return false; + } if( tagName.equals( "input" ) ) { final String type = getAttributeValue(element, "type" ).toLowerCase(); if( type.equals( "radio" ) || type.equals( "checkbox" ) ) { Index: changes.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/xdocs/changes.xml,v retrieving revision 1.128 retrieving revision 1.129 diff -u -d -r1.128 -r1.129 --- changes.xml 10 Sep 2003 14:21:43 -0000 1.128 +++ changes.xml 15 Sep 2003 00:31:54 -0000 1.129 @@ -32,6 +32,10 @@ found between tr and td tags. Clearly this is illegal html but the browsers support it so HtmlUnit needs to as well. </action> + <action type="update" dev="mbowler" id="805332" due-to="Brad Clarke"> + Fixed bug where form elements without names were being submitted anyway. Patch + supplied by Brad Clarke + </action> </release> Index: HtmlFormTest.java =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/html/HtmlFormTest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- HtmlFormTest.java 3 Sep 2003 15:55:23 -0000 1.5 +++ HtmlFormTest.java 15 Sep 2003 00:31:54 -0000 1.6 @@ -645,5 +645,38 @@ final HtmlPage secondPage = (HtmlPage) form.submit("foo"); assertEquals( "Second", secondPage.getTitleText() ); } + + /** + * @throws Exception if the test fails + */ + public void testSubmit_NoNameOnControl() + throws Exception { + final String htmlContent + = "<html><head><title>foo</title></head><body>" + + "<form id='form1'>" + + " <input type='text' id='textfield' value='blah'/>" + + " <input type='submit' name='button' value='foo'/>" + + "</form></body></html>"; + final WebClient client = new WebClient(); + + final FakeWebConnection webConnection = new FakeWebConnection( client ); + webConnection.setContent( htmlContent ); + client.setWebConnection( webConnection ); + + final HtmlPage page = ( HtmlPage )client.getPage( + new URL( "http://first" ), + SubmitMethod.POST, Collections.EMPTY_LIST ); + final HtmlForm form = ( HtmlForm )page.getHtmlElementById( "form1" ); + + final HtmlSubmitInput button = (HtmlSubmitInput)form.getInputByName("button"); + button.click(); + + final List expectedParameters = Arrays.asList( new Object[]{ + new KeyValuePair("button", "foo") + } ); + final List collectedParameters = webConnection.getLastParameters(); + + assertEquals( expectedParameters, collectedParameters ); + } } |
From: SourceForge.net <no...@so...> - 2003-09-15 00:31:08
|
Bugs item #805332, was opened at 2003-09-12 17:10 Message generated for change (Comment added) made by mbowler You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=805332&group_id=47038 Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Brad Clarke (yourgod) >Assigned to: Mike Bowler (mbowler) Summary: Form elements without names should not be submitted Initial Comment: While it's not clearly defined what should happen if a control has no name (it's probably invalid...), this is about as close as I could find: "Every successful control has its control name paired with its current value as part of the submitted form data set." From: http://www.w3.org/TR/html401/interact/forms.html#successful-controls If it has no name it can't be paired. If it can't be paired it is not a "successful control." Also, Mozilla 1.5a, IE 5.5, and IE 6 all seem to ignore these controls, so I figure HtmlUnit should do the same. I'm attaching a patch (with a test this time :p) that changes the behavior. It broke HtmlIsIndexTest so I left those out of the new rule. I'd change the test but I have no idea how people actually use those things. ---------------------------------------------------------------------- >Comment By: Mike Bowler (mbowler) Date: 2003-09-14 20:31 Message: Logged In: YES user_id=46756 Applied patch - thanks ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=805332&group_id=47038 |
From: SourceForge.net <no...@so...> - 2003-09-12 21:10:43
|
Bugs item #805332, was opened at 2003-09-12 16:10 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=805332&group_id=47038 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Brad Clarke (yourgod) Assigned to: Nobody/Anonymous (nobody) Summary: Form elements without names should not be submitted Initial Comment: While it's not clearly defined what should happen if a control has no name (it's probably invalid...), this is about as close as I could find: "Every successful control has its control name paired with its current value as part of the submitted form data set." From: http://www.w3.org/TR/html401/interact/forms.html#successful-controls If it has no name it can't be paired. If it can't be paired it is not a "successful control." Also, Mozilla 1.5a, IE 5.5, and IE 6 all seem to ignore these controls, so I figure HtmlUnit should do the same. I'm attaching a patch (with a test this time :p) that changes the behavior. It broke HtmlIsIndexTest so I left those out of the new rule. I'd change the test but I have no idea how people actually use those things. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=805332&group_id=47038 |
From: SourceForge.net <no...@so...> - 2003-09-12 12:58:11
|
Feature Requests item #805051, was opened at 2003-09-12 12:58 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448269&aid=805051&group_id=47038 Category: None Group: None Status: Open Priority: 5 Submitted By: Alexander Pöppl (apoeppl) Assigned to: Nobody/Anonymous (nobody) Summary: cloneNode, createTextNode and replaceChild Initial Comment: Please add support for the DOM methods node.cloneNode, node.replaceChild and document.createTextNode. If you like I can offer you my help. Thanks, Alex ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448269&aid=805051&group_id=47038 |
From: SourceForge.net <no...@so...> - 2003-09-10 20:07:46
|
Bugs item #803974, was opened at 2003-09-10 15:07 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=803974&group_id=47038 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Brad Clarke (yourgod) Assigned to: Nobody/Anonymous (nobody) Summary: bad warning getting/setting .disabled from javascript Initial Comment: This might be related to this other bug: 709615 Disabled attributes cause javascript exception http://sourceforge.net/tracker/index.php?func=detail&aid=709615&group_id=47038&atid=448266 I'm attaching a patch for tests/com.gargoylesoftware.htmlunit.javascript.host.HtmlInput.java that demonstrates the warnings, but I don't know how to catch the log messages in a test to actually fail the test because of them :( ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=803974&group_id=47038 |
From: <no...@us...> - 2003-09-10 18:05:14
|
Log Message: ----------- It appears that embedded spaces in the version causes maven to fail. Changed the version to CVS_HEAD Modified Files: -------------- /cvsroot/htmlunit/htmlunit: project.xml Revision Data ------------- Index: project.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/project.xml,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- project.xml 10 Sep 2003 17:41:54 -0000 1.30 +++ project.xml 10 Sep 2003 18:04:43 -0000 1.31 @@ -4,7 +4,7 @@ <pomVersion>3</pomVersion> <id>htmlunit</id> <name>htmlunit</name> - <currentVersion>CVS HEAD</currentVersion> + <currentVersion>CVS_HEAD</currentVersion> <organization> <name>Gargoyle Software Inc.</name> |
From: <no...@us...> - 2003-09-10 17:42:26
|
Log Message: ----------- Changed current version to CVS HEAD. Added Jun Chen as a contributer. Modified Files: -------------- /cvsroot/htmlunit/htmlunit: project.xml Revision Data ------------- Index: project.xml =================================================================== RCS file: /cvsroot/htmlunit/htmlunit/project.xml,v retrieving revision 1.29 retrieving revision 1.30 diff -u -d -r1.29 -r1.30 --- project.xml 3 Sep 2003 12:49:36 -0000 1.29 +++ project.xml 10 Sep 2003 17:41:54 -0000 1.30 @@ -4,7 +4,7 @@ <pomVersion>3</pomVersion> <id>htmlunit</id> <name>htmlunit</name> - <currentVersion>1.2.3</currentVersion> + <currentVersion>CVS HEAD</currentVersion> <organization> <name>Gargoyle Software Inc.</name> @@ -106,6 +106,9 @@ <contributor> <name>Andreas Hangler</name> </contributor> + <contributer> + <name>Jun Chen</name> + </contributer> </contributors> <dependencies> |
From: SourceForge.net <no...@so...> - 2003-09-10 14:21:58
|
Bugs item #802285, was opened at 2003-09-08 02:56 Message generated for change (Comment added) made by mbowler You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=802285&group_id=47038 Category: None Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Andrei Kirshin (akirshin1) Assigned to: Mike Bowler (mbowler) Summary: Exception calling HtmlPage.asText() Initial Comment: Exception calling HtmlPage.asText(): java.lang.IllegalStateException: specified cell could not be found in table See attached page source. ---------------------------------------------------------------------- >Comment By: Mike Bowler (mbowler) Date: 2003-09-10 10:21 Message: Logged In: YES user_id=46756 Fixed. Change implemented in HtmlUnit, not NekoHTML. ---------------------------------------------------------------------- Comment By: Mike Bowler (mbowler) Date: 2003-09-09 16:13 Message: Logged In: YES user_id=46756 This is blowing up because there is a <form> tag between a <tr> and a <td> tag. This is clearly illegal html but since the browsers support it, HtmlUnit should as well. It isn't clear whether this is something that should be handled by NekoHTML before HtmlUnit gets it or if HtmlUnit should just handle it itself. I've sent an email to the author of NekoHTML explaining this bug and we'll figure out where the fix should go. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=448266&aid=802285&group_id=47038 |