summaryrefslogtreecommitdiffstats
path: root/js/ductwork/debugger/tests/head_dbg.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/ductwork/debugger/tests/head_dbg.js')
-rw-r--r--js/ductwork/debugger/tests/head_dbg.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/ductwork/debugger/tests/head_dbg.js b/js/ductwork/debugger/tests/head_dbg.js
new file mode 100644
index 000000000..0ffeed26b
--- /dev/null
+++ b/js/ductwork/debugger/tests/head_dbg.js
@@ -0,0 +1,17 @@
+/* Any copyright is dedicated to the Public Domain.
+ http://creativecommons.org/publicdomain/zero/1.0/ */
+
+"use strict";
+const Cc = Components.classes;
+const Ci = Components.interfaces;
+const Cu = Components.utils;
+const Cr = Components.results;
+
+function testGlobal(aName) {
+ let systemPrincipal = Cc["@mozilla.org/systemprincipal;1"]
+ .createInstance(Ci.nsIPrincipal);
+
+ let sandbox = Cu.Sandbox(systemPrincipal);
+ Cu.evalInSandbox("this.__name = '" + aName + "'", sandbox);
+ return sandbox;
+}