From: <mgu...@us...> - 2013-01-08 10:39:42
|
Revision: 7963 http://sourceforge.net/p/htmlunit/code/7963 Author: mguillem Date: 2013-01-08 10:39:38 +0000 (Tue, 08 Jan 2013) Log Message: ----------- It looks likes TreeWalker.expandEntityReferences is always false for FF17. Modified Paths: -------------- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/TreeWalker.java trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/TreeWalkerTest.java Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2013-01-08 10:15:02 UTC (rev 7962) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/BrowserVersionFeatures.java 2013-01-08 10:39:38 UTC (rev 7963) @@ -1050,6 +1050,11 @@ @BrowserFeature(@WebBrowser(IE)) JS_TEXT_AREA_SET_COLS_THROWS_EXCEPTION, + /** It looks likes TreeWalker.expandEntityReferences is always <code>false</code> for FF17. + */ + @BrowserFeature(@WebBrowser(value = FF, minVersion = 17)) + JS_TREEWALKER_EXPAND_ENTITY_REFERENCES_FALSE, + /** Changing the opener of an window to something not null * is not valid (in FF). */ Modified: trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/TreeWalker.java =================================================================== --- trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/TreeWalker.java 2013-01-08 10:15:02 UTC (rev 7962) +++ trunk/htmlunit/src/main/java/com/gargoylesoftware/htmlunit/javascript/host/TreeWalker.java 2013-01-08 10:39:38 UTC (rev 7963) @@ -64,7 +64,7 @@ public TreeWalker(final Node root, final long whatToShow, final NodeFilter filter, - final Boolean expandEntityReferences) throws DOMException { + final boolean expandEntityReferences) throws DOMException { if (root == null) { Context.throwAsScriptRuntimeEx(new DOMException(DOMException.NOT_SUPPORTED_ERR, "root must not be null")); @@ -72,7 +72,7 @@ root_ = root; whatToShow_ = whatToShow; filter_ = filter; - expandEntityReferences_ = expandEntityReferences.booleanValue(); + expandEntityReferences_ = expandEntityReferences; currentNode_ = root_; } Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/TreeWalkerTest.java =================================================================== --- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/TreeWalkerTest.java 2013-01-08 10:15:02 UTC (rev 7962) +++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/host/TreeWalkerTest.java 2013-01-08 10:39:38 UTC (rev 7963) @@ -98,6 +98,7 @@ */ @Test @Alerts(DEFAULT = { "A", "A", "4294967295", "true" }, + FF17 = { "A", "A", "4294967295", "false" }, IE = "exception") public void getters2() throws Exception { final String script = "var theA = document.getElementById('theA');\n" @@ -112,6 +113,7 @@ */ @Test @Alerts(DEFAULT = { "BODY", "DIV", "1", "true" }, + FF17 = { "BODY", "DIV", "1", "false" }, IE = "exception") public void firstChild() throws Exception { final String script = @@ -127,6 +129,7 @@ */ @Test @Alerts(DEFAULT = { "BODY", "SPAN", "1", "true" }, + FF17 = { "BODY", "SPAN", "1", "false" }, IE = "exception") public void firstChild2() throws Exception { final String script = @@ -143,6 +146,7 @@ */ @Test @Alerts(DEFAULT = { "BODY", "P", "1", "true" }, + FF17 = { "BODY", "P", "1", "false" }, IE = "exception") public void lastChild() throws Exception { final String script = @@ -158,6 +162,7 @@ */ @Test @Alerts(DEFAULT = { "BODY", "SPAN", "1", "true" }, + FF17 = { "BODY", "SPAN", "1", "false" }, IE = "exception") public void lastChild2() throws Exception { final String script = @@ -174,6 +179,7 @@ */ @Test @Alerts(DEFAULT = { "BODY", "BODY", "1", "true", "null" }, + FF17 = { "BODY", "BODY", "1", "false", "null" }, IE = "exception") public void parentNode() throws Exception { final String script = @@ -191,6 +197,7 @@ */ @Test @Alerts(DEFAULT = { "BODY", "DIV", "1", "true" }, + FF17 = { "BODY", "DIV", "1", "false" }, IE = "exception") public void parentNode2() throws Exception { final String script = @@ -207,6 +214,7 @@ */ @Test @Alerts(DEFAULT = { "BODY", "P", "1", "true", "null" }, + FF17 = { "BODY", "P", "1", "false", "null" }, IE = "exception") public void siblings() throws Exception { final String script = @@ -224,6 +232,7 @@ */ @Test @Alerts(DEFAULT = { "BODY", "DIV", "1", "true", "null" }, + FF17 = { "BODY", "DIV", "1", "false", "null" }, IE = "exception") public void siblings2() throws Exception { final String script1 = |