зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
b6d231ee51
Коммит
4a7e1635a3
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче