mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
18
services/common/tests/unit/test_utils_deepCopy.js
Normal file
18
services/common/tests/unit/test_utils_deepCopy.js
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
Cu.import("resource://testing-common/services/common/utils.js");
|
||||
|
||||
function run_test() {
|
||||
let thing = {o: {foo: "foo", bar: ["bar"]}, a: ["foo", {bar: "bar"}]};
|
||||
let ret = TestingUtils.deepCopy(thing);
|
||||
do_check_neq(ret, thing)
|
||||
do_check_neq(ret.o, thing.o);
|
||||
do_check_neq(ret.o.bar, thing.o.bar);
|
||||
do_check_neq(ret.a, thing.a);
|
||||
do_check_neq(ret.a[1], thing.a[1]);
|
||||
do_check_eq(ret.o.foo, thing.o.foo);
|
||||
do_check_eq(ret.o.bar[0], thing.o.bar[0]);
|
||||
do_check_eq(ret.a[0], thing.a[0]);
|
||||
do_check_eq(ret.a[1].bar, thing.a[1].bar);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue