testDebugId was calling delayTestFinish too late, leading to flakiness

Review by amitmanjhi


git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@6267 8db76d5a-ed1c-0410-87a9-c151d255dfc7
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 0e6ab61..4bf82e6 100644
--- a/user/test/com/google/gwt/user/client/ui/StackPanelTest.java
+++ b/user/test/com/google/gwt/user/client/ui/StackPanelTest.java
@@ -1,12 +1,12 @@
 /*
  * Copyright 2008 Google Inc.
- * 
+ *
  * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  * use this file except in compliance with the License. You may obtain a copy of
  * the License at
- * 
+ *
  * http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -75,6 +75,8 @@
     UIObjectTest.assertDebugId("myStack-content2",
         DOM.getParent(c.getElement()));
 
+    delayTestFinish(5000);
+
     // Check the header IDs
     DeferredCommand.addCommand(new Command() {
       public void execute() {
@@ -97,7 +99,6 @@
         finishTest();
       }
     });
-    delayTestFinish(5000);
   }
 
   /**