httpunit-commit Mailing List for httpunit (Page 12)
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...> - 2004-10-29 00:13:57
|
Update of /cvsroot/httpunit/httpunit/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16805/doc Modified Files: release_notes.txt Log Message: <li>display - r/w browser-specific display control</li> Index: release_notes.txt =================================================================== RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v retrieving revision 1.387 retrieving revision 1.388 diff -u -r1.387 -r1.388 --- release_notes.txt 28 Oct 2004 23:50:33 -0000 1.387 +++ release_notes.txt 29 Oct 2004 00:13:47 -0000 1.388 @@ -16,10 +16,10 @@ Revision History: 28-Oct-2004: Acknowledgements: - Thanks to Vladimir Korenev for identifying the incorrect encoding in ServletUnit + Thanks to Vladimir Korenev for providing an implementation for style.visibility Problems fixed: - 1. bug #1056275 There was a typo in the encoding type used by ServletUnit to decode parameters + 1. patch #1046516 property style.visibility is now supported 25-Oct-2004: Problems fixed: |
From: Russell G. <rus...@us...> - 2004-10-29 00:13:57
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/javascript In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16805/src/com/meterware/httpunit/javascript Modified Files: JavaScript.java Log Message: <li>display - r/w browser-specific display control</li> Index: JavaScript.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/javascript/JavaScript.java,v retrieving revision 1.61 retrieving revision 1.62 diff -u -r1.61 -r1.62 --- JavaScript.java 8 Aug 2004 17:38:18 -0000 1.61 +++ JavaScript.java 29 Oct 2004 00:13:47 -0000 1.62 @@ -719,7 +719,8 @@ static public class Style extends JavaScriptEngine { - private String _display = "visible"; + private String _display = "inline"; + private String _visibility = "visible"; public String getClassName() { @@ -735,6 +736,16 @@ public void jsSet_display( String display ) { _display = display; } + + + public String jsGet_visibility() { + return _visibility; + } + + + public void jsSet_visibility( String visibility ) { + _visibility = visibility; + } } |
From: Russell G. <rus...@us...> - 2004-10-28 23:50:56
|
Update of /cvsroot/httpunit/httpunit/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11845/doc Modified Files: release_notes.txt Log Message: bug #1056275: fixed typo in encoding name Index: release_notes.txt =================================================================== RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v retrieving revision 1.386 retrieving revision 1.387 diff -u -r1.386 -r1.387 --- release_notes.txt 27 Oct 2004 00:57:33 -0000 1.386 +++ release_notes.txt 28 Oct 2004 23:50:33 -0000 1.387 @@ -14,6 +14,13 @@ Revision History: +28-Oct-2004: + Acknowledgements: + Thanks to Vladimir Korenev for identifying the incorrect encoding in ServletUnit + + Problems fixed: + 1. bug #1056275 There was a typo in the encoding type used by ServletUnit to decode parameters + 25-Oct-2004: Problems fixed: 1. bug #1051123 ServletUnit handling of parameter encoding was not cleaning up url-encodings |
From: Russell G. <rus...@us...> - 2004-10-28 23:50:56
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/servletunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11845/src/com/meterware/servletunit Modified Files: RequestContext.java Log Message: bug #1056275: fixed typo in encoding name Index: RequestContext.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/RequestContext.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- RequestContext.java 27 Oct 2004 00:57:33 -0000 1.5 +++ RequestContext.java 28 Oct 2004 23:50:46 -0000 1.6 @@ -152,7 +152,7 @@ private Hashtable getParameters() { if (_messageBody != null) { - loadParameters( getMessageBodyAsString() /* urlEncoded */ ); + loadParameters( getMessageBodyAsString() ); _messageBody = null; } if (_visibleParameters == null) { @@ -177,7 +177,7 @@ private String getMessageBodyAsString() { try { - return new String( _messageBody, "iso-8869-1" ); + return new String( _messageBody, "iso-8859-1" ); } catch (UnsupportedEncodingException e) { return ""; } |
From: Russell G. <rus...@us...> - 2004-10-27 00:57:44
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/servletunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26105/src/com/meterware/servletunit Modified Files: RequestContext.java ServletUnitClient.java Log Message: bug #1051123 ServletUnit handling of parameter encoding was not cleaning up url-encodings Index: RequestContext.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/RequestContext.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- RequestContext.java 23 Jul 2004 01:31:04 -0000 1.4 +++ RequestContext.java 27 Oct 2004 00:57:33 -0000 1.5 @@ -45,7 +45,7 @@ RequestContext( URL url ) { _url = url; String file = _url.getFile(); - if (file.indexOf( '?' ) >= 0) loadParameters( file.substring( file.indexOf( '?' )+1 ), /* urlEncoded */ true ); + if (file.indexOf( '?' ) >= 0) loadParameters( file.substring( file.indexOf( '?' )+1 ) /* urlEncoded */ ); } @@ -99,7 +99,7 @@ * have_equals -> initial: record parameter with null value * have_value -> initial: record parameter with value **/ - void loadParameters( String queryString, boolean urlEncoded ) { + void loadParameters( String queryString ) { if (queryString.length() == 0) return; StringTokenizer st = new StringTokenizer( queryString, "&=", /* return tokens */ true ); int state = STATE_INITIAL; @@ -119,11 +119,11 @@ state = STATE_INITIAL; } } else if (state == STATE_INITIAL) { - name = (!urlEncoded) ? token : HttpUnitUtils.decode( token, getMessageEncoding() ); + name = HttpUnitUtils.decode( token, getMessageEncoding() ); value = ""; state = STATE_HAVE_NAME; } else { - value = (!urlEncoded) ? token : HttpUnitUtils.decode( token, getMessageEncoding() ); + value = HttpUnitUtils.decode( token, getMessageEncoding() ); state = STATE_HAVE_VALUE; } } @@ -152,7 +152,7 @@ private Hashtable getParameters() { if (_messageBody != null) { - loadParameters( getMessageBodyAsString(), /* urlEncoded */ false ); + loadParameters( getMessageBodyAsString() /* urlEncoded */ ); _messageBody = null; } if (_visibleParameters == null) { @@ -177,7 +177,7 @@ private String getMessageBodyAsString() { try { - return new String( _messageBody, getMessageEncoding() ); + return new String( _messageBody, "iso-8869-1" ); } catch (UnsupportedEncodingException e) { return ""; } Index: ServletUnitClient.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/ServletUnitClient.java,v retrieving revision 1.15 retrieving revision 1.16 diff -u -r1.15 -r1.16 --- ServletUnitClient.java 29 Sep 2004 17:15:26 -0000 1.15 +++ ServletUnitClient.java 27 Oct 2004 00:57:33 -0000 1.16 @@ -70,9 +70,15 @@ InvocationContext newInvocation( WebRequest request, FrameSelector frame ) throws IOException, MalformedURLException { + ByteArrayOutputStream baos = getMessageBody( request ); + return _invocationContextFactory.newInvocation( this, frame, request, getHeaderFields( request.getURL() ), baos.toByteArray() ); + } + + + ByteArrayOutputStream getMessageBody( WebRequest request ) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); writeMessageBody( request, baos ); - return _invocationContextFactory.newInvocation( this, frame, request, getHeaderFields( request.getURL() ), baos.toByteArray() ); + return baos; } |
From: Russell G. <rus...@us...> - 2004-10-27 00:57:44
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/servletunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26105/test/com/meterware/servletunit Modified Files: HttpServletRequestTest.java RequestContextTest.java Log Message: bug #1051123 ServletUnit handling of parameter encoding was not cleaning up url-encodings Index: HttpServletRequestTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/servletunit/HttpServletRequestTest.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- HttpServletRequestTest.java 23 Sep 2004 22:48:20 -0000 1.24 +++ HttpServletRequestTest.java 27 Oct 2004 00:57:33 -0000 1.25 @@ -24,6 +24,7 @@ import java.io.InputStream; import java.io.ByteArrayInputStream; import java.io.BufferedInputStream; +import java.io.ByteArrayOutputStream; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; @@ -31,10 +32,7 @@ import javax.servlet.Servlet; import javax.servlet.ServletException; -import com.meterware.httpunit.GetMethodWebRequest; -import com.meterware.httpunit.WebRequest; -import com.meterware.httpunit.PutMethodWebRequest; -import com.meterware.httpunit.PostMethodWebRequest; +import com.meterware.httpunit.*; import junit.framework.Test; import junit.framework.TestSuite; @@ -166,6 +164,15 @@ } + public void testInlineParameterWithEmbeddedSpace() throws Exception { + WebRequest wr = new GetMethodWebRequest( "http://localhost/simple?color=dark+red&age=12" ); + HttpServletRequest request = new ServletUnitHttpRequest( NULL_SERVLET_REQUEST, wr, _context, new Hashtable(), NO_MESSAGE_BODY ); + + assertEquals( "age parameter", "12", request.getParameter( "age" ) ); + assertEquals( "color parameter", "dark red", request.getParameter( "color" ) ); + } + + public void testInlineMultiValuedParameter() throws Exception { WebRequest wr = new GetMethodWebRequest( "http://localhost/simple?color=red&color=blue&age=12" ); HttpServletRequest request = new ServletUnitHttpRequest( NULL_SERVLET_REQUEST, wr, _context, new Hashtable(), NO_MESSAGE_BODY ); @@ -446,20 +453,36 @@ public void testSpecifiedCharEncoding() throws Exception { String hebrewValue = "\u05d0\u05d1\u05d2\u05d3"; - String paramString = "param1=red¶m2=" + hebrewValue; + String paramString = "param1=red¶m2=%E0%E1%E2%E3"; // use iso-8859-8 to encode the data WebRequest wr = new PostMethodWebRequest( "http://localhost/simple" ); wr.setHeaderField( "Content-Type", "application/x-www-form-urlencoded; charset=ISO-8859-8" ); - ServletUnitHttpRequest request = new ServletUnitHttpRequest( NULL_SERVLET_REQUEST, wr, _context, new Hashtable(), paramString.getBytes( "ISO-8859-8" ) ); + ServletUnitHttpRequest request = new ServletUnitHttpRequest( NULL_SERVLET_REQUEST, wr, _context, new Hashtable(), paramString.getBytes( "iso-8859-1" ) ); assertEquals( "param1 value", "red", request.getParameter( "param1") ); assertEquals( "param2 value", hebrewValue, request.getParameter( "param2") ); } + public void ntestSpecifiedCharEncoding2() throws Exception { + String hebrewValue = "\u05d0\u05d1\u05d2\u05d3"; + HttpUnitOptions.setDefaultCharacterSet( "iso-8859-8" ); + WebRequest wr = new PostMethodWebRequest( "http://localhost/simple" ); + wr.setParameter( "param1", "red" ); + wr.setParameter( "param2", hebrewValue ); + wr.setHeaderField( "Content-Type", "application/x-www-form-urlencoded; charset=ISO-8859-8" ); + ServletUnitClient client = ServletUnitClient.newClient( null ); + ByteArrayOutputStream messageBody = client.getMessageBody( wr ); + ServletUnitHttpRequest request = new ServletUnitHttpRequest( NULL_SERVLET_REQUEST, wr, _context, new Hashtable(), messageBody.toByteArray() ); + String parameter = request.getParameter( "param2"); + assertEquals( "param2 value", hebrewValue, parameter ); + assertEquals( "param1 value", "red", request.getParameter( "param1") ); + } + + public void testSuppliedCharEncoding() throws Exception { String hebrewValue = "\u05d0\u05d1\u05d2\u05d3"; - String paramString = "param1=red¶m2=" + hebrewValue; + String paramString = "param1=red¶m2=%E0%E1%E2%E3"; // use iso-8859-8 to encode the data, then string is URL encoded WebRequest wr = new PostMethodWebRequest( "http://localhost/simple" ); - ServletUnitHttpRequest request = new ServletUnitHttpRequest( NULL_SERVLET_REQUEST, wr, _context, new Hashtable(), paramString.getBytes( "ISO-8859-8" ) ); + ServletUnitHttpRequest request = new ServletUnitHttpRequest( NULL_SERVLET_REQUEST, wr, _context, new Hashtable(), paramString.getBytes( "ISO-8859-1" ) ); request.setCharacterEncoding( "ISO-8859-8" ); assertEquals( "param1 value", "red", request.getParameter( "param1") ); assertEquals( "param2 value", hebrewValue, request.getParameter( "param2") ); Index: RequestContextTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/servletunit/RequestContextTest.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- RequestContextTest.java 2 Mar 2004 10:54:15 -0000 1.3 +++ RequestContextTest.java 27 Oct 2004 00:57:34 -0000 1.4 @@ -103,8 +103,8 @@ public void testEncodedParameterParsing() throws Exception { RequestContext rc = new RequestContext( new URL( "http://localhost/basic" )); String hebrewValue = "\u05d0\u05d1\u05d2\u05d3"; - String paramString = "param=red¶m1=" + hebrewValue + "¶m=blue"; - rc.setMessageBody( paramString.getBytes( "iso-8859-8" ) ); + String paramString = "param=red¶m1=%E0%E1%E2%E3¶m=blue"; + rc.setMessageBody( paramString.getBytes( "iso-8859-1" ) ); rc.setMessageEncoding( "iso-8859-8" ); assertMatchingSet( "parameter names", new String[] { "param", "param1" }, rc.getParameterNames() ); assertMatchingSet( "param values", new String[] { "red", "blue" }, rc.getParameterValues( "param" ) ); |
From: Russell G. <rus...@us...> - 2004-10-27 00:57:44
|
Update of /cvsroot/httpunit/httpunit/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26105/doc Modified Files: release_notes.txt Log Message: bug #1051123 ServletUnit handling of parameter encoding was not cleaning up url-encodings Index: release_notes.txt =================================================================== RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v retrieving revision 1.385 retrieving revision 1.386 diff -u -r1.385 -r1.386 --- release_notes.txt 17 Oct 2004 20:48:10 -0000 1.385 +++ release_notes.txt 27 Oct 2004 00:57:33 -0000 1.386 @@ -14,6 +14,10 @@ Revision History: +25-Oct-2004: + Problems fixed: + 1. bug #1051123 ServletUnit handling of parameter encoding was not cleaning up url-encodings + 17-Oct-2004: Problems fixed: 1. bug #1047367 frames defined by javascript were not being detected. |
From: Russell G. <rus...@us...> - 2004-10-17 20:48:21
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8473/test/com/meterware/httpunit/javascript Modified Files: FormScriptingTest.java NekoEnhancedScriptingTest.java Log Message: bug #1047367 frames defined by javascript were not being detected Index: FormScriptingTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/FormScriptingTest.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- FormScriptingTest.java 5 Oct 2004 23:55:40 -0000 1.32 +++ FormScriptingTest.java 17 Oct 2004 20:48:11 -0000 1.33 @@ -974,10 +974,14 @@ public void testAccessAcrossFrames() throws Exception { - defineWebPage( "First", "<script language='JavaScript'>" + - " top.frame2.document.testform.param1.value = 'new1';" + - " window.alert('value: ' + top.frame2.document.testform.param1.value);" + - "</script>" ); + defineResource( "First.html", + "<html><head><script language='JavaScript'>" + + "function accessOtherFrame() {" + + " top.frame2.document.testform.param1.value = 'new1';" + + " window.alert('value: ' + top.frame2.document.testform.param1.value);" + + "}" + + "</script><body onload='accessOtherFrame();'>" + + "</body></html>" ); defineWebPage( "Second", "<form method=post name=testform action='http://trinity/dummy'>" + " <input type=hidden name='param1' value='old1'></form>" ); defineResource( "Frames.html", Index: NekoEnhancedScriptingTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/NekoEnhancedScriptingTest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- NekoEnhancedScriptingTest.java 9 Mar 2003 20:35:48 -0000 1.5 +++ NekoEnhancedScriptingTest.java 17 Oct 2004 20:48:11 -0000 1.6 @@ -2,7 +2,7 @@ /******************************************************************************************************************** * $Id$ * - * Copyright (c) 2002, Russell Gold + * Copyright (c) 2002-2004, 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 @@ -28,7 +28,7 @@ /** * * @author <a href="mailto:rus...@ht...">Russell Gold</a> - **/ + **/ public class NekoEnhancedScriptingTest extends HttpUnitTest { public static void main( String args[] ) { @@ -59,7 +59,7 @@ 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() ); + assertEquals( "Link contents", "something", link.getText() ); } @@ -77,7 +77,7 @@ 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() ); + assertEquals( "Link contents", "something", link.getText() ); } @@ -125,17 +125,35 @@ 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() ); + assertEquals( "Link contents", "something", link.getText() ); 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() ); + assertEquals( "Link contents", "anything", link.getText() ); assertNull( "Should not have found scripted link", response.getLinkWithID( "here" ) ); } + /** + * Verifies that a script can write part of the frameset. + */ + public void testScriptedFrames() throws Exception { + defineWebPage( "OneForm", "<form name='form'><input name=text value='nothing special'></form>"); + defineResource("Frames.html", + "<html><script>" + + " document.write( '<frameset>' )" + + "</script>" + + " <frame src='OneForm.html' name='green'>" + + " <frame name=blue>" + + "</frameset></htmlL>"); + + WebConversation wc = new WebConversation(); + wc.getResponse( getHostPath() + "/Frames.html" ); + assertMatchingSet( "Loaded frames", new String[] { "_top", "green", "blue" }, wc.getFrameNames() ); + } + } |
From: Russell G. <rus...@us...> - 2004-10-17 20:48:21
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8473/src/com/meterware/httpunit Modified Files: FrameHolder.java WebResponse.java Log Message: bug #1047367 frames defined by javascript were not being detected Index: FrameHolder.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/FrameHolder.java,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- FrameHolder.java 5 Oct 2004 00:11:21 -0000 1.14 +++ FrameHolder.java 17 Oct 2004 20:48:10 -0000 1.15 @@ -174,18 +174,16 @@ _contents.put( frame, response ); if (response.isHTML()) { - if (!response.hasSubframes()) { - requestContext.addNewResponse( response ); - } else { - HttpUnitOptions.getScriptingEngine().associate( response ); + HttpUnitOptions.getScriptingEngine().associate( response ); + requestContext.addNewResponse( response ); + WebRequest[] requests = response.getFrameRequests(); + if (requests.length > 0) { createSubFrames( frame, response.getFrameSelectors() ); - WebRequest[] requests = response.getFrameRequests(); for (int i = 0; i < requests.length; i++) { if (requests[i].getURLString().length() != 0) { response.getWindow().getSubframeResponse( requests[i], requestContext ); } } - HttpUnitOptions.getScriptingEngine().load( response ); } } } Index: WebResponse.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebResponse.java,v retrieving revision 1.138 retrieving revision 1.139 diff -u -r1.138 -r1.139 --- WebResponse.java 5 Oct 2004 03:45:16 -0000 1.138 +++ WebResponse.java 17 Oct 2004 20:48:11 -0000 1.139 @@ -855,7 +855,6 @@ _baseURL = null; _baseTarget = _frame.getName(); _refreshHeader = null; - _hasSubframes = false; try { readTags( text.getBytes() ); @@ -982,8 +981,6 @@ while (tag != null ) { if (tag.getName().equalsIgnoreCase( "meta" )) processMetaTag( tag ); if (tag.getName().equalsIgnoreCase( "base" )) processBaseTag( tag ); - if (tag.getName().equalsIgnoreCase( "frameset" )) _hasSubframes = true; - if (tag.getName().equalsIgnoreCase( "iframe" )) _hasSubframes = true; if (tag.getName().equalsIgnoreCase( "noscript") && HttpUnitOptions.isScriptingEnabled()) { do { tag = parser.getNextTag(); } while (tag.getName().equalsIgnoreCase( "/noscript") ); } @@ -1152,11 +1149,6 @@ } - boolean hasSubframes() { - return _hasSubframes; - } - - void setCookie( String name, String value ) { _client.putCookie( name, value ); } |
From: Russell G. <rus...@us...> - 2004-10-17 20:48:19
|
Update of /cvsroot/httpunit/httpunit/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8473/doc Modified Files: release_notes.txt Log Message: bug #1047367 frames defined by javascript were not being detected Index: release_notes.txt =================================================================== RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v retrieving revision 1.384 retrieving revision 1.385 diff -u -r1.384 -r1.385 --- release_notes.txt 14 Oct 2004 22:03:21 -0000 1.384 +++ release_notes.txt 17 Oct 2004 20:48:10 -0000 1.385 @@ -14,6 +14,10 @@ Revision History: +17-Oct-2004: + Problems fixed: + 1. bug #1047367 frames defined by javascript were not being detected. + 14-Oct-2004: Problems fixed: 1. bug #1046597 tables nested inside paragraphs were not being seen by the enclosing page. This bug was introduced @@ -38,7 +42,7 @@ 4-Oct-2004 Problems fixed: - 1. bug #1039989 Did not compile with JDK 1.3 + 1. bug #1039989 Did not compile with JDK 1.3. This bug was introduced in HttpUnit 1.6 and has now been corrected. 2. bug #1035949 Following a link from the top frame to a _parent target no longer results in a NullPointerException. 3-Oct-2004 1.6 |
From: Russell G. <rus...@us...> - 2004-10-14 22:03:33
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19389/test/com/meterware/httpunit Modified Files: HtmlTablesTest.java Log Message: bug #1046597 tables nested inside paragraphs were not being seen by the enclosing page. Index: HtmlTablesTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/HtmlTablesTest.java,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- HtmlTablesTest.java 27 Jun 2004 19:29:15 -0000 1.19 +++ HtmlTablesTest.java 14 Oct 2004 22:03:23 -0000 1.20 @@ -265,6 +265,19 @@ assertEquals( "cell at 1,1", "Value", cells[1][1] ); } + + public void testTableInParagraph() throws Exception { + defineWebPage( "Default", "<p>" + + "<table summary=little>" + + "<tr><td>a</td><td>b</td><td>Value</td></tr>" + + "<tr><td>c</td><td>d</td><td>Value</td></tr>" + + "</table></p>" ); + + WebResponse page = _wc.getResponse( getHostPath() + "/Default.html" ); + assertEquals( "Number of tables in paragraph", 1, page.getTextBlocks()[0].getTables().length ); + assertEquals( "Number of tables in page", 1, page.getTables().length ); + } + /** * Get a specific cell with a given id in a WebTable **/ |
From: Russell G. <rus...@us...> - 2004-10-14 22:03:33
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19389/src/com/meterware/httpunit Modified Files: ParsedHTML.java Log Message: bug #1046597 tables nested inside paragraphs were not being seen by the enclosing page. Index: ParsedHTML.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/ParsedHTML.java,v retrieving revision 1.60 retrieving revision 1.61 diff -u -r1.60 -r1.61 --- ParsedHTML.java 22 Sep 2004 03:15:22 -0000 1.60 +++ ParsedHTML.java 14 Oct 2004 22:03:22 -0000 1.61 @@ -549,7 +549,11 @@ protected boolean addToContext() { return true; } protected void addToLists( NodeUtils.PreOrderTraversal pot, HTMLElement htmlElement ) { - getParsedHTML( pot ).addToList( htmlElement ); + for (Iterator i = pot.getContexts(); i.hasNext();) { + Object o = i.next(); + if (o instanceof ParsedHTML) ((ParsedHTML) o).addToList( htmlElement ); + if (o instanceof TableCell) break; + } } } |
From: Russell G. <rus...@us...> - 2004-10-14 22:03:31
|
Update of /cvsroot/httpunit/httpunit/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19389/doc Modified Files: release_notes.txt Log Message: bug #1046597 tables nested inside paragraphs were not being seen by the enclosing page. Index: release_notes.txt =================================================================== RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v retrieving revision 1.383 retrieving revision 1.384 diff -u -r1.383 -r1.384 --- release_notes.txt 13 Oct 2004 21:57:50 -0000 1.383 +++ release_notes.txt 14 Oct 2004 22:03:21 -0000 1.384 @@ -14,6 +14,11 @@ Revision History: +14-Oct-2004: + Problems fixed: + 1. bug #1046597 tables nested inside paragraphs were not being seen by the enclosing page. This bug was introduced + in 1.6 and has now been corrected. + 13-Oct-2004: Acknowledgements: Thanks to Satish Kolli for fixing bug #1040770 |
From: Russell G. <rus...@us...> - 2004-10-13 21:57:59
|
Update of /cvsroot/httpunit/httpunit/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13949/doc Modified Files: release_notes.txt Log Message: bug #1044820 ServletUnit now implements HttpServletResponse.getLocale() and setLocale() Index: release_notes.txt =================================================================== RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v retrieving revision 1.382 retrieving revision 1.383 diff -u -r1.382 -r1.383 --- release_notes.txt 13 Oct 2004 15:11:51 -0000 1.382 +++ release_notes.txt 13 Oct 2004 21:57:50 -0000 1.383 @@ -17,9 +17,11 @@ 13-Oct-2004: Acknowledgements: Thanks to Satish Kolli for fixing bug #1040770 + Thanks to Fabrizio Guistina for supplying an implementation of locale handling for ServletUnitHttpResponse Problems fixed: 1. bug #1040770 the Image.name JavaScript property is now supported + 2. bug #1044820 ServletUnit now implements HttpServletResponse.getLocale() and setLocale() 5-Oct-2004: Acknowledgements: |
From: Russell G. <rus...@us...> - 2004-10-13 21:57:59
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/servletunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13949/src/com/meterware/servletunit Modified Files: ServletUnitHttpResponse.java Log Message: bug #1044820 ServletUnit now implements HttpServletResponse.getLocale() and setLocale() Index: ServletUnitHttpResponse.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/servletunit/ServletUnitHttpResponse.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- ServletUnitHttpResponse.java 12 Feb 2004 17:46:29 -0000 1.20 +++ ServletUnitHttpResponse.java 13 Oct 2004 21:57:50 -0000 1.21 @@ -27,13 +27,7 @@ import java.io.PrintWriter; import java.io.UnsupportedEncodingException; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.Locale; -import java.util.Vector; -import java.util.ArrayList; -import java.util.TimeZone; -import java.util.Date; +import java.util.*; import java.text.SimpleDateFormat; import javax.servlet.ServletOutputStream; @@ -46,7 +40,9 @@ // rfc1123-date is "Sun, 06 Nov 1994 08:49:37 GMT" private static final String RFC1123_DATE_SPEC = "EEE, dd MMM yyyy hh:mm:ss z"; private boolean _committed; + private Locale _locale = Locale.getDefault(); + private static final Hashtable ENCODING_MAP = new Hashtable(); /** * @deprecated Use encodeURL(String url) @@ -238,7 +234,7 @@ * the MIME body sent by this response. **/ public String getCharacterEncoding() { - return _encoding; + return _encoding == null ? HttpUnitUtils.DEFAULT_CHARACTER_SET : _encoding; } @@ -256,12 +252,6 @@ _contentType = typeAndEncoding[0]; if (typeAndEncoding[1] != null) _encoding = typeAndEncoding[1]; - - if (_encoding.equalsIgnoreCase( HttpUnitUtils.DEFAULT_CHARACTER_SET )) { - setHeader( "Content-Type", type ); - } else { - setHeader( "Content-Type", _contentType + "; charset=" + _encoding ); - } } @@ -416,7 +406,17 @@ * By default, the response locale is the default locale for the server. **/ public void setLocale( Locale locale ) { - throw new RuntimeException( "setLocale not implemented" ); + _locale = locale; + if (_encoding == null) { + for (Iterator it = ENCODING_MAP.entrySet().iterator(); it.hasNext();) { + Map.Entry entry = (Map.Entry) it.next(); + String locales = (String) entry.getValue(); + if (locales.indexOf( locale.getLanguage() ) >= 0 || locales.indexOf( locale.toString() ) >= 0) { + _encoding = (String) entry.getKey(); + return; + } + } + } } @@ -424,7 +424,7 @@ * Returns the locale assigned to the response. **/ public Locale getLocale() { - throw new RuntimeException( "getLocale not implemented" ); + return _locale; } @@ -536,7 +536,7 @@ private String _contentType = "text/plain"; - private String _encoding = HttpUnitUtils.DEFAULT_CHARACTER_SET; + private String _encoding; private PrintWriter _writer; @@ -558,6 +558,7 @@ private void completeHeaders() { if (_headersComplete) return; addCookieHeader(); + setHeader( "Content-Type", _contentType + "; charset=" + getCharacterEncoding() ); _headersComplete = true; } @@ -575,6 +576,26 @@ } setHeader( "Set-Cookie", sb.toString() ); } + + + + static { + ENCODING_MAP.put( "iso-8859-1", "ca da de en es fi fr is it nl no pt sv " ); + ENCODING_MAP.put( "iso-8859-2", "cs hr hu pl ro sh sk sl sq " ); + ENCODING_MAP.put( "iso-8859-4", "et lt lv "); + ENCODING_MAP.put( "iso-8859-5", "be bg mk ru sr uk " ); + ENCODING_MAP.put( "iso-8859-6", "ar " ); + ENCODING_MAP.put( "iso-8859-7", "el " ); + ENCODING_MAP.put( "iso-8859-8", "iw he " ); + ENCODING_MAP.put( "iso-8859-9", "tr " ); + + ENCODING_MAP.put("Shift_JIS", "ja "); + ENCODING_MAP.put("EUC-KR", "ko "); + ENCODING_MAP.put("TIS-620", "th "); + ENCODING_MAP.put("GB2312", "zh " ); + ENCODING_MAP.put("Big5", "zh_TW zh_HK " ); + } + } |
From: Russell G. <rus...@us...> - 2004-10-13 21:57:59
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/servletunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13949/test/com/meterware/servletunit Modified Files: HttpServletResponseTest.java Log Message: bug #1044820 ServletUnit now implements HttpServletResponse.getLocale() and setLocale() Index: HttpServletResponseTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/servletunit/HttpServletResponseTest.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- HttpServletResponseTest.java 13 Jun 2004 20:57:28 -0000 1.12 +++ HttpServletResponseTest.java 13 Oct 2004 21:57:50 -0000 1.13 @@ -22,6 +22,7 @@ import java.io.*; import java.util.Date; +import java.util.Locale; import java.text.SimpleDateFormat; import javax.servlet.*; @@ -72,7 +73,7 @@ assertEquals( "Title", "Sample Page", response.getTitle() ); assertEquals( "Content length", 65, response.getContentLength() ); assertEquals( "Content encoding", "iso-8859-1", response.getCharacterSet() ); - assertEquals( "Content header", "text/html", response.getHeaderField( "Content-type" ) ); + assertEquals( "Content header", "text/html; charset=iso-8859-1", response.getHeaderField( "Content-type" ) ); } @@ -93,6 +94,18 @@ } + public void testLocale() throws Exception { + ServletUnitHttpResponse servletResponse = new ServletUnitHttpResponse(); + assertEquals( "Default locale", Locale.getDefault(), servletResponse.getLocale() ); + + servletResponse.setContentType( "text/html" ); + servletResponse.setLocale( new Locale( "he", "IL" ) ); + assertEquals( "Specified locale", new Locale( "he", "IL" ), servletResponse.getLocale() ); + assertEquals( "Content type", "text/html; charset=iso-8859-8", servletResponse.getHeaderField( "Content-type" ) ); + + } + + public void testStreamResponse() throws Exception { ServletUnitHttpResponse servletResponse = new ServletUnitHttpResponse(); servletResponse.setContentType( "text/html" ); |
From: Russell G. <rus...@us...> - 2004-10-13 21:56:36
|
Update of /cvsroot/httpunit/httpunit/site/com/meterware/website In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13707/site/com/meterware/website Modified Files: Site.java Log Message: prepare for image Index: Site.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/site/com/meterware/website/Site.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- Site.java 18 Apr 2004 14:43:37 -0000 1.8 +++ Site.java 13 Oct 2004 21:56:26 -0000 1.9 @@ -154,6 +154,7 @@ } else if (type.equalsIgnoreCase( "enhancements" )) { super.setLocation( getFeatureEntryURL() ); } else if (type.equalsIgnoreCase( "donations" )) { + // xxx link from image: http://images.sourceforge.net/images/project-support.jpg super.setLocation( "http://sourceforge.net/project/project_donations.php?group_id=" + _groupId ); } else if (type.equalsIgnoreCase( "cvs" )) { super.setLocation( "http://sourceforge.net/cvs/?group_id=" + _groupId ); |
From: Russell G. <rus...@us...> - 2004-10-13 15:13:51
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv789/test/com/meterware/httpunit/javascript Modified Files: DocumentScriptingTest.java Log Message: bug 1040770 (fixed by Satish Kolli): Image.name property now readable Index: DocumentScriptingTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/DocumentScriptingTest.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- DocumentScriptingTest.java 5 Dec 2003 04:06:53 -0000 1.11 +++ DocumentScriptingTest.java 13 Oct 2004 15:11:51 -0000 1.12 @@ -239,7 +239,7 @@ " alert( getFound( document.realimage ) + \"image 'realimage'\" )\n;" + " alert( getFound( document.images['realimage'] ) + \"image 'images[realimage]'\" )\n;" + " alert( getFound( document.noimage ) + \"image 'noimage'\" );\n" + - " alert( '2nd image is ' + document.images[1].src ); }\n" + + " alert( document.images[1].name ); }\n" + "</script></head>\n" + "<body onLoad='viewImages()'>\n" + "<img name='realimage' src='pict1.gif'>\n" + @@ -251,7 +251,7 @@ assertEquals( "Alert message", "found image 'realimage'", wc.popNextAlert() ); assertEquals( "Alert message", "found image 'images[realimage]'", wc.popNextAlert() ); assertEquals( "Alert message", "did not find image 'noimage'", wc.popNextAlert() ); - assertEquals( "Alert message", "2nd image is pict2.gif", wc.popNextAlert() ); + assertEquals( "Alert message", "2ndimage", wc.popNextAlert() ); assertNull( "Alert should have been removed", wc.getNextAlert() ); } |
From: Russell G. <rus...@us...> - 2004-10-13 15:13:28
|
Update of /cvsroot/httpunit/httpunit/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv789/doc Modified Files: release_notes.txt Log Message: bug 1040770 (fixed by Satish Kolli): Image.name property now readable Index: release_notes.txt =================================================================== RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v retrieving revision 1.381 retrieving revision 1.382 diff -u -r1.381 -r1.382 --- release_notes.txt 5 Oct 2004 23:55:30 -0000 1.381 +++ release_notes.txt 13 Oct 2004 15:11:51 -0000 1.382 @@ -14,6 +14,13 @@ Revision History: +13-Oct-2004: + Acknowledgements: + Thanks to Satish Kolli for fixing bug #1040770 + + Problems fixed: + 1. bug #1040770 the Image.name JavaScript property is now supported + 5-Oct-2004: Acknowledgements: Thanks to Hanson Char for identifying a JDK 1.5 incompatibility. |
From: Russell G. <rus...@us...> - 2004-10-13 15:13:26
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv789/src/com/meterware/httpunit Modified Files: WebImage.java Log Message: bug 1040770 (fixed by Satish Kolli): Image.name property now readable Index: WebImage.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebImage.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- WebImage.java 12 Sep 2004 03:31:58 -0000 1.12 +++ WebImage.java 13 Oct 2004 15:11:51 -0000 1.13 @@ -105,6 +105,8 @@ public Object get( String propertyName ) { if (propertyName.equalsIgnoreCase( "src" )) { return getSource(); + } else if(propertyName.equalsIgnoreCase( "name" )) { + return getName(); } else { return super.get( propertyName ); } |
From: Russell G. <rus...@us...> - 2004-10-13 15:13:23
|
Update of /cvsroot/httpunit/httpunit/sitedocs/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv789/sitedocs/doc Modified Files: javascript-support.html Log Message: bug 1040770 (fixed by Satish Kolli): Image.name property now readable Index: javascript-support.html =================================================================== RCS file: /cvsroot/httpunit/httpunit/sitedocs/doc/javascript-support.html,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- javascript-support.html 5 Dec 2003 04:06:53 -0000 1.6 +++ javascript-support.html 13 Oct 2004 15:11:51 -0000 1.7 @@ -139,6 +139,7 @@ <h4>properties</h4> <ul> <li>src - read/write - the relative URL of the image</li> +<li>name - read-only - the name attribute of the image</li> </ul> <h2>Link (inherits from HTMLElement)</h2> |
From: Russell G. <rus...@us...> - 2004-10-05 23:55:50
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21170/test/com/meterware/httpunit/javascript Modified Files: FormScriptingTest.java Log Message: fixed bug #1040508 Using the setCheckbox and toggleCheckbox methods was not triggering the onclick event Index: FormScriptingTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/FormScriptingTest.java,v retrieving revision 1.31 retrieving revision 1.32 diff -u -r1.31 -r1.32 --- FormScriptingTest.java 21 Jul 2004 23:17:32 -0000 1.31 +++ FormScriptingTest.java 5 Oct 2004 23:55:40 -0000 1.32 @@ -599,6 +599,24 @@ } + public void testSetCheckboxOnClickEvent() throws Exception { + defineResource( "OnCommand.html", "<html><head></head>" + + "<body>" + + "<form name='the_form'>" + + " <input type='checkbox' name='color' value='blue' " + + " onClick='alert( \"color-blue is now \" + document.the_form.color.checked );'>" + + "</form>" + + "</body></html>" ); + WebConversation wc = new WebConversation(); + WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" ); + WebForm form = response.getFormWithName( "the_form" ); + form.toggleCheckbox( "color" ); + assertEquals( "Alert after change", "color-blue is now true", wc.popNextAlert() ); + form.setCheckbox( "color", false ); + assertEquals( "Alert after change", "color-blue is now false", wc.popNextAlert() ); + } + + public void testIndexedRadioProperties() throws Exception { defineResource( "OnCommand.html", "<html><head><script language='JavaScript'>" + "function viewRadio( radio ) { \n" + |
From: Russell G. <rus...@us...> - 2004-10-05 23:55:50
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21170/src/com/meterware/httpunit Modified Files: FormControl.java Log Message: fixed bug #1040508 Using the setCheckbox and toggleCheckbox methods was not triggering the onclick event Index: FormControl.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/FormControl.java,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- FormControl.java 21 Jul 2004 23:17:32 -0000 1.47 +++ FormControl.java 5 Oct 2004 23:55:39 -0000 1.48 @@ -677,11 +677,9 @@ void claimUniqueValue( List values ) { - boolean wasChecked = isChecked(); if (isValueRequired()) return; - setChecked( values.contains( getQueryValue() ) ); + setState( values.contains( getQueryValue() ) ); if (isChecked()) values.remove( getQueryValue() ); - if (isChecked() != wasChecked) sendOnClickEvent(); } @@ -695,15 +693,17 @@ * Toggles the value of this control. */ public void toggle() { - setChecked( !isChecked() ); + setState( !isChecked() ); } /** - * Sets the state of this boolean control. + * Sets the state of this boolean control. Triggers the 'onclick' event if the state has changed. */ public void setState( boolean state ) { + boolean wasChecked = isChecked(); setChecked( state ); + if (isChecked() != wasChecked) sendOnClickEvent(); } } |
From: Russell G. <rus...@us...> - 2004-10-05 23:55:50
|
Update of /cvsroot/httpunit/httpunit/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21170/doc Modified Files: release_notes.txt Log Message: fixed bug #1040508 Using the setCheckbox and toggleCheckbox methods was not triggering the onclick event Index: release_notes.txt =================================================================== RCS file: /cvsroot/httpunit/httpunit/doc/release_notes.txt,v retrieving revision 1.380 retrieving revision 1.381 diff -u -r1.380 -r1.381 --- release_notes.txt 5 Oct 2004 11:29:52 -0000 1.380 +++ release_notes.txt 5 Oct 2004 23:55:30 -0000 1.381 @@ -20,6 +20,7 @@ Problems fixed: 1. Renamed local variables which conflicted with new JDK 1.5 keyword "enum." + 2. bug #1040508 Using the setCheckbox and toggleCheckbox methods was not triggering the onclick event 4-Oct-2004 Problems fixed: |
From: Russell G. <rus...@us...> - 2004-10-05 11:40:47
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/dom In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4049/test/com/meterware/httpunit/dom Log Message: Directory /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/dom added to the repository |