google-code-export / gwt-test-utils

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

HTMLPanel.getElement().getInnerHTML() returns some strange html, on special inputs #70

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Write some unittest that checks the HTMLPanel input vs innerHTML
2. Use some string like this: "<p>you can <b>test</b><a 
href=\"somelink\">here</a> and everything will be different</p>"

What is the expected output? What do you see instead?
I have some panel and use getElement().getInnerHTML(). I expect that the 
returned string is equal to the string given on init.

But I see this:
input: <p>you can <b>test</b><a href="somelink">here</a> and everything will be 
different</p>
output: <p>you can <b>test</b><a href="somelink">here</a></p> and everything 
will be different

What version of the product are you using? On what operating system?
GWT 2.3, gwt-test-utils 0.30

Please provide any additional information below.
If you put the input string above in your HTMLPanelTest, you should see the 
problem directly.

Original issue reported on code.google.com by Vieg...@gmail.com on 31 Aug 2011 at 4:05

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 31 Aug 2011 at 4:16

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 2 Sep 2011 at 5:40

GoogleCodeExporter commented 9 years ago
So I finally get this working. I replace HTMLParser library with NekoHTML, 
which provides a SAX interface to parse HTML. NekoHTML seems to be more active.

But while doing this substitution, a got a strange error because gwt-dev.jar 
has its own xerces classes, in a different version than NekoHTML needs.

So, I also removed the gwt-dev.jar from gwt-test-utils dependencies, which 
indeed is very nice :-)

I've deployed new 0.33-SNAPSHOT, 0.28.7-SNAPSHOT, 0.25.4-SNAPSHOT and 
0.22.4-SNAPSHOT with those modifications.

Could you please give it a try and give me some feedback ?

Original comment by gael.laz...@gmail.com on 7 Sep 2011 at 7:09

GoogleCodeExporter commented 9 years ago
As dicussed by email: your latest change works for me. And I can use some Gwt 
Unit Tests in parallel. Very nice!

Original comment by Vieg...@gmail.com on 12 Sep 2011 at 3:06

GoogleCodeExporter commented 9 years ago

Original comment by gael.laz...@gmail.com on 13 Sep 2011 at 5:50