Commit 0fc1f6ce authored by darin@apple.com's avatar darin@apple.com

2009-06-22 Darin Adler <darin@apple.com>

        * fast/js/JSON-stringify-expected.txt: Update results.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@44935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent c88e3539
2009-06-22 Darin Adler <darin@apple.com>
* fast/js/JSON-stringify-expected.txt: Update results.
2009-06-21 Oliver Hunt <oliver@apple.com>
Reviewed by Darin Adler.
......
......@@ -10,6 +10,26 @@ function (jsonObject) {
return jsonObject.stringify({toJSON: Date.prototype.toJSON, toISOString: function(){ return "custom toISOString"; }});
}
PASS tests[i](nativeJSON) is tests[i](JSON)
function (jsonObject) {
return jsonObject.stringify({toJSON: Date.prototype.toJSON, toISOString: function(){ return {}; }});
}
PASS tests[i](nativeJSON) threw exception TypeError: toISOString did not return a primitive value.
function (jsonObject) {
return jsonObject.stringify({toJSON: Date.prototype.toJSON, toISOString: function(){ throw "An exception"; }});
}
PASS tests[i](nativeJSON) threw exception An exception.
function (jsonObject) {
var d = new Date(0);
d.toISOString = null;
return jsonObject.stringify(d);
}
PASS tests[i](nativeJSON) threw exception TypeError: toISOString is not a function.
function (jsonObject) {
var d = new Date(0);
d.toJSON = undefined;
return jsonObject.stringify(d);
}
PASS tests[i](nativeJSON) is tests[i](JSON)
function (jsonObject) {
return jsonObject.stringify({get Foo() { return "bar"; }});
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment