google-code-export / gwt-test-utils

Automatically exported from code.google.com/p/gwt-test-utils
1 stars 0 forks source link

Window.Location does not support getPath #117

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The LocationPatcher is missing implementations for the following methods:

getPath()
getHash()
getParameter(String)

Original issue reported on code.google.com by snstan...@gmail.com on 14 Feb 2012 at 3:46

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 14 Feb 2012 at 9:56

GoogleCodeExporter commented 9 years ago
Also, you might want to consider switching to URI instead of URL to hold the 
internal value.  Right now if Location is assigned to a relative path, it 
throws an exception.

Original comment by snstan...@gmail.com on 24 Feb 2012 at 11:26

GoogleCodeExporter commented 9 years ago
Here's a quick and dirty patch to get this working in some cases.

Original comment by snstan...@gmail.com on 7 Mar 2012 at 9:37

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 17 Mar 2012 at 9:44

GoogleCodeExporter commented 9 years ago
I just deployed new snapshots with a fix for this issue (0.36-SNAPSHOT, 
0.33.2-SNAPSHOT, 0.28.9-SNAPHOT, 0.25.6-SNAPSHOT and 0.22.6-SNAPSHOT).

Could you please give one of those versions a try and give me some feedback ? 
Thank you ;)

Original comment by gael.laz...@gmail.com on 18 Mar 2012 at 12:32

GoogleCodeExporter commented 9 years ago
This almost works.  Location.assign(url) is still failing for relative urls.  
You can make one additional tweak that will allow it to handle relative urls as 
well.  Change:

urlHolder.url = new URL(newURL)

to:

urlHolder.url = new URL(urlHolder.url, newURL)

Original comment by snstan...@gmail.com on 6 Apr 2012 at 10:55

GoogleCodeExporter commented 9 years ago
I just deployed new snapshots with this little change : 0.39-SNAPSHOT, 
0.33.4-SNAPSHOT, 0.28.11-SNAPSHOT, 0.25.8-SNAPSHOT and 0.22.8-SNAPSHOT. 
Is that working ?

Original comment by gael.laz...@gmail.com on 10 Apr 2012 at 7:57

GoogleCodeExporter commented 9 years ago
Looks good.  Thanks!

Original comment by snstan...@gmail.com on 10 Apr 2012 at 11:52

GoogleCodeExporter commented 9 years ago
Thank you very much for your feedback !

Original comment by gael.laz...@gmail.com on 11 Apr 2012 at 5:21