2007-08-21 12:59:46 -07:00
|
|
|
const Ci = Components.interfaces;
|
|
|
|
const Cc = Components.classes;
|
|
|
|
|
2007-07-14 14:13:51 -07:00
|
|
|
function test() {
|
|
|
|
ok(Application, "Check global access to Application");
|
|
|
|
|
|
|
|
// I'd test these against a specific value, but that is bound to flucuate
|
|
|
|
ok(Application.id, "Check to see if an ID exists for the Application");
|
|
|
|
ok(Application.name, "Check to see if a name exists for the Application");
|
|
|
|
ok(Application.version, "Check to see if a version exists for the Application");
|
2007-08-21 12:59:46 -07:00
|
|
|
|
|
|
|
var wMediator = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
|
|
|
|
var console = wMediator.getMostRecentWindow("global:console");
|
2007-09-19 07:01:59 -07:00
|
|
|
waitForExplicitFinish();
|
2007-08-21 12:59:46 -07:00
|
|
|
if (!console) {
|
|
|
|
Application.console.open();
|
|
|
|
}
|
2007-09-19 07:01:59 -07:00
|
|
|
setTimeout(checkConsole, 500);
|
2007-08-21 12:59:46 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
function checkConsole() {
|
|
|
|
var wMediator = Cc["@mozilla.org/appshell/window-mediator;1"].getService(Ci.nsIWindowMediator);
|
|
|
|
var console = wMediator.getMostRecentWindow("global:console");
|
|
|
|
ok(console, "Check to see if the console window opened");
|
|
|
|
if (console)
|
|
|
|
console.close();
|
2007-09-19 07:01:59 -07:00
|
|
|
finish();
|
2007-07-14 14:13:51 -07:00
|
|
|
}
|