~ubuntu-branches/ubuntu/saucy/mozjs17/saucy

« back to all changes in this revision

Viewing changes to js/src/tests/e4x/extensions/json-stringify-dropping-xml-elements.js

  • Committer: Package Import Robot
  • Author(s): Rico Tzschichholz
  • Date: 2013-05-25 12:24:23 UTC
  • Revision ID: package-import@ubuntu.com-20130525122423-zmxucrhtensw90xy
Tags: upstream-17.0.0
ImportĀ upstreamĀ versionĀ 17.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// |reftest| pref(javascript.options.xml.content,true)
 
2
// Ported from dom/src/json/test/unit/test_dropping_elements_in_stringify.js
 
3
 
 
4
assertEq(JSON.stringify({foo: 123, bar: <x><y></y></x>, baz: 123}),
 
5
         '{"foo":123,"baz":123}');
 
6
 
 
7
assertEq(JSON.stringify([123, <x><y></y></x>, 456]),
 
8
         '[123,null,456]');
 
9
 
 
10
/******************************************************************************/
 
11
 
 
12
if (typeof reportCompare === "function")
 
13
  reportCompare(true, true);
 
14
 
 
15
print("Tests complete");