Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 // Ported from dom/src/json/test/unit/test_dropping_elements_in_stringify.js
3 assertEq(JSON.stringify({foo: 123}),
4 '{"foo":123}');
5 assertEq(JSON.stringify({foo: 123, bar: function () {}}),
6 '{"foo":123}');
7 assertEq(JSON.stringify({foo: 123, bar: function () {}, baz: 123}),
8 '{"foo":123,"baz":123}');
10 assertEq(JSON.stringify([123]),
11 '[123]');
12 assertEq(JSON.stringify([123, function () {}]),
13 '[123,null]');
14 assertEq(JSON.stringify([123, function () {}, 456]),
15 '[123,null,456]');
17 /******************************************************************************/
19 if (typeof reportCompare === "function")
20 reportCompare(true, true);
22 print("Tests complete");