Bugs item #981534, was opened at 2004-06-28 15:27
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=981534&group_id=61302

Category: None
Group: None
Status: Open
Resolution: None
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

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=981534&group_id=61302


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Jwebunit-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to