| Index: test/webkit/fast/js/date-toisostring.js
|
| diff --git a/test/webkit/resolve-arguments-from-scope.js b/test/webkit/fast/js/date-toisostring.js
|
| similarity index 60%
|
| copy from test/webkit/resolve-arguments-from-scope.js
|
| copy to test/webkit/fast/js/date-toisostring.js
|
| index def71585dfecd116946fcec5ec2b4b5e7997924c..2515b1496171a27ba6270d89566086e2c0db564c 100644
|
| --- a/test/webkit/resolve-arguments-from-scope.js
|
| +++ b/test/webkit/fast/js/date-toisostring.js
|
| @@ -21,25 +21,27 @@
|
| // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
| // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
| -description(
|
| -"Tests that doing repeated resolves of 'arguments' from some nested scope doesn't crash."
|
| -);
|
| +description("Tests for Date.toISOString");
|
|
|
| -function bar() {
|
| - throw "omg";
|
| -}
|
| -
|
| -function foo() {
|
| +function throwsRangeError(str)
|
| +{
|
| try {
|
| - bar();
|
| + eval(str);
|
| } catch (e) {
|
| - return arguments;
|
| + return e instanceof RangeError;
|
| }
|
| + return false;
|
| }
|
|
|
| -for (var i = 0; i < 100; ++i) {
|
| - shouldBe("foo(42)[0]", "42");
|
| - shouldBe("foo(42).length", "1");
|
| - shouldBe("foo(42, 23)[1]", "23");
|
| -}
|
| +shouldThrow("Date.toISOString.call({})");
|
| +shouldThrow("Date.toISOString.call(0)");
|
|
|
| +shouldBe("new Date(-400).toISOString()", "'1969-12-31T23:59:59.600Z'");
|
| +shouldBe("new Date(0).toISOString()", "'1970-01-01T00:00:00.000Z'");
|
| +shouldBe("new Date('1 January 1500 UTC').toISOString()", "'1500-01-01T00:00:00.000Z'");
|
| +shouldBe("new Date('1 January 2000 UTC').toISOString()", "'2000-01-01T00:00:00.000Z'");
|
| +shouldBe("new Date('1 January 4000 UTC').toISOString()", "'4000-01-01T00:00:00.000Z'");
|
| +shouldBe("new Date('1 January 100000 UTC').toISOString()", "'+100000-01-01T00:00:00.000Z'");
|
| +shouldBe("new Date('1 January -1 UTC').toISOString()", "'-000001-01-01T00:00:00.000Z'");
|
| +shouldBe("new Date('10 March 2000 UTC').toISOString()", "'2000-03-10T00:00:00.000Z'");
|
| +shouldBeTrue('throwsRangeError("new Date(NaN).toISOString()")');
|
|
|