Bug 1318875 - Stop using nsIPrincipal.APP_STATUS_INSTALLED in test_xpcwn_tamperproof.js; r=baku

Instead of the principal object, we use the command line object which is
another XPCOM object with classinfo that has an attribute, a method and
a constant.
This commit is contained in:
Ehsan Akhgari 2016-11-19 14:56:20 -05:00
Родитель b6d231ee51
Коммит 4a7e1635a3
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -152,13 +152,13 @@ function run_test() {
attribute: "callback"
});
let principal = Cc["@mozilla.org/nullprincipal;1"].createInstance(Ci.nsIPrincipal);
test_twice(principal, {});
let cmdline = Cc["@mozilla.org/toolkit/command-line;1"].createInstance(Ci.nsICommandLine);
test_twice(cmdline, {});
test_twice(Object.getPrototypeOf(principal), {
method: "subsumes",
constant: "APP_STATUS_INSTALLED",
attribute: "origin"
test_twice(Object.getPrototypeOf(cmdline), {
method: "getArgument",
constant: "STATE_INITIAL_LAUNCH",
attribute: "length"
});
// Test a tearoff object.