1 const Ci = Components.interfaces;
2 const Cc = Components.classes;
9 this.opencallback = opencallback;
10 this.closecallback = closecallback;
12 var
wm =
Cc[
"@mozilla.org/appshell/window-mediator;1"].
24 handleEvent:
function(
event) {
25 is(this.domwindow.document.location.href,
this.url,
"Should have opened the correct window");
27 this.domwindow.removeEventListener(
"load",
this,
false);
30 executeSoon(
function() {
self.opencallback(
self.domwindow); } );
33 onWindowTitleChange:
function(
window, title) {
36 onOpenWindow:
function(
window) {
41 this.domwindow =
window.QueryInterface(
Ci.nsIInterfaceRequestor)
42 .getInterface(
Ci.nsIDOMWindowInternal);
43 this.domwindow.addEventListener(
"load",
this,
false);
46 onCloseWindow:
function(
window) {
50 var
wm =
Cc[
"@mozilla.org/appshell/window-mediator;1"].
52 wm.removeListener(
this);
53 this.opencallback =
null;
55 this.domwindow =
null;
58 executeSoon(this.closecallback);
59 this.closecallback =
null;
64 ok(
Application,
"Check global access to Application");
67 ok(
Application.id,
"Check to see if an ID exists for the Application");
68 ok(
Application.name,
"Check to see if a name exists for the Application");
69 ok(
Application.version,
"Check to see if a version exists for the Application");
71 var wMediator =
Cc[
"@mozilla.org/appshell/window-mediator;1"].getService(
Ci.nsIWindowMediator);
72 var console = wMediator.getMostRecentWindow(
"global:console");
74 ok(!console,
"Console should not already be open");
getService(Ci.sbIFaceplateManager)
function WindowOpenListener(url, opencallback, closecallback)
function consoleOpened(win)