From: Casey C. <cr...@na...> - 2005-06-15 21:34:11
|
Hey all, I found a regression between HTMLUnit 1.5 and 1.6, but haven't been able to pin point it yet. I have javascript that uses window.opener.location to refresh parent pages. In htmlunit 1.5 these work just fine. Upon upgrading to HMTLUnit 1.6 the .location on the window.opener is undefined. I tried to write a small testcase to reproduce the problem, but so far have been unable to reproduce it outside the product I'm working on. Does anyone have an idea where this would be breaking down in 1.6? -- Casey |
From: Brad C. <yo...@br...> - 2005-06-15 22:02:05
|
Could be a lot of things. A stack would help narrow it down. Could you pull the latest CVS and see if it's still broken before spending too much time isolating it? There has been a change since 1.6 to how things are scoped that might have something to do with it. Brad C --- Casey Crabb <cr...@na...> wrote: > Hey all, > > I found a regression between HTMLUnit 1.5 and 1.6, but haven't been > able to pin point it yet. I have javascript that uses > window.opener.location to refresh parent pages. In htmlunit 1.5 these > work just fine. Upon upgrading to HMTLUnit 1.6 the .location on the > window.opener is undefined. > > I tried to write a small testcase to reproduce the problem, but so far > have been unable to reproduce it outside the product I'm working on. > > Does anyone have an idea where this would be breaking down in 1.6? > > -- > Casey |
From: Casey C. <cr...@na...> - 2005-06-15 23:08:45
Attachments:
stacktrace.txt
|
The problem still occurs with CVS as of 5pm CDT today. I've attached the stacktrace. Line 875 of that javascript file is; if (window.top.location.href.indexOf('more.jsp')<0) { The location attribute of the Window returned by top is undefined. Any ideas of where I should look in HTMLUnit (other than generating the unified diff between 1.5 and 1.6)? -- Casey On Wed, Jun 15, 2005 at 03:01:47PM -0700, Brad Clarke wrote: > Could be a lot of things. A stack would help narrow it down. > > Could you pull the latest CVS and see if it's still broken before > spending too much time isolating it? There has been a change since > 1.6 to how things are scoped that might have something to do with it. > > Brad C > > --- Casey Crabb <cr...@na...> wrote: > > > Hey all, > > > > I found a regression between HTMLUnit 1.5 and 1.6, but haven't been > > able to pin point it yet. I have javascript that uses > > window.opener.location to refresh parent pages. In htmlunit 1.5 these > > work just fine. Upon upgrading to HMTLUnit 1.6 the .location on the > > window.opener is undefined. > > > > I tried to write a small testcase to reproduce the problem, but so far > > have been unable to reproduce it outside the product I'm working on. > > > > Does anyone have an idea where this would be breaking down in 1.6? > > > > -- > > Casey > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
From: David D. K. <ddk...@ki...> - 2005-06-16 04:56:03
|
I would look at com.gargoylesoftware.htmlunit.javascript.host.Window.jsGet_top(). Actually, I would look at where TopLevelWindow gets created. It seems that not all of its properties on the SimpleScriptable object that it contains are being set properly during construction (or shortly thereafter). IntelliJ IDEA says the WebClient and Window classes are the two production (non-test) classes where it's being used. (NOTE: My copy of HtmlUnit from CVS is a bit out-dated, though. Please double-check this for yourself.) Dave On Jun 15, 2005, at 6:08 PM, Casey Crabb wrote: > The problem still occurs with CVS as of 5pm CDT today. > > I've attached the stacktrace. > > Line 875 of that javascript file is; > if (window.top.location.href.indexOf('more.jsp')<0) { > > The location attribute of the Window returned by top is undefined. > > Any ideas of where I should look in HTMLUnit (other than generating > the unified diff between 1.5 and 1.6)? > > -- > Casey > > On Wed, Jun 15, 2005 at 03:01:47PM -0700, Brad Clarke wrote: > >> Could be a lot of things. A stack would help narrow it down. >> >> Could you pull the latest CVS and see if it's still broken before >> spending too much time isolating it? There has been a change since >> 1.6 to how things are scoped that might have something to do with it. >> >> Brad C >> |
From: Casey C. <cr...@na...> - 2005-06-16 19:16:48
|
Turns out it was the new code to enforce browser capabilities. I was incorrectly creating my custom BrowserVersion and as a result the min-version constraints for the location property on the window object weren't being met. A slight tweak to my custom BrowserVersion fixed it. Thanks for the help -- Casey On Wed, Jun 15, 2005 at 11:55:34PM -0500, David D. Kilzer wrote: > I would look at > com.gargoylesoftware.htmlunit.javascript.host.Window.jsGet_top(). > Actually, I would look at where TopLevelWindow gets created. It > seems that not all of its properties on the SimpleScriptable object > that it contains are being set properly during construction (or > shortly thereafter). IntelliJ IDEA says the WebClient and Window > classes are the two production (non-test) classes where it's being > used. (NOTE: My copy of HtmlUnit from CVS is a bit out-dated, > though. Please double-check this for yourself.) > > Dave > > > On Jun 15, 2005, at 6:08 PM, Casey Crabb wrote: > > >The problem still occurs with CVS as of 5pm CDT today. > > > >I've attached the stacktrace. > > > >Line 875 of that javascript file is; > > if (window.top.location.href.indexOf('more.jsp')<0) { > > > >The location attribute of the Window returned by top is undefined. > > > >Any ideas of where I should look in HTMLUnit (other than generating > >the unified diff between 1.5 and 1.6)? > > > >-- > >Casey > > > >On Wed, Jun 15, 2005 at 03:01:47PM -0700, Brad Clarke wrote: > > > >>Could be a lot of things. A stack would help narrow it down. > >> > >>Could you pull the latest CVS and see if it's still broken before > >>spending too much time isolating it? There has been a change since > >>1.6 to how things are scoped that might have something to do with it. > >> > >>Brad C > >> > > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux Migration Strategies > from IBM. Find simple to follow Roadmaps, straightforward articles, > informative Webcasts and more! Get everything you need to get up to > speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user |