On 2 nov, 02:41, "[email protected]" <[email protected]> wrote:
> I'm trying out GWT 2.0 and in a GWTTestCase I wrote
>
> lv.loginButton.click();
>
> and "lv" is a LoginView, where I defined:
>
> loginButton = new Button("Log in");
> loginButton.addClickHandler(new ClickHandler() {
> public void onClick(ClickEvent event) {
> loginCallback.onSuccess(null);
> }
> });
>
> I set loginCallback appropriately, but the code there doesn't get
> executed. If I execute the callback's onSuccess method directly, it
> works, but it doesn't work if I try the click( ) way.
>
> Is this a bug of mine or a bug of GWT 2.0? The LoginView works
> perfectly well in development mode, so the code itself is not at
> fault. Of course, I have known myself to be at fault...
It might very well be a bug in HtmlUnit if that's the runstyle you're
using to run your tests (it's the default one in MS1 and MS2), but
according to this test (from 2.0.0-ms1) it should work (the test isn't
annotated with @DoNotRunWith(Platform.Htmlunit))
http://code.google.com/p/google-web-toolkit/source/browse/tags/2.0.0-ms1/user/test/com/google/gwt/user/client/ui/ButtonTest.java#68
Try running your tests manually to confirm (add "-runStyle Manual" to
the -Dgwt.args sysprop; it'll ask you to open a URL in a browser, just
like with DevMode).
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---