[HtmlUnit] SVN: [14622] trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/ javascript/JavaScriptEngine2Test.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[HtmlUnit] SVN: [14622] trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/ javascript/JavaScriptEngine2Test.java

HtmlUnit - Dev mailing list
Revision: 14622
          http://sourceforge.net/p/htmlunit/code/14622
Author:   rbri
Date:     2017-06-18 13:08:50 +0000 (Sun, 18 Jun 2017)
Log Message:
-----------
add a test that shows a difference of our js engine

Modified Paths:
--------------
    trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine2Test.java

Modified: trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine2Test.java
===================================================================
--- trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine2Test.java 2017-06-18 10:01:31 UTC (rev 14621)
+++ trunk/htmlunit/src/test/java/com/gargoylesoftware/htmlunit/javascript/JavaScriptEngine2Test.java 2017-06-18 13:08:50 UTC (rev 14622)
@@ -789,4 +789,25 @@
         verifyAlerts(driver, getExpectedAlerts());
     }
 
+    /**
+     * @throws Exception if the test fails
+     */
+    @Test
+    @Alerts({"t=undefined", "inside"})
+    @NotYetImplemented
+    public void functionHasNameOfVar() throws Exception {
+        final String html = "<html><head>\n"
+                + "<script>\n"
+                + "  function test() {\n"
+                + "    alert('t=' + t);\n"
+                + "    var t = 42;\n"
+                + "    ! function t() { alert('inside'); } ();\n"
+                + "  }\n"
+                + "</script>\n"
+                + "</head>\n"
+                + "<body onload='test()'>\n"
+                + "</body></html>";
+
+        loadPageWithAlerts2(html);
+    }
 }


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
HtmlUnit-develop mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop