Hi everyone,
I am writing some code to try and test some of the behaviour of GWT
widgets inside plain old JUnit tests, as opposed to GWTTestCase. One
thing I have come across is the following:
The Frame class is a wrapper for the IFRAME element, but it uses the
following code:
public String getUrl() {
return getFrameElement().getSrc();
}
public void setUrl(String url) {
getFrameElement().setSrc(url);
}
private FrameElement getFrameElement() {
return getElement().cast();
}
Yet, FrameElement represents a FRAME tag, not an IFRAME tag. In
javascript, this all works without a hitch because we can freely cast
between different element types, but it is still somewhat untidy and
misleading.
I would suggest that it is changed to:
public String getUrl() {
return getIFrameElement().getSrc();
}
public void setUrl(String url) {
getIFrameElement().setSrc(url);
}
private IFrameElement getIFrameElement() {
return getElement().cast();
}
Any thoughts or comments would be appreciated.
Cheers
Tin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---