Index: test/webkit/fast/js/function-constructor-error.js |
diff --git a/test/webkit/array-tostring-and-join.js b/test/webkit/fast/js/function-constructor-error.js |
similarity index 84% |
copy from test/webkit/array-tostring-and-join.js |
copy to test/webkit/fast/js/function-constructor-error.js |
index b4fdb51b47f0b450a53fc725a133c27a21c5375d..dbe43d34fc3d0fa8fa9dfdd4ccefda8dee42884c 100644 |
--- a/test/webkit/array-tostring-and-join.js |
+++ b/test/webkit/fast/js/function-constructor-error.js |
@@ -22,15 +22,8 @@ |
// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
description( |
- |
-"This test checks that toString and join share the same HashSet for visited elements." |
- |
+"This test checks that the Function constructor detects some syntax errors correctly (bug#59795)." |
); |
-var arr = [1, 2]; |
-var obj = {}; |
-obj.__proto__.toString = function() { return "*" + arr + "*"; } |
-arr[2] = arr; |
-arr[3] = obj; |
- |
-shouldBe("arr.join()", "'1,2,,**'"); |
+shouldThrow("Function('(i + (j)')", '"SyntaxError: Expected token \')\'"'); |
+shouldThrow("Function('return (i + (j)')", '"SyntaxError: Expected token \')\'"'); |