summaryrefslogtreecommitdiffstats
path: root/toolkit/modules/tests/xpcshell/test_ObjectUtils_strict.js
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 21:49:04 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 21:49:04 +0200
commit39dac57259cff8b61db0b22cb2ad0a8adb02692e (patch)
tree52a026cc8c22793eb17fd0f5e22adce1ae08a1dd /toolkit/modules/tests/xpcshell/test_ObjectUtils_strict.js
parenta1cce3b2b00bbd9f4983013ddd8934a7bccb9e99 (diff)
parentc2d9ab62f3d097c9e0e00184cab1f546554f5eaa (diff)
downloadUXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.gz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.lz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.xz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.zip
Merge branch 'redwood' into 28.9-platform
Diffstat (limited to 'toolkit/modules/tests/xpcshell/test_ObjectUtils_strict.js')
-rw-r--r--toolkit/modules/tests/xpcshell/test_ObjectUtils_strict.js29
1 files changed, 0 insertions, 29 deletions
diff --git a/toolkit/modules/tests/xpcshell/test_ObjectUtils_strict.js b/toolkit/modules/tests/xpcshell/test_ObjectUtils_strict.js
deleted file mode 100644
index 44572e600..000000000
--- a/toolkit/modules/tests/xpcshell/test_ObjectUtils_strict.js
+++ /dev/null
@@ -1,29 +0,0 @@
-"use strict";
-
-var {ObjectUtils} = Components.utils.import("resource://gre/modules/ObjectUtils.jsm", {});
-var {PromiseTestUtils} = Components.utils.import("resource://testing-common/PromiseTestUtils.jsm", {});
-
-add_task(function* test_strict() {
- let loose = { a: 1 };
- let strict = ObjectUtils.strict(loose);
-
- loose.a; // Should not throw.
- loose.b || undefined; // Should not throw.
-
- strict.a; // Should not throw.
- PromiseTestUtils.expectUncaughtRejection(/No such property: "b"/);
- Assert.throws(() => strict.b, /No such property: "b"/);
- "b" in strict; // Should not throw.
- strict.b = 2;
- strict.b; // Should not throw.
-
- PromiseTestUtils.expectUncaughtRejection(/No such property: "c"/);
- Assert.throws(() => strict.c, /No such property: "c"/);
- "c" in strict; // Should not throw.
- loose.c = 3;
- strict.c; // Should not throw.
-});
-
-function run_test() {
- run_next_test();
-}