Title: [110398] trunk/LayoutTests
Revision
110398
Author
[email protected]
Date
2012-03-11 12:52:33 -0700 (Sun, 11 Mar 2012)

Log Message

Inconsistent SyntaxError from new Function(...)
https://bugs.webkit.org/show_bug.cgi?id=59795

Rubber stamped by Oliver Hunt.

* fast/js/function-constructor-error-expected.txt: Added.
* fast/js/function-constructor-error.html: Added.
* fast/js/script-tests/function-constructor-error.js: Added.
    - Adding test cases.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (110397 => 110398)


--- trunk/LayoutTests/ChangeLog	2012-03-11 19:50:14 UTC (rev 110397)
+++ trunk/LayoutTests/ChangeLog	2012-03-11 19:52:33 UTC (rev 110398)
@@ -1,3 +1,15 @@
+2012-03-11  Gavin Barraclough  <[email protected]>
+
+        Inconsistent SyntaxError from new Function(...)
+        https://bugs.webkit.org/show_bug.cgi?id=59795
+
+        Rubber stamped by Oliver Hunt.
+
+        * fast/js/function-constructor-error-expected.txt: Added.
+        * fast/js/function-constructor-error.html: Added.
+        * fast/js/script-tests/function-constructor-error.js: Added.
+            - Adding test cases.
+
 2012-03-09  Gavin Barraclough  <[email protected]>
 
         Object.freeze broken on latest Nightly

Added: trunk/LayoutTests/fast/js/function-constructor-error-expected.txt (0 => 110398)


--- trunk/LayoutTests/fast/js/function-constructor-error-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/js/function-constructor-error-expected.txt	2012-03-11 19:52:33 UTC (rev 110398)
@@ -0,0 +1,11 @@
+This test checks that the Function constructor detects some syntax errors correctly (bug#59795).
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS Function('(i + (j)') threw exception SyntaxError: Expected token ')'.
+PASS Function('return (i + (j)') threw exception SyntaxError: Expected token ')'.
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Added: trunk/LayoutTests/fast/js/function-constructor-error.html (0 => 110398)


--- trunk/LayoutTests/fast/js/function-constructor-error.html	                        (rev 0)
+++ trunk/LayoutTests/fast/js/function-constructor-error.html	2012-03-11 19:52:33 UTC (rev 110398)
@@ -0,0 +1,10 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<script src=""
+<script src=""
+</body>
+</html>

Added: trunk/LayoutTests/fast/js/script-tests/function-constructor-error.js (0 => 110398)


--- trunk/LayoutTests/fast/js/script-tests/function-constructor-error.js	                        (rev 0)
+++ trunk/LayoutTests/fast/js/script-tests/function-constructor-error.js	2012-03-11 19:52:33 UTC (rev 110398)
@@ -0,0 +1,6 @@
+description(
+"This test checks that the Function constructor detects some syntax errors correctly (bug#59795)."
+);
+
+shouldThrow("Function('(i + (j)')", '"SyntaxError: Expected token \')\'"');
+shouldThrow("Function('return (i + (j)')", '"SyntaxError: Expected token \')\'"');
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to