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

Side by Side Diff: test/mjsunit/date.js

Issue 661466: Fix broken test in WebKit test suite and add the test in question to V8 tests... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 10 years, 9 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
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2008 the V8 project authors. All rights reserved. 1 // Copyright 2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 // Test that toLocaleTimeString only returns the time portion of the 141 // Test that toLocaleTimeString only returns the time portion of the
142 // date without the timezone information. 142 // date without the timezone information.
143 function testToLocaleTimeString() { 143 function testToLocaleTimeString() {
144 var d = new Date(); 144 var d = new Date();
145 var s = d.toLocaleTimeString(); 145 var s = d.toLocaleTimeString();
146 assertEquals(8, s.length); 146 assertEquals(8, s.length);
147 } 147 }
148 148
149 testToLocaleTimeString(); 149 testToLocaleTimeString();
150
151
152 // Modified test from WebKit
153 // LayoutTests/fast/js/script-tests/date-utc-timeclip.js:
154
155 assertEquals(Date.UTC(275760, 8, 12, 23, 59, 59, 999), 8639999999999999);
156 assertEquals(Date.UTC(275760, 8, 13), 8640000000000000);
157 assertTrue(isNaN(Date.UTC(275760, 8, 13, 0, 0, 0, 1)));
158 assertTrue(isNaN(Date.UTC(275760, 8, 14)));
159
160 assertEquals(Date.UTC(-271821, 3, 20, 0, 0, 0, 1), -8639999999999999);
161 assertEquals(Date.UTC(-271821, 3, 20), -8640000000000000);
162 assertTrue(isNaN(Date.UTC(-271821, 3, 19, 23, 59, 59, 999)));
163 assertTrue(isNaN(Date.UTC(-271821, 3, 19)));
OLDNEW
« no previous file with comments | « src/runtime.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698