Attempt to fix random failing test

Change-Id: I47bd4a8600d7737f059088969942d8e0230423d0
diff --git a/user/test/com/google/gwt/user/client/ui/HistoryTest.java b/user/test/com/google/gwt/user/client/ui/HistoryTest.java
index 29ed298..715f04a 100644
--- a/user/test/com/google/gwt/user/client/ui/HistoryTest.java
+++ b/user/test/com/google/gwt/user/client/ui/HistoryTest.java
@@ -56,6 +56,14 @@
     return "com.google.gwt.user.User";
   }
 
+  @Override
+  protected void gwtSetUp() throws Exception {
+    if (this.handlerRegistration != null) {
+      this.handlerRegistration.removeHandler();
+      this.handlerRegistration = null;
+    }
+  }
+
   // TODO(dankurka): Fix up HTML unit hash change handling
   @DoNotRunWith(Platform.HtmlUnitUnknown)
   public void testClickLink() {
@@ -126,7 +134,7 @@
         if (historyToken.equals("foobar")) {
           History.newItem("");
         } else {
-          assertEquals(0, historyToken.length());
+          assertEquals("", historyToken);
           finishTest();
         }
       }