testselenium / fighting-layout-bugs

Automatically exported from code.google.com/p/fighting-layout-bugs
Apache License 2.0
1 stars 1 forks source link

Google charts #1

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. find layout bugs in a webpage that contain google charts images 

What is the expected output? What do you see instead?
Normal output, I get a java exception:
java.lang.IllegalArgumentException: Invalid uri 
'http://www.google.com/chart?cht=lc&chs=950x100&chd=e:g29HAASh8p..zY&chco=0077CC
&chls=4,0,0&chdl=Cost&chxt=y,x&chxl=0:|30|990|1:|Aug+19%2C+2010|Aug+25%2C+2010&c
hxr=0,0,0.001&chxs=0,0077CC,11.5,0&chg=20,50,1,2&chm=o,0077CC,0,-1,8|B,E6F2FA,0,
0,0': Invalid query
    at org.apache.commons.httpclient.HttpMethodBase.<init>(Unknown Source)
    at org.apache.commons.httpclient.methods.GetMethod.<init>(Unknown Source)
    at de.michaeltamm.fightinglayoutbugs.DetectInvalidImageUrls.checkImageUrl(DetectInvalidImageUrls.java:455)
    at de.michaeltamm.fightinglayoutbugs.DetectInvalidImageUrls.checkImgElements(DetectInvalidImageUrls.java:144)
    at de.michaeltamm.fightinglayoutbugs.DetectInvalidImageUrls.findLayoutBugsIn(DetectInvalidImageUrls.java:102)
    at de.michaeltamm.fightinglayoutbugs.FightingLayoutBugs.findLayoutBugsIn(FightingLayoutBugs.java:146)
    at de.michaeltamm.fightinglayoutbugs.AbstractLayoutBugDetector.findLayoutBugsIn(AbstractLayoutBugDetector.java:84)

Please provide any additional information below.

Google charts images have many special characters in their uris, maybe thats 
the cause

Original issue reported on code.google.com by juli...@google.com on 26 Aug 2010 at 11:35

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r72.

Original comment by michael.tamm2 on 4 Oct 2010 at 10:53

GoogleCodeExporter commented 8 years ago
Fixed by ignoring image URLs, which can not be converted to an URI an can 
therefore not be checked with Apache HttpClient.

If anybody has an idea, how to check such URLs, I would really like to know ...

Original comment by michael.tamm2 on 4 Oct 2010 at 10:55

GoogleCodeExporter commented 8 years ago
"Invalid query" makes me think it is choking on the query string... found 
http://www.mail-archive.com/httpclient-user@jakarta.apache.org/msg04313.html

Perhaps using "new URI(String, boolean)" and pass false as the second argument 
to tell the URI class that it is supposed to escape the query string, will fix 
the issue.

Original comment by phzzzt on 9 Feb 2011 at 6:38