Bugs item #981534, was opened at 2004-06-28 15:27 Message generated for change (Settings changed) made by jimweaver You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497982&aid=981534&group_id=61302
Category: None >Group: Release 1.3 Status: Closed Resolution: Fixed Priority: 7 Submitted By: Jim Weaver (jimweaver) Assigned to: Jim Weaver (jimweaver) Summary: Javascript onchange bug Initial Comment: OK, I dunno if this was introduced with the new versions of httpunit etc., or not but we have a problem when an onchange event ends up changing the response (via form submission or setting window.location). HttpUnitDialog ends up with the old response, not the new one. The problem is demonstrated in a test in the JavaScriptEventsTest, which I have named such that it won't run from AllTests: notestOnChangeOnFormElementChangesWindowLocation() This sort of thing used to work, I'm pretty sure. Probably we have a change in HttpUnit that is clobbering us. Note that after triggering the onchange, you can check dialog.webClient.getCurrentPage() from your test and it will return the proper response that the onchange directed us to. But, HttpUnitDialog's response object is wrong - and that is what the assertions drive off of. The client listener does get alerted by httpunit from the onchange, but the new response at that point is on the response parameter passed into the client listener - not on webclilent.getCurrentPage(). We used to use the response parameter ages ago, but the listner was getting called when javascript resources loaded, and that caused the response to unexpectedly be the contents of a javascript file ;-). Fun, fun, fun ---------------------------------------------------------------------- Comment By: Jim Weaver (jimweaver) Date: 2004-06-28 18:22 Message: Logged In: YES user_id=619947 OK fixed - setting a form parameter will no refresh the response to the current page if the current page changed as a result of setting the parameter in httpunit. That takes into account change of location by onchange of input element without breaking the frame support. Unit test in place for this now in JavaScriptEventsTest. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=497982&aid=981534&group_id=61302 ------------------------------------------------------- This SF.Net email is sponsored by: thawte's Crypto Challenge Vl Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam Camcorder. More prizes in the weekly Lunch Hour Challenge. Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m _______________________________________________ Jwebunit-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jwebunit-development
