mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-12 22:28:59 +02:00
Replaced instances of callers in both C++ and JS files to query the state from the principal directly. Differential Revision: https://phabricator.services.mozilla.com/D22532 --HG-- extra : moz-landing-system : lando
6 lines
265 B
JavaScript
6 lines
265 B
JavaScript
function run_test() {
|
|
Assert.ok(Cu.getObjectPrincipal({}).isSystemPrincipal);
|
|
var sb = new Cu.Sandbox('http://www.example.com');
|
|
Cu.evalInSandbox('var obj = { foo: 42 };', sb);
|
|
Assert.equal(Cu.getObjectPrincipal(sb.obj).origin, 'http://www.example.com');
|
|
}
|