Warn about asynchronicity of Focus events.
Alert developers that test methods that rely on FocusEvents fired after called
Focusable#setFocus should run their tests asynchronously.
Change-Id: I6aa429b8cd92b3fbf71e066436f39da5bf3a99b8
diff --git a/user/src/com/google/gwt/user/client/ui/Focusable.java b/user/src/com/google/gwt/user/client/ui/Focusable.java
index 372fa66..f467187 100644
--- a/user/src/com/google/gwt/user/client/ui/Focusable.java
+++ b/user/src/com/google/gwt/user/client/ui/Focusable.java
@@ -39,6 +39,10 @@
* Explicitly focus/unfocus this widget. Only one widget can have focus at a
* time, and the widget that does will receive all keyboard events.
*
+ * NOTE: Most browsers fire FocusEvents asynchronously. Especially within GWT tests, you'll
+ * need to make your test asynchronous to properly do verifications. See
+ * {@code GWTTestCase#delayTestFinish} for more information on how to do this.
+ *
* @param focused whether this widget should take focus or release it
*/
void setFocus(boolean focused);