michael@0: /* Any copyright is dedicated to the Public Domain. michael@0: http://creativecommons.org/publicdomain/zero/1.0/ */ michael@0: michael@0: "use strict"; michael@0: const Cc = Components.classes; michael@0: const Ci = Components.interfaces; michael@0: const Cu = Components.utils; michael@0: const Cr = Components.results; michael@0: michael@0: function testGlobal(aName) { michael@0: let systemPrincipal = Cc["@mozilla.org/systemprincipal;1"] michael@0: .createInstance(Ci.nsIPrincipal); michael@0: michael@0: let sandbox = Cu.Sandbox(systemPrincipal); michael@0: Cu.evalInSandbox("this.__name = '" + aName + "'", sandbox); michael@0: return sandbox; michael@0: }