summaryrefslogtreecommitdiffstats
path: root/js/xpconnect/tests
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-14 22:20:43 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-14 22:20:43 +0200
commit287ca21a651803ce87347ba584ce93908cd8a9e6 (patch)
tree27ecf9ac497870a923a8f5991b61547befe33549 /js/xpconnect/tests
parentc73c73b7978d7fc12e0dc07bb7c8f3babd497b8c (diff)
downloadUXP-287ca21a651803ce87347ba584ce93908cd8a9e6.tar
UXP-287ca21a651803ce87347ba584ce93908cd8a9e6.tar.gz
UXP-287ca21a651803ce87347ba584ce93908cd8a9e6.tar.lz
UXP-287ca21a651803ce87347ba584ce93908cd8a9e6.tar.xz
UXP-287ca21a651803ce87347ba584ce93908cd8a9e6.zip
moebius#242: XPCOM: exportFunction() - fix wrong .length attribute
https://github.com/MoonchildProductions/moebius/pull/243
Diffstat (limited to 'js/xpconnect/tests')
-rw-r--r--js/xpconnect/tests/unit/test_exportFunction.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/js/xpconnect/tests/unit/test_exportFunction.js b/js/xpconnect/tests/unit/test_exportFunction.js
index 830816342..9e1bf2082 100644
--- a/js/xpconnect/tests/unit/test_exportFunction.js
+++ b/js/xpconnect/tests/unit/test_exportFunction.js
@@ -10,12 +10,14 @@ function run_test() {
epsb.do_check_true = do_check_true;
epsb.do_check_eq = do_check_eq;
subsb.do_check_true = do_check_true;
+ subsb.do_check_eq = do_check_eq;
// Exporting should work if prinicipal of the source sandbox
// subsumes the principal of the target sandbox.
Cu.evalInSandbox("(" + function() {
var wasCalled = false;
this.funToExport = function(expectedThis, a, obj, native, mixed, callback) {
+ do_check_eq(arguments.callee.length, 6);
do_check_eq(a, 42);
do_check_eq(obj, subsb.tobecloned);
do_check_eq(obj.cloned, "cloned");
@@ -53,6 +55,7 @@ function run_test() {
invokedCallback = false;
callback = function() { invokedCallback = true; };
imported(this, 42, tobecloned, native, mixed, callback);
+ do_check_eq(imported.length, 6);
do_check_true(invokedCallback);
}.toSource() + ")()", subsb);