Index: test/webkit/fast/js/date-negative-setmonth.js |
diff --git a/test/webkit/array-tostring-and-join.js b/test/webkit/fast/js/date-negative-setmonth.js |
similarity index 85% |
copy from test/webkit/array-tostring-and-join.js |
copy to test/webkit/fast/js/date-negative-setmonth.js |
index b4fdb51b47f0b450a53fc725a133c27a21c5375d..8fcd73d694378353e0f4178fb70e4c52ad22b1fb 100644 |
--- a/test/webkit/array-tostring-and-join.js |
+++ b/test/webkit/fast/js/date-negative-setmonth.js |
@@ -22,15 +22,9 @@ |
// 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 for a regression against <a href="https://bugs.webkit.org/show_bug.cgi?id=5280">Date.setMonth fails with negative values</a>.' |
); |
-var arr = [1, 2]; |
-var obj = {}; |
-obj.__proto__.toString = function() { return "*" + arr + "*"; } |
-arr[2] = arr; |
-arr[3] = obj; |
- |
-shouldBe("arr.join()", "'1,2,,**'"); |
+var d = new Date(2005, 6, 15); |
+d.setMonth(-3); |
+shouldBe("d.valueOf()", "new Date(2004, 9, 15).valueOf()"); |