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

Unified Diff: test/mjsunit/mirror-date.js

Issue 113399: Use JSON.stringify to serialize debugger messages (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 11 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/mirror-boolean.js ('k') | test/mjsunit/mirror-error.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/mirror-date.js
===================================================================
--- test/mjsunit/mirror-date.js (revision 1956)
+++ test/mjsunit/mirror-date.js (working copy)
@@ -32,7 +32,7 @@
// Create mirror and JSON representation.
var mirror = debug.MakeMirror(d);
var serializer = debug.MakeMirrorSerializer();
- var json = serializer.serializeValue(mirror);
+ var json = JSON.stringify(serializer.serializeValue(mirror));
// Check the mirror hierachy.
assertTrue(mirror instanceof debug.Mirror);
@@ -55,9 +55,9 @@
assertEquals(iso8601, fromJSON.value);
}
-
// Test Date values.
-testDateMirror(new Date(Date.parse("Dec 25, 1995 1:30 UTC")), "1995-12-25T01:30:00.000Z");
+testDateMirror(new Date(Date.parse("Dec 25, 1995 1:30 UTC")),
+ "1995-12-25T01:30:00Z");
d = new Date();
d.setUTCFullYear(1967);
d.setUTCMonth(0); // January.
@@ -66,10 +66,10 @@
d.setUTCMinutes(22);
d.setUTCSeconds(59);
d.setUTCMilliseconds(0);
-testDateMirror(d, "1967-01-17T09:22:59.000Z");
+testDateMirror(d, "1967-01-17T09:22:59Z");
d.setUTCMilliseconds(1);
-testDateMirror(d, "1967-01-17T09:22:59.001Z");
-d.setUTCMilliseconds(12);
-testDateMirror(d, "1967-01-17T09:22:59.012Z");
-d.setUTCMilliseconds(123);
-testDateMirror(d, "1967-01-17T09:22:59.123Z");
+testDateMirror(d, "1967-01-17T09:22:59Z");
+d.setUTCSeconds(12);
+testDateMirror(d, "1967-01-17T09:22:12Z");
+d.setUTCSeconds(36);
+testDateMirror(d, "1967-01-17T09:22:36Z");
« no previous file with comments | « test/mjsunit/mirror-boolean.js ('k') | test/mjsunit/mirror-error.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698