mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-27 19:09:47 +00:00
Bug 544356 followup: Use getDMUI(). r=Neil
"Bug 544356 - Exit when only the download manager window is open and there are no downloads."
This commit is contained in:
parent
b09051a899
commit
1a7488a51b
@ -33,12 +33,13 @@ let gGen, dm, dmui, chromeWindow, testCleanup;
|
||||
|
||||
function test()
|
||||
{
|
||||
testSetup();
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
if (testSetup()) {
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
//Start test
|
||||
gGen = doTest();
|
||||
gGen.next();
|
||||
//Start test
|
||||
gGen = doTest();
|
||||
gGen.next();
|
||||
}
|
||||
}
|
||||
|
||||
function doTest()
|
||||
@ -128,8 +129,11 @@ function testSetup()
|
||||
dm = Cc["@mozilla.org/download-manager;1"].
|
||||
getService(Ci.nsIDownloadManager);
|
||||
|
||||
dmui = Cc["@mozilla.org/download-manager-ui;1"].
|
||||
getService(Ci.nsIDownloadManagerUI);
|
||||
dmui = getDMUI();
|
||||
if (!dmui) {
|
||||
todo(false, "skip test for toolkit download manager UI");
|
||||
return false;
|
||||
}
|
||||
|
||||
downloadListener = {
|
||||
|
||||
@ -153,6 +157,8 @@ function testSetup()
|
||||
dm.removeListener(downloadListener);
|
||||
chromeWindow.document.documentElement.setAttribute("windowtype", oldWinType);
|
||||
};
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function openBrowserWindow(callback)
|
||||
|
Loading…
Reference in New Issue
Block a user