michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: Cu.import("resource://testing-common/services-common/utils.js"); michael@0: michael@0: function run_test() { michael@0: let thing = {o: {foo: "foo", bar: ["bar"]}, a: ["foo", {bar: "bar"}]}; michael@0: let ret = TestingUtils.deepCopy(thing); michael@0: do_check_neq(ret, thing) michael@0: do_check_neq(ret.o, thing.o); michael@0: do_check_neq(ret.o.bar, thing.o.bar); michael@0: do_check_neq(ret.a, thing.a); michael@0: do_check_neq(ret.a[1], thing.a[1]); michael@0: do_check_eq(ret.o.foo, thing.o.foo); michael@0: do_check_eq(ret.o.bar[0], thing.o.bar[0]); michael@0: do_check_eq(ret.a[0], thing.a[0]); michael@0: do_check_eq(ret.a[1].bar, thing.a[1].bar); michael@0: }