diff --git a/dev/build.xml b/dev/build.xml
index 12e3f27..75af45b 100755
--- a/dev/build.xml
+++ b/dev/build.xml
@@ -88,8 +88,8 @@
           <include name="apache/commons/commons-io-1.4.jar" />
           <include name="apache/commons/commons-lang-2.4.jar" />
           <include name="cssparser/cssparser-0.9.5.jar" />
-	  <include name="htmlunit/htmlunit-r5424/htmlunit-r5424.jar" />
-	  <include name="htmlunit/htmlunit-r5424/htmlunit-core-js-r5424.jar" />
+	  <include name="htmlunit/htmlunit-r5607/htmlunit-r5607.jar" />
+	  <include name="htmlunit/htmlunit-r5607/htmlunit-core-js-r5607.jar" />
           <include name="nekohtml/nekohtml-1.9.13.jar" />
           <include name="xalan/xalan-2.7.1.jar" />
           <include name="xerces/xerces-2_9_1/serializer.jar" />
@@ -144,8 +144,8 @@
           <zipfileset src="${gwt.tools.lib}/apache/commons/commons-io-1.4.jar" />
           <zipfileset src="${gwt.tools.lib}/apache/commons/commons-lang-2.4.jar" />
           <zipfileset src="${gwt.tools.lib}/cssparser/cssparser-0.9.5.jar" />
-	  <zipfileset src="${gwt.tools.lib}/htmlunit/htmlunit-r5424/htmlunit-r5424.jar" />
-	  <zipfileset src="${gwt.tools.lib}/htmlunit/htmlunit-r5424/htmlunit-core-js-r5424.jar" />
+	  <zipfileset src="${gwt.tools.lib}/htmlunit/htmlunit-r5607/htmlunit-r5607.jar" />
+	  <zipfileset src="${gwt.tools.lib}/htmlunit/htmlunit-r5607/htmlunit-core-js-r5607.jar" />
           <zipfileset src="${gwt.tools.lib}/nekohtml/nekohtml-1.9.13.jar" />
           <zipfileset src="${gwt.tools.lib}/xalan/xalan-2.7.1.jar" />
           <zipfileset src="${gwt.tools.lib}/xerces/xerces-2_9_1/serializer.jar" />
diff --git a/dev/core/src/com/google/gwt/dev/shell/HostedModePluginObject.java b/dev/core/src/com/google/gwt/dev/shell/HostedModePluginObject.java
index 41c29d9..37d54b6 100644
--- a/dev/core/src/com/google/gwt/dev/shell/HostedModePluginObject.java
+++ b/dev/core/src/com/google/gwt/dev/shell/HostedModePluginObject.java
@@ -17,6 +17,7 @@
 
 import com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine;
 import com.gargoylesoftware.htmlunit.javascript.host.Window;
+import com.gargoylesoftware.htmlunit.javascript.host.WindowProxy;
 
 import net.sourceforge.htmlunit.corejs.javascript.Context;
 import net.sourceforge.htmlunit.corejs.javascript.Function;
@@ -114,8 +115,7 @@
             + " init: expected 1, got " + args.length);
       }
       try {
-        window = (Window) args[0];
-        // TODO (amitmanjhi): what checking needs to be done here for window?
+        window = ((WindowProxy) args[0]).getDelegee();
         return init(VERSION);
       } catch (ClassCastException e) {
         throw Context.reportRuntimeError("Incorrect parameter types for "
diff --git a/dev/core/src/com/google/gwt/dev/shell/HtmlUnitSessionHandler.java b/dev/core/src/com/google/gwt/dev/shell/HtmlUnitSessionHandler.java
index 987ca66..81edb9b 100644
--- a/dev/core/src/com/google/gwt/dev/shell/HtmlUnitSessionHandler.java
+++ b/dev/core/src/com/google/gwt/dev/shell/HtmlUnitSessionHandler.java
@@ -27,6 +27,8 @@
 import com.gargoylesoftware.htmlunit.WebWindow;
 import com.gargoylesoftware.htmlunit.html.HtmlPage;
 import com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine;
+import com.gargoylesoftware.htmlunit.javascript.SimpleScriptable;
+import com.gargoylesoftware.htmlunit.javascript.SimpleScriptableProxy;
 import com.gargoylesoftware.htmlunit.javascript.host.Window;
 
 import net.sourceforge.htmlunit.corejs.javascript.Context;
@@ -161,11 +163,20 @@
      * thisObject to ScriptableObject 4. Convert args 5. Get return value
      */
     Context jsContext = Context.getCurrentContext();
-    ScriptableObject jsThis;
+    ScriptableObject jsThis = null;
     if (thisObj.getType() == ValueType.NULL) {
       jsThis = window;
     } else {
-      jsThis = (ScriptableObject) makeJsvalFromValue(jsContext, thisObj);
+      Object obj = makeJsvalFromValue(jsContext, thisObj);
+      if (obj instanceof ScriptableObject) {
+        jsThis = (ScriptableObject) obj;
+      } else if (obj instanceof SimpleScriptableProxy) {
+        jsThis = ((SimpleScriptableProxy<SimpleScriptable>) obj).getDelegee();
+      } else {
+        logger.log(TreeLogger.ERROR, "Unable to convert " + obj + " to either "
+            + " ScriptableObject or SimpleScriptableProxy");
+        return new ExceptionOrReturnValue(true, new Value(null));
+      }
     }
     Object functionObject = ScriptableObject.getProperty(
         window, methodName);
diff --git a/eclipse/dev/.classpath b/eclipse/dev/.classpath
index 89b8987..03fbe25 100644
--- a/eclipse/dev/.classpath
+++ b/eclipse/dev/.classpath
@@ -37,8 +37,8 @@
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/tomcat-jk2-2.1.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/tomcat/tomcat-util-5.1.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/sun/swingworker/swing-worker-1.1.jar"/>
-        <classpathentry kind="var" path="GWT_TOOLS/lib/htmlunit/htmlunit-r5424/htmlunit-core-js-r5424.jar" sourcepath="/GWT_TOOLS/lib/htmlunit/htmlunit-r5424/htmlunit-core-js-r5424-sources.jar"/>
-        <classpathentry kind="var" path="GWT_TOOLS/lib/htmlunit/htmlunit-r5424/htmlunit-r5424.jar" sourcepath="/GWT_TOOLS/lib/htmlunit/htmlunit-r5424/htmlunit-r5424-sources.jar"/>
+        <classpathentry kind="var" path="GWT_TOOLS/lib/htmlunit/htmlunit-r5607/htmlunit-core-js-r5607.jar" sourcepath="/GWT_TOOLS/lib/htmlunit/htmlunit-r5607/htmlunit-core-js-r5607-sources.jar"/>
+        <classpathentry kind="var" path="GWT_TOOLS/lib/htmlunit/htmlunit-r5607/htmlunit-r5607.jar" sourcepath="/GWT_TOOLS/lib/htmlunit/htmlunit-r5607/htmlunit-r5607-sources.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/protobuf/protobuf-2.2.0/protobuf-java-rebased-2.2.0.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/eclipse/user/.classpath b/eclipse/user/.classpath
index e823df7..9f5fd37 100644
--- a/eclipse/user/.classpath
+++ b/eclipse/user/.classpath
@@ -29,7 +29,7 @@
 	<classpathentry kind="var" path="GWT_TOOLS/lib/easymock/easymockclassextension.jar"/>
 	<classpathentry kind="var" path="GWT_TOOLS/lib/objectweb/asm-3.1.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/gwt-dev"/>
-	<classpathentry kind="var" path="GWT_TOOLS/lib/htmlunit/htmlunit-r5424/htmlunit-r5424.jar" sourcepath="/GWT_TOOLS/lib/htmlunit/htmlunit-r5424/htmlunit-r5424-sources.jar"/>
-	<classpathentry kind="var" path="GWT_TOOLS/lib/htmlunit/htmlunit-r5424/htmlunit-core-js-r5424.jar" sourcepath="/GWT_TOOLS/lib/htmlunit/htmlunit-r5424/htmlunit-core-js-r5424-sources.jar"/>
+	<classpathentry kind="var" path="GWT_TOOLS/lib/htmlunit/htmlunit-r5607/htmlunit-r5607.jar" sourcepath="/GWT_TOOLS/lib/htmlunit/htmlunit-r5607/htmlunit-r5607-sources.jar"/>
+	<classpathentry kind="var" path="GWT_TOOLS/lib/htmlunit/htmlunit-r5607/htmlunit-core-js-r5607.jar" sourcepath="/GWT_TOOLS/lib/htmlunit/htmlunit-r5607/htmlunit-core-js-r5607-sources.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/user/src/com/google/gwt/junit/JUnitShell.java b/user/src/com/google/gwt/junit/JUnitShell.java
index 7babf18..62dbb3a 100644
--- a/user/src/com/google/gwt/junit/JUnitShell.java
+++ b/user/src/com/google/gwt/junit/JUnitShell.java
@@ -1117,7 +1117,8 @@
     // TODO (amitmanjhi): Remove this hard-coding. A RunStyle somehow needs to
     // specify how it interacts with the platforms.
     if (runStyle instanceof RunStyleHtmlUnit
-        && (bannedPlatforms.contains(Platform.HtmlUnitBug) || bannedPlatforms.contains(Platform.HtmlUnit))) {
+        && (bannedPlatforms.contains(Platform.HtmlUnitUnknown)
+            || bannedPlatforms.contains(Platform.HtmlUnitLayout) || bannedPlatforms.contains(Platform.HtmlUnitBug))) {
       return true;
     }
 
diff --git a/user/src/com/google/gwt/junit/Platform.java b/user/src/com/google/gwt/junit/Platform.java
index f4fe228..3ebf0a2 100644
--- a/user/src/com/google/gwt/junit/Platform.java
+++ b/user/src/com/google/gwt/junit/Platform.java
@@ -18,12 +18,18 @@
 /**
  * An enum to indicate the Platform where a test should run. In general, it
  * should be able to represent a large matrix such as: Browser * Os_combo *
- * {hosted, web} * {htmlUnit, actual_browser}. For now, we just distinguish
- * between HtmlUnit and non-HtmlUnit platforms.
+ * {hosted, web} * {htmlUnit, actual_browser}.
+ * <p>
+ * For HtmlUnit, we distinguish among three categories of failures:
+ * <li>{@link HtmlUnitBug}: Gwt tests that are failing due to a bug in HtmlUnit.
+ * Ideally, these must be accompanied by a bug report on the HtmlUnit issue
+ * tracker.
+ * <li>{@link HtmlUnitLayout}: Gwt tests that test layout. HtmlUnit does not use
+ * a layout engine, though some simple layout tests do pass with HtmlUnit.
+ * <li>{@link HtmlUnitUnknown}: Gwt tests whose failures have not been
+ * investigated yet.
+ *
  */
 public enum Platform {
-  Devel,
-  HtmlUnitBug,
-  HtmlUnit,
-  Prod,
+  Devel, HtmlUnitBug, HtmlUnitLayout, HtmlUnitUnknown, Prod,
 }
diff --git a/user/src/com/google/gwt/junit/RunStyleHtmlUnit.java b/user/src/com/google/gwt/junit/RunStyleHtmlUnit.java
index 3edb41a..9a2b3b1 100644
--- a/user/src/com/google/gwt/junit/RunStyleHtmlUnit.java
+++ b/user/src/com/google/gwt/junit/RunStyleHtmlUnit.java
@@ -98,9 +98,7 @@
       setupWebClient(webClient);
       try {
         Page page = webClient.getPage(url);
-        // TODO(jat): is this necessary?
         webClient.waitForBackgroundJavaScriptStartingBefore(2000);
-        page.getEnclosingWindow().getJobManager().waitForJobs(60000);
         treeLogger.log(TreeLogger.SPAM, "getPage returned "
             + ((HtmlPage) page).asXml());
         // TODO(amitmanjhi): call webClient.closeAllWindows()
@@ -153,7 +151,7 @@
    * as long as this number is greater than 1, GWTTestCaseTest::testRetry will
    * pass
    */
-  private static final int DEFAULT_TRIES = 3;
+  private static final int DEFAULT_TRIES = 1;
 
   /**
    * Returns the list of browsers Htmlunit emulates as a comma separated string.
diff --git a/user/test/com/google/gwt/core/client/impl/SchedulerImplTest.java b/user/test/com/google/gwt/core/client/impl/SchedulerImplTest.java
index 1d86550..47f70ad 100644
--- a/user/test/com/google/gwt/core/client/impl/SchedulerImplTest.java
+++ b/user/test/com/google/gwt/core/client/impl/SchedulerImplTest.java
@@ -19,8 +19,6 @@
 import com.google.gwt.core.client.Scheduler.RepeatingCommand;
 import com.google.gwt.core.client.Scheduler.ScheduledCommand;
 import com.google.gwt.core.client.impl.SchedulerImpl.Task;
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.junit.client.GWTTestCase;
 
 /**
@@ -84,11 +82,6 @@
     return "com.google.gwt.core.Core";
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testDeferredCommands() {
     final SchedulerImpl impl = new SchedulerImpl();
 
@@ -157,11 +150,6 @@
     });
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testFixedDelayCommands() {
     final SchedulerImpl impl = new SchedulerImpl();
     final int[] values = {0, 4};
diff --git a/user/test/com/google/gwt/core/client/impl/StackTraceCreatorTest.java b/user/test/com/google/gwt/core/client/impl/StackTraceCreatorTest.java
index 17dd65c..40bb63b 100644
--- a/user/test/com/google/gwt/core/client/impl/StackTraceCreatorTest.java
+++ b/user/test/com/google/gwt/core/client/impl/StackTraceCreatorTest.java
@@ -20,8 +20,6 @@
 import com.google.gwt.core.client.JavaScriptObject;
 import com.google.gwt.core.client.JsArrayString;
 import com.google.gwt.core.client.impl.StackTraceCreator.CollectorChrome;
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.junit.client.GWTTestCase;
 
 /**
@@ -30,11 +28,6 @@
  */
 public class StackTraceCreatorTest extends GWTTestCase {
   
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public static void testJavaScriptException() {
     JsArrayString start = sample();
     Throwable t = null;
@@ -70,10 +63,7 @@
 
   /**
    * Just make sure that reentrant behavior doesn't fail.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */  
-  @DoNotRunWith({Platform.HtmlUnit})
   public static void testReentrantCalls() {
     if (!GWT.isScript()) {
       // sample is useless in hosted mode
@@ -90,11 +80,6 @@
     assertEquals(start, end);
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public static void testStackTraces() {
     JsArrayString start = sample();
 
@@ -180,11 +165,6 @@
     return "com.google.gwt.core.Core";
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testExtractName() {
     assertEquals("anonymous",
         StackTraceCreator.extractNameFromToString("function(){}"));
@@ -202,11 +182,6 @@
         StackTraceCreator.extractNameFromToString("  function foo (){}"));
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testChromeExtractName() {
     CollectorChrome c = new CollectorChrome();
 
diff --git a/user/test/com/google/gwt/dom/client/ElementTest.java b/user/test/com/google/gwt/dom/client/ElementTest.java
index 79d17a0..5806456 100644
--- a/user/test/com/google/gwt/dom/client/ElementTest.java
+++ b/user/test/com/google/gwt/dom/client/ElementTest.java
@@ -176,10 +176,7 @@
 
   /**
    * getAbsolute[Left|Top|Right|Bottom].
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testGetAbsolutePosition() {
     final int border = 8;
     final int margin = 9;
@@ -231,6 +228,7 @@
   /**
    * scroll[Left|Top], getAbsolute[Left|Top].
    */
+  @DoNotRunWith(Platform.HtmlUnitLayout)
   public void testGetAbsolutePositionWhenBodyScrolled() {
     Document doc = Document.get();
     BodyElement body = doc.getBody();
@@ -439,6 +437,7 @@
   /**
    * scroll[Left|Top], scrollIntoView.
    */
+  @DoNotRunWith({Platform.HtmlUnitLayout})
   public void testScrollIntoView() {
     final DivElement outer = Document.get().createDivElement();
     final DivElement inner = Document.get().createDivElement();
@@ -475,7 +474,7 @@
    * Failed in all modes due to HtmlUnit bug:
    * https://sourceforge.net/tracker/?func=detail&aid=2941255&group_id=47038&atid=448266
    */
-  @DoNotRunWith({Platform.HtmlUnitBug})
+  @DoNotRunWith({Platform.HtmlUnitLayout})
   public void testScrollLeftInRtl() {
     final DivElement outer = Document.get().createDivElement();
     final DivElement inner = Document.get().createDivElement();
diff --git a/user/test/com/google/gwt/dom/client/NodeTest.java b/user/test/com/google/gwt/dom/client/NodeTest.java
index 8ff6956..fe9935f 100644
--- a/user/test/com/google/gwt/dom/client/NodeTest.java
+++ b/user/test/com/google/gwt/dom/client/NodeTest.java
@@ -16,6 +16,8 @@
 package com.google.gwt.dom.client;
 
 import com.google.gwt.core.client.JavaScriptObject;
+import com.google.gwt.junit.DoNotRunWith;
+import com.google.gwt.junit.Platform;
 import com.google.gwt.junit.client.GWTTestCase;
 
 /**
@@ -245,6 +247,7 @@
   /**
    * ownerDocument.
    */
+  @DoNotRunWith(Platform.HtmlUnitBug)
   public void testOwnerDocument() {
     Document doc = Document.get();
     BodyElement body = doc.getBody();
diff --git a/user/test/com/google/gwt/dom/client/StyleInjectorTest.java b/user/test/com/google/gwt/dom/client/StyleInjectorTest.java
index bc14ce8..be61d38 100644
--- a/user/test/com/google/gwt/dom/client/StyleInjectorTest.java
+++ b/user/test/com/google/gwt/dom/client/StyleInjectorTest.java
@@ -15,8 +15,6 @@
  */
 package com.google.gwt.dom.client;
 
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.junit.client.GWTTestCase;
 import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.DeferredCommand;
@@ -95,10 +93,7 @@
   /*
    * Tests against issue #879: Ensure that empty history tokens do not add
    * additional characters after the '#' symbol in the URL.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith(Platform.HtmlUnit)
   public void testStyleInjectorBatched() {
     testStyleInjector("testStyleInjectorBatched", false);
   }
diff --git a/user/test/com/google/gwt/emultest/java/math/BigDecimalConstructorsTest.java b/user/test/com/google/gwt/emultest/java/math/BigDecimalConstructorsTest.java
index dea49e7..044e19f 100644
--- a/user/test/com/google/gwt/emultest/java/math/BigDecimalConstructorsTest.java
+++ b/user/test/com/google/gwt/emultest/java/math/BigDecimalConstructorsTest.java
@@ -38,8 +38,6 @@
 package com.google.gwt.emultest.java.math;
 
 import com.google.gwt.emultest.java.util.EmulTestBase;
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 
 import java.math.BigDecimal;
 import java.math.BigInteger;
@@ -282,7 +280,6 @@
   /**
    * new BigDecimal(double value) when value is denormalized.
    */
-  @DoNotRunWith(Platform.HtmlUnit)
   public void testConstrDoubleDenormalized() {
     // HtmlUnit incorrectly converts the following double to a string
     // Safari can't handle e-309 here
diff --git a/user/test/com/google/gwt/emultest/java/util/TreeMapTest.java b/user/test/com/google/gwt/emultest/java/util/TreeMapTest.java
index 6412a92..9e3e0f0 100644
--- a/user/test/com/google/gwt/emultest/java/util/TreeMapTest.java
+++ b/user/test/com/google/gwt/emultest/java/util/TreeMapTest.java
@@ -17,8 +17,6 @@
 
 import com.google.gwt.core.client.GWT;
 import com.google.gwt.core.client.JavaScriptException;
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 
 import org.apache.commons.collections.TestMap;
 
@@ -1748,10 +1746,7 @@
 
   /**
    * Test method for 'java.lang.Object.toString()'.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith(Platform.HtmlUnit)
   public void testToString() {
     Map<K, V> map = createMap();
     map.put(getKeys()[0], getValues()[0]);
diff --git a/user/test/com/google/gwt/http/client/RequestBuilderTest.java b/user/test/com/google/gwt/http/client/RequestBuilderTest.java
index 84877c4..766ad4e 100644
--- a/user/test/com/google/gwt/http/client/RequestBuilderTest.java
+++ b/user/test/com/google/gwt/http/client/RequestBuilderTest.java
@@ -182,7 +182,11 @@
     testSend(builder, SERVLET_GET_RESPONSE);
   }
 
-  @DoNotRunWith({Platform.HtmlUnitBug})
+  /*
+   * Need to file an HtmlUnit bug. TODO(amitmanjhi): contribute an HtmlUnit
+   * patch.
+   */
+  @DoNotRunWith( {Platform.HtmlUnitBug})
   public void testSend_HEAD() throws RequestException {
     RequestBuilder builder = new RequestBuilder(RequestBuilder.HEAD,
         getTestBaseURL());
@@ -217,7 +221,11 @@
     testSendRequest(builder, null, SERVLET_GET_RESPONSE);
   }
 
-  @DoNotRunWith({Platform.HtmlUnitBug})
+  /*
+   * Need to file an HtmlUnit bug. TODO(amitmanjhi): contribute an HtmlUnit
+   * patch.
+   */
+  @DoNotRunWith( {Platform.HtmlUnitBug})
   public void testSendRequest_HEAD() throws RequestException {
     RequestBuilder builder = new RequestBuilder(RequestBuilder.HEAD,
         getTestBaseURL());
@@ -374,8 +382,10 @@
    * <li>Timeout greater than the server's response time
    * <li>Timeout is less than the server's response time
    * </ul>
+   * <p>
+   * XHR handling is synchronous in HtmlUnit at present (svn r5607).
    */
-  @DoNotRunWith({Platform.HtmlUnit})
+  @DoNotRunWith(Platform.HtmlUnitBug)
   public void testSetTimeout_timeout() throws RequestException {
     delayTestFinishForRequest();
 
diff --git a/user/test/com/google/gwt/jsonp/client/JsonpRequestTest.java b/user/test/com/google/gwt/jsonp/client/JsonpRequestTest.java
index c3aefba..e88a64b 100644
--- a/user/test/com/google/gwt/jsonp/client/JsonpRequestTest.java
+++ b/user/test/com/google/gwt/jsonp/client/JsonpRequestTest.java
@@ -176,11 +176,12 @@
   }
 
   /**
-   * Fails in devmode with HtmlUnit, JS "null" exception
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
+   * Fails in devmode with HtmlUnit, JS "null" exception.
+   * <p>
+   * Call occurs through postponedActions in HtmlUnit that execute
+   * synchronously. Should be async. Need to file HtmlUnitBug.
    */
-  @DoNotRunWith(Platform.HtmlUnit)
+  @DoNotRunWith(Platform.HtmlUnitBug)
   public void testCancel() {
     delayTestFinish(2000);
     // setup a server request that will delay for 500ms
@@ -193,7 +194,7 @@
       @Override
       public void run() {
         finishTest();
-      }      
+      }
     }.schedule(1000);
   }
 
@@ -203,11 +204,6 @@
         new AssertSuccessCallback<String>("A"));
   }
 
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith(Platform.HtmlUnit)
   public void testDouble() {
     delayTestFinish(RESPONSE_DELAY);
     jsonp.requestDouble(echo("123.456"), new AssertSuccessCallback<Double>(
@@ -222,11 +218,12 @@
   }
 
   /**
-   * Hangs indefinitely in devmode with HtmlUnit
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
+   * Hangs indefinitely in devmode with HtmlUnit.
+   * <p>
+   * Call occurs through postponedActions in HtmlUnit that execute
+   * synchronously. Should be async. Need to file HtmlUnitBug.
    */
-  @DoNotRunWith(Platform.HtmlUnit)
+  @DoNotRunWith(Platform.HtmlUnitBug)
   public void testIds() {
     delayTestFinish(RESPONSE_DELAY);
     JsonpRequest<String> reqA = jsonp.requestString(echo("'A'"),
@@ -275,11 +272,6 @@
     jsonp.requestString(echo("null"), new AssertSuccessCallback<String>(null));
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testOverlapped() {
     delayTestFinish(RESPONSE_DELAY);
     Counter counter = new Counter(3);
diff --git a/user/test/com/google/gwt/junit/client/GWTTestCaseTest.java b/user/test/com/google/gwt/junit/client/GWTTestCaseTest.java
index 00e04f1..2d151f4 100644
--- a/user/test/com/google/gwt/junit/client/GWTTestCaseTest.java
+++ b/user/test/com/google/gwt/junit/client/GWTTestCaseTest.java
@@ -368,14 +368,6 @@
   }
 
   /**
-   * Just setting the htmlunit mode.
-   */
-  @DoNotRunWith(Platform.HtmlUnitBug)
-  public void testSetRetry() {
-    htmlunitMode = false;
-  }
-
-  /**
    * Test skipping a test for dev mode.
    */
   @DoNotRunWith(Platform.Devel)
@@ -391,18 +383,6 @@
     assertTrue("Should not run in prod mode", !GWT.isScript());
   }
 
-  /*
-   * This test MUST appear after testSetRetry().
-   */
-  public void testRetry() {
-    if (htmlunitMode && !attemptedOnce) {
-      // fail
-      attemptedOnce = true;
-      throw new RuntimeException();
-    }
-    assertTrue(true);
-  }
-
   public void testSetUpTearDown() throws Exception {
     assertSame(IS_SETUP, setupTeardownFlag);
     tearDown();
diff --git a/user/test/com/google/gwt/layout/client/LayoutTest.java b/user/test/com/google/gwt/layout/client/LayoutTest.java
index 7af5cc1..70fd1be 100644
--- a/user/test/com/google/gwt/layout/client/LayoutTest.java
+++ b/user/test/com/google/gwt/layout/client/LayoutTest.java
@@ -41,7 +41,6 @@
 /**
  * Tests for the {@link Layout} class.
  */
-@DoNotRunWith(Platform.HtmlUnitBug)
 public class LayoutTest extends GWTTestCase {
 
   /**
@@ -150,6 +149,7 @@
   /**
    * Tests child alignment within a layer.
    */
+  @DoNotRunWith(Platform.HtmlUnitLayout)
   public void testChildAlignment() {
     layer0.setLeftWidth(0, PX, 128, PX);
     layer0.setTopHeight(0, PX, 256, PX);
@@ -186,6 +186,7 @@
    * Test that fillParent() works properly when the outer div is a child of
    * another div, and that it correctly follows that div's size.
    */
+  @DoNotRunWith(Platform.HtmlUnitLayout)
   public void testFillParent() {
     // We don't use the default elements created in gwtSetUp() because we need
     // to test the behavior when the layout is contained by an element other
@@ -235,6 +236,7 @@
    * Test that fillParent() works properly when the outer div is a child of the
    * document body.
    */
+  @DoNotRunWith(Platform.HtmlUnitLayout)
   public void testFillWindow() {
     layer0.setTopBottom(0, PX, 0, PX);
     layer0.setLeftRight(0, PX, 0, PX);
@@ -300,6 +302,7 @@
    * bottom-height). Ok, so we don't test the *entire* cross-product, but enough
    * to be comfortable.
    */
+  @DoNotRunWith(Platform.HtmlUnitLayout)
   public void testStaticConstraints() {
     // left-right, top-bottom
     layer0.setTopBottom(32, PX, 32, PX);
@@ -337,6 +340,7 @@
   /**
    * Tests all unit types.
    */
+  @DoNotRunWith(Platform.HtmlUnitLayout)
   public void testUnits() {
     // CM
     layer0.setTopBottom(1, CM, 1, CM);
@@ -391,6 +395,7 @@
    * Tests layout in the presence of decorations on the parent and child
    * elements.
    */
+  @DoNotRunWith(Platform.HtmlUnitLayout)
   public void testWithDecorations() {
     layer0.setTopBottom(0, PX, 0, PX);
     layer0.setLeftRight(0, PX, 0, PX);
diff --git a/user/test/com/google/gwt/regexp/shared/RegExpTest.java b/user/test/com/google/gwt/regexp/shared/RegExpTest.java
index ac3869b..a9a8b14 100644
--- a/user/test/com/google/gwt/regexp/shared/RegExpTest.java
+++ b/user/test/com/google/gwt/regexp/shared/RegExpTest.java
@@ -16,8 +16,6 @@
 package com.google.gwt.regexp.shared;
 
 import com.google.gwt.core.client.GWT;
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.junit.client.GWTTestCase;
 
 /**
@@ -528,11 +526,6 @@
     checkReplace("the A stops here", "$$$$", "the $$ stops here");
   }
 
-  /**
-   * Failed in all modes due to HtmlUnit bug.  See:
-   * https://sourceforge.net/tracker/?func=detail&aid=2949446&group_id=47038&atid=448266
-   */
-  @DoNotRunWith({Platform.HtmlUnitBug})
   public void testReplace_doubleDigitGroupReplacement() {
     regExp = RegExp.compile("(1)(2)(3)(4)(5)(6)(7)(8)(9)(a)(b)(c)");
     checkReplace("it's 123456789abc.", "[$11]", "it's [b].");
diff --git a/user/test/com/google/gwt/resources/client/ImageResourceTest.java b/user/test/com/google/gwt/resources/client/ImageResourceTest.java
index 018e7ab..1b0c31c 100644
--- a/user/test/com/google/gwt/resources/client/ImageResourceTest.java
+++ b/user/test/com/google/gwt/resources/client/ImageResourceTest.java
@@ -20,8 +20,6 @@
 import com.google.gwt.event.dom.client.ErrorHandler;
 import com.google.gwt.event.dom.client.LoadEvent;
 import com.google.gwt.event.dom.client.LoadHandler;
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.junit.client.GWTTestCase;
 import com.google.gwt.resources.client.ImageResource.ImageOptions;
 import com.google.gwt.resources.client.ImageResource.RepeatStyle;
@@ -103,11 +101,6 @@
     assertFalse(a.getURL().equals(r.i16x16().getURL()));
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testDedup() {
     Resources r = GWT.create(Resources.class);
 
diff --git a/user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java b/user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java
index 9e19e29..1967fdf 100644
--- a/user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java
+++ b/user/test/com/google/gwt/uibinder/test/client/UiBinderTest.java
@@ -21,8 +21,6 @@
 import com.google.gwt.dom.client.Element;
 import com.google.gwt.dom.client.ParagraphElement;
 import com.google.gwt.dom.client.SpanElement;
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.junit.client.GWTTestCase;
 import com.google.gwt.resources.client.ClientBundle;
 import com.google.gwt.resources.client.ImageResource;
@@ -43,7 +41,6 @@
 /**
  * Functional test of UiBinder.
  */
-@DoNotRunWith({Platform.HtmlUnitBug})
 public class UiBinderTest extends GWTTestCase {
   private WidgetBasedUi widgetUi;
   private DomBasedUi domUi;
@@ -344,7 +341,6 @@
     WidgetBasedUi.Style style();
   }
 
-  @DoNotRunWith(Platform.HtmlUnitBug)
   public void testNoOverrideInheritedSharedCssClasses() {
     Bundle bundle = GWT.create(Bundle.class);
     WidgetBasedUi ui = GWT.create(WidgetBasedUi.class);
@@ -470,7 +466,6 @@
     assertNotNull(widgetUi.heartCursorResource.getUrl());
   }
 
-  @DoNotRunWith(Platform.HtmlUnitBug)
   public void testCssImportedScopes() {
     assertEquals(100, widgetUi.cssImportScopeSample.inner.getOffsetWidth());
   }
diff --git a/user/test/com/google/gwt/user/client/EventTest.java b/user/test/com/google/gwt/user/client/EventTest.java
index a4c3545..9769241 100644
--- a/user/test/com/google/gwt/user/client/EventTest.java
+++ b/user/test/com/google/gwt/user/client/EventTest.java
@@ -23,8 +23,6 @@
 import com.google.gwt.event.dom.client.DoubleClickHandler;
 import com.google.gwt.event.dom.client.HasDoubleClickHandlers;
 import com.google.gwt.event.shared.HandlerRegistration;
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.junit.client.GWTTestCase;
 import com.google.gwt.user.client.Event.NativePreviewEvent;
 import com.google.gwt.user.client.Event.NativePreviewHandler;
@@ -33,10 +31,7 @@
 
 /**
  * Test Case for {@link Event}.
- * Failed intermittently due to threading issues with HtmlUnit.
- * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
  */
-@DoNotRunWith({Platform.HtmlUnit})
 public class EventTest extends GWTTestCase {
   /**
    * An EventPreview used for testing.
@@ -128,10 +123,7 @@
    * Test that concurrent removal of a {@link NativePreviewHandler} does not
    * trigger an exception. The handler should not actually be removed until the
    * end of the event loop.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testConcurrentRemovalOfNativePreviewHandler() {
     // Add handler0
     final TestNativePreviewHandler handler0 = new TestNativePreviewHandler(
@@ -160,10 +152,7 @@
   /**
    * Test that a double click results in exactly one simulated click event in
    * IE. See issue 3392 for more info.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */  
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testDoubleClickEvent() {
     TestLabel label = new TestLabel();
     RootPanel.get().add(label);
diff --git a/user/test/com/google/gwt/user/client/HistoryDisabledTest.java b/user/test/com/google/gwt/user/client/HistoryDisabledTest.java
index 6f70a11..4b4b138 100644
--- a/user/test/com/google/gwt/user/client/HistoryDisabledTest.java
+++ b/user/test/com/google/gwt/user/client/HistoryDisabledTest.java
@@ -18,8 +18,6 @@
 import com.google.gwt.event.logical.shared.ValueChangeEvent;
 import com.google.gwt.event.logical.shared.ValueChangeHandler;
 import com.google.gwt.event.shared.HandlerRegistration;
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.junit.client.GWTTestCase;
 
 /**
@@ -33,11 +31,6 @@
     return "com.google.gwt.user.HistoryDisabledTest";
   }
 
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   @SuppressWarnings("deprecation")
   public void testAddHistoryListener() {
     HistoryListener listener = new HistoryListener() {
@@ -48,11 +41,6 @@
     History.removeHistoryListener(listener);
   }
 
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testAddValueChangeHandler() {
     HandlerRegistration reg = History.addValueChangeHandler(new ValueChangeHandler<String>() {
       public void onValueChange(ValueChangeEvent<String> event) {
@@ -61,11 +49,6 @@
     assertNull(reg);
   }
 
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testFireCurrentHistoryState() {
     HandlerRegistration reg = History.addValueChangeHandler(new ValueChangeHandler<String>() {
       public void onValueChange(ValueChangeEvent<String> event) {
@@ -76,11 +59,6 @@
     History.fireCurrentHistoryState();
   }
 
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   @SuppressWarnings("deprecation")
   public void testOnHistoryChanged() {
     HandlerRegistration reg = History.addValueChangeHandler(new ValueChangeHandler<String>() {
diff --git a/user/test/com/google/gwt/user/client/WindowTest.java b/user/test/com/google/gwt/user/client/WindowTest.java
index 3023677..82e04da 100644
--- a/user/test/com/google/gwt/user/client/WindowTest.java
+++ b/user/test/com/google/gwt/user/client/WindowTest.java
@@ -192,7 +192,7 @@
    * Failed in all modes due to HtmlUnit bug:
    * https://sourceforge.net/tracker/?func=detail&aid=2944261&group_id=47038&atid=448266
    */
-  @DoNotRunWith({Platform.HtmlUnitBug})
+  @DoNotRunWith(Platform.HtmlUnitBug)
   public void testGetClientSize() {
 
     // NOTE: We must clear the DOM here so that previous tests do not pollute
@@ -350,7 +350,7 @@
   /**
    * Tests the ability of resize the Window and catch resize events.
    */
-  @DoNotRunWith({Platform.HtmlUnitBug})
+  @DoNotRunWith({Platform.HtmlUnitLayout})
   public void testResizing() {
     clearBodyContent();
 
@@ -393,8 +393,10 @@
    * Tests the ability of scroll the Window and catch scroll events.
    * Failed in all modes due to HtmlUnit bug:
    * https://sourceforge.net/tracker/?func=detail&aid=2897457&group_id=47038&atid=448266
+   * <p>
+   * TODO(flin): it is marked fixed, but is still not fixed.
    */
-  @DoNotRunWith({Platform.HtmlUnitBug})
+  @DoNotRunWith(Platform.HtmlUnitBug)
   public void testScrolling() {
     // Force scroll bars to appear
     Window.enableScrolling(true);
diff --git a/user/test/com/google/gwt/user/client/rpc/UnicodeEscapingTest.java b/user/test/com/google/gwt/user/client/rpc/UnicodeEscapingTest.java
index 44509bc..6243653 100644
--- a/user/test/com/google/gwt/user/client/rpc/UnicodeEscapingTest.java
+++ b/user/test/com/google/gwt/user/client/rpc/UnicodeEscapingTest.java
@@ -129,10 +129,7 @@
    * equivalent in that case.
    * 
    * @throws InvalidCharacterException
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith(Platform.HtmlUnit)
   public void testClientToServerBMPHigh() throws InvalidCharacterException {
     delayTestFinish(TEST_FINISH_DELAY_MS);
     clientToServerVerifyRange(Character.MAX_SURROGATE + 1,
@@ -154,10 +151,7 @@
    * equivalent in that case.
    * 
    * @throws InvalidCharacterException
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith(Platform.HtmlUnit)
   public void testClientToServerBMPLow() throws InvalidCharacterException {
     delayTestFinish(TEST_FINISH_DELAY_MS);
     clientToServerVerifyRange(Character.MIN_CODE_POINT,
@@ -174,10 +168,7 @@
    * equivalent in that case.
    * 
    * @throws InvalidCharacterException
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith(Platform.HtmlUnit)
   public void testClientToServerNonBMP() throws InvalidCharacterException {
     delayTestFinish(TEST_FINISH_DELAY_MS);
     clientToServerVerifyRange(Character.MIN_SUPPLEMENTARY_CODE_POINT,
@@ -194,10 +185,8 @@
    * issue, particularly with combining marks, though they should be logically
    * equivalent in that case.  Surrogate characters are also not tested here,
    * see {@link #disabled_testServerToClientBMPSurrogates()}.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith(Platform.HtmlUnit)
+  @DoNotRunWith(Platform.HtmlUnitBug)
   public void testServerToClientBMP() {
     delayTestFinish(TEST_FINISH_DELAY_MS);
     serverToClientVerify(Character.MIN_CODE_POINT,
diff --git a/user/test/com/google/gwt/user/client/ui/AnchorTest.java b/user/test/com/google/gwt/user/client/ui/AnchorTest.java
index b0627a5..076e5aa 100644
--- a/user/test/com/google/gwt/user/client/ui/AnchorTest.java
+++ b/user/test/com/google/gwt/user/client/ui/AnchorTest.java
@@ -19,8 +19,6 @@
 import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.event.dom.client.ClickHandler;
 import com.google.gwt.i18n.client.HasDirection;
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.junit.client.GWTTestCase;
 import com.google.gwt.user.client.DOM;
 
@@ -54,11 +52,6 @@
     return "com.google.gwt.user.UserTest";
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testProperties() {
     Anchor anchor = new Anchor("foo", TEST_URL0);
     assertEquals("foo", anchor.getText());
@@ -103,11 +96,6 @@
     }
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testNoAttributes() {
     Anchor anchor = new Anchor();
 
@@ -125,11 +113,6 @@
     }
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testScriptAnchor() {
     Anchor anchor = new Anchor("Foo");
 
@@ -146,11 +129,6 @@
     }
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testScriptAnchorWithHTML() {
     Anchor anchor = new Anchor("<span>Foo</span>", true);
 
@@ -167,11 +145,6 @@
     }
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testEvents() {
     Anchor anchor = new Anchor("Trigger obscure JavaScript things");
 
@@ -193,11 +166,6 @@
     assertEquals(anchor, handler.getLastSender());
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testLink() {
     Anchor anchor = new Anchor("Click me!", "http://nowhere.org/");
 
diff --git a/user/test/com/google/gwt/user/client/ui/DOMTest.java b/user/test/com/google/gwt/user/client/ui/DOMTest.java
index fd26bfc..17e09b9 100644
--- a/user/test/com/google/gwt/user/client/ui/DOMTest.java
+++ b/user/test/com/google/gwt/user/client/ui/DOMTest.java
@@ -119,10 +119,7 @@
   /**
    * Tests {@link DOM#getAbsoluteLeft(Element)} and
    * {@link DOM#getAbsoluteTop(Element)}.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith(Platform.HtmlUnit)
   public void testGetAbsolutePosition() {
     final int border = 8;
     final int margin = 9;
@@ -159,6 +156,7 @@
    * contains children and has scrollbars. See issue #1093 for more details.
    * 
    */
+  @DoNotRunWith(Platform.HtmlUnitLayout)
   public void testGetAbsolutePositionWhenScrolled() {
     final Element outer = DOM.createDiv();
     final Element inner = DOM.createDiv();
diff --git a/user/test/com/google/gwt/user/client/ui/DialogBoxTest.java b/user/test/com/google/gwt/user/client/ui/DialogBoxTest.java
index b6d6ee9..4527bb5 100644
--- a/user/test/com/google/gwt/user/client/ui/DialogBoxTest.java
+++ b/user/test/com/google/gwt/user/client/ui/DialogBoxTest.java
@@ -17,8 +17,6 @@
 
 import com.google.gwt.event.dom.client.ClickEvent;
 import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.DOM;
 import com.google.gwt.user.client.DeferredCommand;
@@ -35,10 +33,7 @@
 
   /**
    * Test the accessors.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith({Platform.HtmlUnit})
   @Override
   public void testAccessors() {
     super.testAccessors();
@@ -76,11 +71,6 @@
     assertTrue(dialogBox.getHTML().equalsIgnoreCase("<b>text</b>"));
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testSimpleCloseButtonOnModalDialog() {
     final DialogBox dialogBox = new DialogBox(false, true);
     Button button = new Button();
@@ -95,11 +85,6 @@
     assertFalse(dialogBox.isShowing());
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testDebugId() {
     DialogBox dBox = new DialogBox();
     dBox.setAnimationEnabled(false);
@@ -125,12 +110,7 @@
     });
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
   @Override
-  @DoNotRunWith(Platform.HtmlUnit)
   public void testDependantPopupPanel() {
     // Create the dependent popup
     final PopupPanel dependantPopup = createPopupPanel();
diff --git a/user/test/com/google/gwt/user/client/ui/DockPanelTest.java b/user/test/com/google/gwt/user/client/ui/DockPanelTest.java
index 97edd98..85bf22b 100644
--- a/user/test/com/google/gwt/user/client/ui/DockPanelTest.java
+++ b/user/test/com/google/gwt/user/client/ui/DockPanelTest.java
@@ -15,8 +15,6 @@
  */
 package com.google.gwt.user.client.ui;
 
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.junit.client.GWTTestCase;
 import com.google.gwt.user.client.DOM;
 import com.google.gwt.user.client.Element;
@@ -115,11 +113,6 @@
     assertTrue(((DockPanel.LayoutData) l4.getLayoutData()).direction == DockPanel.NORTH);
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testAttachDetachOrder() {
     HasWidgetsTester.testAll(new DockPanel(), new Adder(), true);
   }
diff --git a/user/test/com/google/gwt/user/client/ui/FormPanelTest.java b/user/test/com/google/gwt/user/client/ui/FormPanelTest.java
index eb53fd2..26abbe6 100644
--- a/user/test/com/google/gwt/user/client/ui/FormPanelTest.java
+++ b/user/test/com/google/gwt/user/client/ui/FormPanelTest.java
@@ -19,8 +19,6 @@
 import com.google.gwt.dom.client.Document;
 import com.google.gwt.dom.client.Element;
 import com.google.gwt.dom.client.InputElement;
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.user.client.Timer;
 import com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent;
 import com.google.gwt.user.client.ui.FormPanel.SubmitCompleteHandler;
@@ -31,10 +29,7 @@
  * Tests the FormPanel.
  * 
  * @see com.google.gwt.user.server.ui.FormPanelTestServlet
- * Failed intermittently due to threading issues with HtmlUnit.
- * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
  */
-@DoNotRunWith({Platform.HtmlUnit})
 public class FormPanelTest extends SimplePanelTestBase<FormPanel> {
   
   /**
@@ -49,11 +44,6 @@
     return "com.google.gwt.user.FormPanelTest";
   }
 
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testCancelSubmit() {
     TextBox tb = new TextBox();
     tb.setName("q");
@@ -76,12 +66,6 @@
     form.submit();
   }
 
-  /**
-   * Tests uploading a file using post & multipart encoding.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testFileUpload() {
     final FormPanel form = new FormPanel();
     form.setMethod(FormPanel.METHOD_POST);
@@ -111,10 +95,7 @@
   /**
    * Tests submitting using url-encoded get, with all form widgets (other than
    * FileUpload, which requires post/multipart.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testMethodGet() {
     final FormPanel form = new FormPanel();
     form.setMethod(FormPanel.METHOD_GET);
@@ -179,11 +160,6 @@
     form.submit();
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testNamedTargetSubmitEvent() {
     // Create a form and frame in the document we can wrap.
     String iframeId = Document.get().createUniqueId();
@@ -216,11 +192,6 @@
     Document.get().getElementById("submitBtn").<InputElement>cast().click();
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testReset() {
     FormPanel form = new FormPanel();
     RootPanel.get().add(form);
@@ -233,11 +204,6 @@
     RootPanel.get().remove(form);
   }
 
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testSubmitAndHideDialog() {
     final FormPanel form = new FormPanel();
     form.setMethod(FormPanel.METHOD_GET);
@@ -271,10 +237,7 @@
 
   /**
    * Tests submitting an alternate frame.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testSubmitFrame() {
     final NamedFrame frame = new NamedFrame("myFrame");
     FormPanel form = new FormPanel(frame);
@@ -353,11 +316,6 @@
     }
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testWrappedFormWithIFrame() {
     // Create a form and frame in the document we can wrap.
     final Element container = Document.get().createDivElement();
diff --git a/user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java b/user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java
index 8e52c98..6e71cb6 100644
--- a/user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java
+++ b/user/test/com/google/gwt/user/client/ui/HTMLPanelTest.java
@@ -17,8 +17,6 @@
 
 import com.google.gwt.dom.client.Element;
 import com.google.gwt.dom.client.Node;
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.junit.client.GWTTestCase;
 
 /**
@@ -71,10 +69,7 @@
    * move its element to a hidden div so that getElementById() would work.
    * Unfortunately, we didn't move it back to its original parent, causing
    * a problem in the case described in this test.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testAddPartiallyAttached() {
     SimplePanel sp = new SimplePanel();
     HTMLPanel p = new HTMLPanel("<div id='foo'></div>");
@@ -93,10 +88,7 @@
 
   /**
    * Tests child attachment order using {@link HasWidgetsTester}.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testAttachDetachOrder() {
     HTMLPanel p = new HTMLPanel("<div id='w00t'></div>");
     HasWidgetsTester.testAll(p, new Adder(), true);
@@ -105,10 +97,7 @@
   /**
    * Ensures that attachToDomAndGetElement() puts the HTMLPanel back exactly
    * where it was in the DOM originally.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testAttachDoesntMangleChildOrder() {
     FlowPanel fp = new FlowPanel();
 
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 2fb3bd5..5bb315d 100644
--- a/user/test/com/google/gwt/user/client/ui/HistoryTest.java
+++ b/user/test/com/google/gwt/user/client/ui/HistoryTest.java
@@ -94,10 +94,7 @@
   /*
    * Tests against issue #879: Ensure that empty history tokens do not add
    * additional characters after the '#' symbol in the URL.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith(Platform.HtmlUnit)
   public void testEmptyHistoryTokens() {
     delayTestFinish(5000);
 
@@ -125,10 +122,7 @@
 
   /**
    * Verify that no events are issued via newItem if there were not reqeuested.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith(Platform.HtmlUnit)
   public void testNoEvents() {
     delayTestFinish(5000);
     addHistoryListenerImpl(new HistoryListener() {
@@ -270,10 +264,7 @@
    * Test against issue #2500. IE6 has a bug that causes it to not report any
    * part of the current fragment after a '?' when read from location.hash; make
    * sure that on affected browsers, we're not relying on this.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testTokenWithQuestionmark() {
     delayTestFinish(5000);
     final String token = "foo?bar";
@@ -293,10 +284,10 @@
   /**
    * Test that using an empty history token works properly. There have been
    * problems (see issue 2905) with this in the past on Safari.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
+   * <p>
+   * Seems like a HtmlUnit bug. Need more investigation.
    */
-  @DoNotRunWith(Platform.HtmlUnit)
+  @DoNotRunWith(Platform.HtmlUnitBug)
   public void testEmptyHistoryToken() {
     final ArrayList<Object> counter = new ArrayList<Object>();
 
diff --git a/user/test/com/google/gwt/user/client/ui/ImageTest.java b/user/test/com/google/gwt/user/client/ui/ImageTest.java
index 202f61b..e3d6fbd 100644
--- a/user/test/com/google/gwt/user/client/ui/ImageTest.java
+++ b/user/test/com/google/gwt/user/client/ui/ImageTest.java
@@ -33,7 +33,6 @@
  * Tests for the Image widget. Images in both clipped mode and unclipped mode
  * are tested, along with the transitions between the two modes.
  */
-@DoNotRunWith({Platform.HtmlUnitBug})
 public class ImageTest extends GWTTestCase {
   interface Bundle extends ClientBundle {
     ImageResource prettyPiccy();
@@ -134,6 +133,7 @@
   /**
    * Tests the transition from the clipped state to the unclipped state.
    */
+  @DoNotRunWith(Platform.HtmlUnitUnknown)
   public void testChangeClippedImageToUnclipped() {
     final Image image = new Image("counting-forwards.png", 12, 13, 8, 8);
     assertEquals("clipped", getCurrentImageStateName(image));
@@ -164,6 +164,7 @@
   /**
    * Tests the transition from the unclipped state to the clipped state.
    */
+  @DoNotRunWith(Platform.HtmlUnitUnknown)
   public void testChangeImageToClipped() {
     final Image image = new Image("counting-forwards.png");
     assertEquals("unclipped", getCurrentImageStateName(image));
@@ -195,6 +196,7 @@
   /**
    * Tests the creation of an image in unclipped mode.
    */
+  @DoNotRunWith(Platform.HtmlUnitUnknown)
   public void testCreateImage() {
     final Image image = new Image("counting-forwards.png");
 
@@ -221,6 +223,7 @@
   /**
    * Tests the creation of an image that does not exist.
    */
+  @DoNotRunWith(Platform.HtmlUnitUnknown)
   public void testCreateImageWithError() {
     final Image image = new Image("imageDoesNotExist.png");
 
@@ -270,6 +273,7 @@
    * <code>setUrlAndVisibleRect(String, int, int, int, int)</code> method on an
    * unclipped image, which causes a state transition to the clipped state.
    */
+  @DoNotRunWith(Platform.HtmlUnitUnknown)
   public void testSetUrlAndVisibleRectOnUnclippedImage() {
     final Image image = new Image("counting-backwards.png");
     assertEquals("unclipped", getCurrentImageStateName(image));
diff --git a/user/test/com/google/gwt/user/client/ui/ListBoxTest.java b/user/test/com/google/gwt/user/client/ui/ListBoxTest.java
index 3fe246b..eb06f9e 100644
--- a/user/test/com/google/gwt/user/client/ui/ListBoxTest.java
+++ b/user/test/com/google/gwt/user/client/ui/ListBoxTest.java
@@ -15,8 +15,6 @@
  */
 package com.google.gwt.user.client.ui;
 
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.junit.client.GWTTestCase;
 import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.DeferredCommand;
@@ -40,11 +38,6 @@
     assertEquals(0, lb.getItemCount());
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testDebugId() {
     ListBox list = new ListBox();
     list.addItem("option0", "value0");
diff --git a/user/test/com/google/gwt/user/client/ui/MenuBarTest.java b/user/test/com/google/gwt/user/client/ui/MenuBarTest.java
index 058f2df..f08931f 100644
--- a/user/test/com/google/gwt/user/client/ui/MenuBarTest.java
+++ b/user/test/com/google/gwt/user/client/ui/MenuBarTest.java
@@ -128,9 +128,6 @@
     assertNull(l1.getPopup());
   }
 
-  /*
-   * Failed in all modes with HtmlUnit.
-   */
   @DoNotRunWith({Platform.HtmlUnitBug})
   public void testBlur() {
     // Create a menu bar with children.
@@ -149,11 +146,6 @@
     assertNull(menu.getSelectedItem());
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testEscapeKey() {
     // Create a menu bar with children.
     MenuBar l0 = new MenuBar();
@@ -281,11 +273,6 @@
     assertNull(bar.getSelectedItem());
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testDebugId() {
     // Create a sub menu
     MenuBar subMenu = new MenuBar(true);
@@ -356,11 +343,6 @@
     assertNull(bar.getSelectedItem());
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testTabKey() {
     // Create a menu bar with children.
     MenuBar l0 = new MenuBar();
diff --git a/user/test/com/google/gwt/user/client/ui/PanelTestBase.java b/user/test/com/google/gwt/user/client/ui/PanelTestBase.java
index b87c82d..9ebdeb6 100644
--- a/user/test/com/google/gwt/user/client/ui/PanelTestBase.java
+++ b/user/test/com/google/gwt/user/client/ui/PanelTestBase.java
@@ -15,9 +15,6 @@
  */
 package com.google.gwt.user.client.ui;
 
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
-
 /**
  * Base tests for classes that extend {@link Panel}
  * 
@@ -32,11 +29,6 @@
         new HasWidgetsTester.DefaultWidgetAdder(), supportsMultipleWidgets());
   }
 
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testOnAttach() {
     // Used to call onDetach when not attached.
     Widget someWidget = new TextBox();
@@ -50,11 +42,6 @@
     RootPanel.get().setParent(null);
   }
 
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testRemoveWithError() {
     // Create a widget that will throw an exception onUnload.
     BadWidget badWidget = new BadWidget();
diff --git a/user/test/com/google/gwt/user/client/ui/PopupTest.java b/user/test/com/google/gwt/user/client/ui/PopupTest.java
index d6de326..fd42c3d 100644
--- a/user/test/com/google/gwt/user/client/ui/PopupTest.java
+++ b/user/test/com/google/gwt/user/client/ui/PopupTest.java
@@ -20,8 +20,6 @@
 import com.google.gwt.dom.client.Element;
 import com.google.gwt.event.logical.shared.CloseEvent;
 import com.google.gwt.event.logical.shared.CloseHandler;
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.junit.client.GWTTestCase;
 import com.google.gwt.user.client.History;
 import com.google.gwt.user.client.Timer;
@@ -30,7 +28,6 @@
 /**
  * Tests for {@link PopupPanel}.
  */
-@DoNotRunWith({Platform.HtmlUnit})
 public class PopupTest extends GWTTestCase {
 
   /**
@@ -147,10 +144,7 @@
   /**
    * Tests that a large PopupPanel is not positioned off the top or left edges
    * of the browser window, making part of the panel unreachable.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testCenterLargePopup() {
     PopupPanel popup = new PopupPanel();
     popup.setHeight("4096px");
@@ -167,10 +161,7 @@
    * into conflicts with the animations. The {@link MenuBar} exhibits this
    * behavior because, when we detach a {@link MenuBar} from the page, it closes
    * all of its sub menus, each located in a different {@link PopupPanel}.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testDependantPopupPanel() {
     // Create the dependent popup
     final PopupPanel dependantPopup = createPopupPanel();
@@ -326,11 +317,6 @@
     }
   }
 
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testPopup() {
     // Get rid of window margins so we can test absolute position.
     Window.setMargin("0px");
diff --git a/user/test/com/google/gwt/user/client/ui/RichTextAreaTest.java b/user/test/com/google/gwt/user/client/ui/RichTextAreaTest.java
index 3d3c99e..b14d7cf 100644
--- a/user/test/com/google/gwt/user/client/ui/RichTextAreaTest.java
+++ b/user/test/com/google/gwt/user/client/ui/RichTextAreaTest.java
@@ -39,10 +39,8 @@
    * Test that removing and re-adding an RTA doesn't destroy its contents (Only
    * IE actually preserves dynamically-created iframe contents across DOM
    * removal/re-adding).
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith({Platform.HtmlUnit})
+  @DoNotRunWith(Platform.HtmlUnitUnknown)
   public void testAddEditRemoveAdd() {
     final RichTextArea area = new RichTextArea();
     delayTestFinish(RICH_TEXT_ASYNC_DELAY);
@@ -91,11 +89,7 @@
     }
   }
 
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
+  @DoNotRunWith(Platform.HtmlUnitUnknown)
   public void testFormatAfterInitialize() {
     final RichTextArea area = new RichTextArea();
 
@@ -132,11 +126,7 @@
     }
   }
 
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
+  @DoNotRunWith(Platform.HtmlUnitUnknown)
   public void testFormatWhenHidden() {
     final RichTextArea area = new RichTextArea();
     delayTestFinish(RICH_TEXT_ASYNC_DELAY);
@@ -158,11 +148,7 @@
   /**
    * See that the custom InitializeEvent fires.
    */
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
+  @DoNotRunWith({Platform.HtmlUnitUnknown})
   public void testRichTextInitializeEvent() {
     delayTestFinish(RICH_TEXT_ASYNC_DELAY);
     final RichTextArea richTextArea = new RichTextArea();
@@ -177,11 +163,7 @@
   /**
    * Test that a delayed call to setEnable is reflected.
    */
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
+  @DoNotRunWith(Platform.HtmlUnitUnknown)
   public void testSetEnabledAfterInit() {
     final RichTextArea richTextArea = new RichTextArea();
     delayTestFinish(RICH_TEXT_ASYNC_DELAY);
@@ -201,11 +183,7 @@
    * Test that a call to setEnable is reflected immediately, and after the area
    * loads.
    */
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
+  @DoNotRunWith(Platform.HtmlUnitUnknown)
   public void testSetEnabledBeforeInit() {
     final RichTextArea richTextArea = new RichTextArea();
     richTextArea.setEnabled(false);
@@ -225,11 +203,7 @@
    * Test that a delayed set of HTML is reflected. Some platforms have timing
    * subtleties that need to be tested.
    */
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
+  @DoNotRunWith(Platform.HtmlUnitUnknown)
   public void testSetHTMLAfterInit() {
     final RichTextArea richTextArea = new RichTextArea();    
     delayTestFinish(RICH_TEXT_ASYNC_DELAY);
@@ -247,11 +221,7 @@
    * Test that an immediate set of HTML is reflected immediately and after the
    * area loads. Some platforms have timing subtleties that need to be tested.
    */
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
+  @DoNotRunWith(Platform.HtmlUnitUnknown)
   public void testSetHTMLBeforeInit() {
     final RichTextArea richTextArea = new RichTextArea();
     delayTestFinish(RICH_TEXT_ASYNC_DELAY);
@@ -275,11 +245,7 @@
    * Test that delayed set of text is reflected. Some platforms have timing
    * subtleties that need to be tested.
    */
-  /**
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
+  @DoNotRunWith(Platform.HtmlUnitUnknown)
   public void testSetTextAfterInit() {
     final RichTextArea richTextArea = new RichTextArea();
     delayTestFinish(RICH_TEXT_ASYNC_DELAY);
@@ -296,10 +262,8 @@
   /**
    * Test that an immediate set of text is reflected immediately and after the
    * area loads. Some platforms have timing subtleties that need to be tested.
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
    */
-  @DoNotRunWith({Platform.HtmlUnit})
+  @DoNotRunWith(Platform.HtmlUnitUnknown)
   public void testSetTextBeforeInit() {
     final RichTextArea richTextArea = new RichTextArea();
     richTextArea.setText("foo");
diff --git a/user/test/com/google/gwt/user/client/ui/StackPanelTest.java b/user/test/com/google/gwt/user/client/ui/StackPanelTest.java
index 718d7e6..4bf82e6 100644
--- a/user/test/com/google/gwt/user/client/ui/StackPanelTest.java
+++ b/user/test/com/google/gwt/user/client/ui/StackPanelTest.java
@@ -15,8 +15,6 @@
  */
 package com.google.gwt.user.client.ui;
 
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.user.client.Command;
 import com.google.gwt.user.client.DOM;
 import com.google.gwt.user.client.DeferredCommand;
@@ -56,7 +54,6 @@
     HasWidgetsTester.testAll(createStackPanel(), new Adder(), true);
   }
 
-  @DoNotRunWith(Platform.HtmlUnitBug)
   public void testDebugId() {
     final StackPanel p = createStackPanel();
     Label a = new Label("a");
diff --git a/user/test/com/google/gwt/user/client/ui/TabLayoutPanelTest.java b/user/test/com/google/gwt/user/client/ui/TabLayoutPanelTest.java
index 371375c..b8d59d2 100644
--- a/user/test/com/google/gwt/user/client/ui/TabLayoutPanelTest.java
+++ b/user/test/com/google/gwt/user/client/ui/TabLayoutPanelTest.java
@@ -252,7 +252,7 @@
   /**
    * Tests that tabs actually line up properly (see issue 4447).
    */
-  @DoNotRunWith({Platform.HtmlUnitBug})
+  @DoNotRunWith(Platform.HtmlUnitLayout)
   public void testTabLayout() {
     TabLayoutPanel p = new TabLayoutPanel(2, Unit.EM);
     RootPanel.get().add(p);
diff --git a/user/test/com/google/gwt/user/client/ui/TreeItemTest.java b/user/test/com/google/gwt/user/client/ui/TreeItemTest.java
index 3c6b443..8e037d8 100644
--- a/user/test/com/google/gwt/user/client/ui/TreeItemTest.java
+++ b/user/test/com/google/gwt/user/client/ui/TreeItemTest.java
@@ -15,8 +15,6 @@
  */
 package com.google.gwt.user.client.ui;
 
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.junit.client.GWTTestCase;
 
 /**
@@ -41,11 +39,6 @@
     assertEquals("Test", widget.getText());
   }
 
-  /*
-   * Failed intermittently due to threading issues with HtmlUnit.
-   * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
-   */
-  @DoNotRunWith({Platform.HtmlUnit})
   public void testSetWidgetNullWithError() {
     // Create a widget that will throw an exception onUnload.
     BadWidget badWidget = new BadWidget();
diff --git a/user/test/com/google/gwt/user/client/ui/TreeTest.java b/user/test/com/google/gwt/user/client/ui/TreeTest.java
index 10c607c..b581cf9 100644
--- a/user/test/com/google/gwt/user/client/ui/TreeTest.java
+++ b/user/test/com/google/gwt/user/client/ui/TreeTest.java
@@ -15,8 +15,6 @@
  */
 package com.google.gwt.user.client.ui;
 
-import com.google.gwt.junit.DoNotRunWith;
-import com.google.gwt.junit.Platform;
 import com.google.gwt.junit.client.GWTTestCase;
 import com.google.gwt.user.client.DOM;
 import com.google.gwt.user.client.Element;
@@ -25,10 +23,7 @@
 
 /**
  * Tests the Tree widget.
- * Failed intermittently due to threading issues with HtmlUnit.
- * http://code.google.com/p/google-web-toolkit/issues/detail?id=4496
  */
-@DoNotRunWith({Platform.HtmlUnit})
 public class TreeTest extends GWTTestCase {
 
   static class Adder implements HasWidgetsTester.WidgetAdder {
