Return false in Window.confirm(msg) in GwtTestCase

2011-04-18 Thread Simon LG
Hi, I'm trying to return false when Window.confirm(msg) is called in a GwtTestCase. It is always returning true by HtmlUnit because it has no ConfirmHandlers. Is there a way to override this function ? Thanks Simon -- You received this message because you are subscribed to the Google Groups

Re: Return false in Window.confirm(msg) in GwtTestCase

2011-04-18 Thread Gal Dolber
You can hide Window behind an interface and use a Mock for your tests public interface Window { boolean confirm(String msg); } public class WindowImpl implements Window { public boolean confirm(String msg) { return com.google.gwt,user.client.Window.confirm(msg); } } public