Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: LayoutTests/fast/js/script-tests/date-toisostring.js

Issue 20867002: Remove old tests that have been migrated to the v8 repo. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: remove unused script-tests as well Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 description("Tests for Date.toISOString");
2
3 function throwsRangeError(str)
4 {
5 try {
6 eval(str);
7 } catch (e) {
8 return e instanceof RangeError;
9 }
10 return false;
11 }
12
13 shouldThrow("Date.toISOString.call({})");
14 shouldThrow("Date.toISOString.call(0)");
15
16 shouldBe("new Date(-400).toISOString()", "'1969-12-31T23:59:59.600Z'");
17 shouldBe("new Date(0).toISOString()", "'1970-01-01T00:00:00.000Z'");
18 shouldBe("new Date('1 January 1500 UTC').toISOString()", "'1500-01-01T00:00:00.0 00Z'");
19 shouldBe("new Date('1 January 2000 UTC').toISOString()", "'2000-01-01T00:00:00.0 00Z'");
20 shouldBe("new Date('1 January 4000 UTC').toISOString()", "'4000-01-01T00:00:00.0 00Z'");
21 shouldBe("new Date('1 January 100000 UTC').toISOString()", "'+100000-01-01T00:00 :00.000Z'");
22 shouldBe("new Date('1 January -1 UTC').toISOString()", "'-000001-01-01T00:00:00. 000Z'");
23 shouldBe("new Date('10 March 2000 UTC').toISOString()", "'2000-03-10T00:00:00.00 0Z'");
24 shouldBeTrue('throwsRangeError("new Date(NaN).toISOString()")');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698