Disabling test for null on getBrowserById for DOM elements without DTD when running on Chrome 11 Review at http://gwt-code-reviews.appspot.com/1440801 git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10161 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/test/com/google/gwt/xml/client/XMLTest.java b/user/test/com/google/gwt/xml/client/XMLTest.java index 0e6c2c0..0e2ed0a 100644 --- a/user/test/com/google/gwt/xml/client/XMLTest.java +++ b/user/test/com/google/gwt/xml/client/XMLTest.java
@@ -18,6 +18,7 @@ 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.Window; import com.google.gwt.xml.client.impl.DOMParseException; import com.google.gwt.xml.client.impl.XMLParserImplSafari; @@ -129,7 +130,7 @@ top.appendChild(d.createCDATASection("klmnopqrst")); return d; } - + /** * Returns the module name for GWT unit test running. */ @@ -216,7 +217,10 @@ // we didn't define a dtd, so no id for us Element e1NodeDirect = d.getElementById("e1Id"); - assertNull(e1NodeDirect); + // Chrome 11 fails to implement this behavior + if (!Window.Navigator.getUserAgent().contains("Chrome/11.")) { + assertNull(e1NodeDirect); + } Document alienDoc = XMLParser.createDocument(); Node alienNode11 = alienDoc.importNode(e1Node, true);