Fixes UISuite breakage.
Tests related to absolute positioning were failing on Linux web mode; adding
a Window.setMargin(0) to each de-flakifies them.
Patch by: jgw
Review by: knorton
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@2156 8db76d5a-ed1c-0410-87a9-c151d255dfc7
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 c58977f..6ab2b9c 100644
--- a/user/test/com/google/gwt/user/client/ui/DOMTest.java
+++ b/user/test/com/google/gwt/user/client/ui/DOMTest.java
@@ -21,6 +21,7 @@
import com.google.gwt.user.client.DeferredCommand;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.Timer;
+import com.google.gwt.user.client.Window;
/**
* Tests standard DOM operations in the {@link DOM} class.
@@ -68,6 +69,10 @@
* {@link DOM#getAbsoluteTop(Element)}.
*/
public void testGetAbsolutePosition() {
+ // Since this test depends upon absolute positioning, clear the outer margin
+ // to ensure that the numbers are predictable.
+ Window.setMargin("0px");
+
final int border = 8;
final int margin = 9;
final int padding = 10;
@@ -103,6 +108,10 @@
*
*/
public void testGetAbsolutePositionWhenScrolled() {
+ // Since this test depends upon absolute positioning, clear the outer margin
+ // to ensure that the numbers are predictable.
+ Window.setMargin("0px");
+
final Element outer = DOM.createDiv();
final Element inner = DOM.createDiv();