diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 88d0ae08402..6ba23ef961f 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -8,6 +8,9 @@ + + core-js: Did another hack in the code to tread const in for-of loop's like let. + neko: Some missing end-of-file checks added (this fixes possible IndexOutOfBounds exceptions). diff --git a/src/test/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine2Test.java b/src/test/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine2Test.java index 85922347f79..f9e1924e3a9 100644 --- a/src/test/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine2Test.java +++ b/src/test/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine2Test.java @@ -1038,6 +1038,31 @@ public void constInLoop() throws Exception { loadPageVerifyTitle2(html); } + /** + * @throws Exception if the test fails + */ + @Test + @Alerts(DEFAULT = {"1", "2"}, + IE = {}) + @HtmlUnitNYI(IE = {"1", "2"}) + public void constInOfLoop() throws Exception { + final String html = "\n" + + "\n" + + "\n" + + "\n" + + ""; + + loadPageVerifyTitle2(html); + } + /** * @throws Exception if the test fails */