зеркало из https://github.com/mozilla/pjs.git
Bug 498805 - test_esc_key_closes_clears.xul fails intermittently on Linux
Focus the window before actually doing anything with the test so key events work right. Also fix all other download manager tests so they don't start going random as well. r=Mardak
This commit is contained in:
Родитель
1cb9ed2d12
Коммит
ed392e8ab0
|
@ -161,6 +161,7 @@ function test()
|
|||
return;
|
||||
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
let doc = win.document;
|
||||
|
||||
let stmt = db.createStatement("SELECT COUNT(*) FROM moz_downloads");
|
||||
|
|
|
@ -227,6 +227,7 @@ function test()
|
|||
return;
|
||||
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
|
||||
// Now we can run our tests
|
||||
for each (let t in testFuncs)
|
||||
|
|
|
@ -179,6 +179,7 @@ function test()
|
|||
return;
|
||||
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
// Send the enter key to Download Manager to retry the download
|
||||
synthesizeKey("VK_ENTER", {}, win);
|
||||
os.removeObserver(testObs, DLMGR_UI_DONE);
|
||||
|
|
|
@ -122,6 +122,7 @@ function test()
|
|||
return;
|
||||
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
let $ = function(aId) win.document.getElementById(aId);
|
||||
let downloadView = $("downloadView");
|
||||
|
||||
|
|
|
@ -118,6 +118,7 @@ function test()
|
|||
return;
|
||||
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
let $ = function(aId) win.document.getElementById(aId);
|
||||
let downloadView = $("downloadView");
|
||||
let searchbox = $("searchbox");
|
||||
|
|
|
@ -108,6 +108,7 @@ function runTest()
|
|||
let testObs = {
|
||||
observe: function(aSubject, aTopic, aData) {
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
let doc = win.document;
|
||||
let searchbox = doc.getElementById("searchbox");
|
||||
let clearButton = doc.getElementById("clearListButton");
|
||||
|
|
|
@ -83,6 +83,7 @@ function test()
|
|||
return;
|
||||
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
|
||||
// Put in a value to clear out
|
||||
let search = win.document.getElementById("searchbox");
|
||||
|
|
|
@ -117,6 +117,7 @@ function test()
|
|||
return;
|
||||
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
let $ = function(aId) win.document.getElementById(aId);
|
||||
let downloadView = $("downloadView");
|
||||
|
||||
|
|
|
@ -117,6 +117,7 @@ function test()
|
|||
return;
|
||||
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
let $ = function(aId) win.document.getElementById(aId);
|
||||
let downloadView = $("downloadView");
|
||||
let searchbox = $("searchbox");
|
||||
|
|
|
@ -131,6 +131,7 @@ function test()
|
|||
return;
|
||||
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
let doc = win.document;
|
||||
|
||||
let richlistbox = doc.getElementById("downloadView");
|
||||
|
|
|
@ -107,6 +107,7 @@ function test()
|
|||
obs.removeObserver(testObs, DLMGR_UI_DONE);
|
||||
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
let defaultTitle = win.document.documentElement.getAttribute("statictitle");
|
||||
is(win.document.title, defaultTitle,
|
||||
"The downloads window title is correct outside of the private browsing mode");
|
||||
|
|
|
@ -121,6 +121,7 @@ function test()
|
|||
return;
|
||||
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
let doc = win.document;
|
||||
|
||||
// Note: This also tests the ordering of the display
|
||||
|
|
|
@ -125,6 +125,7 @@ function test()
|
|||
return;
|
||||
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
let $ = function(aId) win.document.getElementById(aId);
|
||||
let downloadView = $("downloadView");
|
||||
let searchbox = $("searchbox");
|
||||
|
|
|
@ -108,6 +108,7 @@ function test()
|
|||
return;
|
||||
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
|
||||
// Now we can run our tests
|
||||
for each (let t in testFuncs)
|
||||
|
|
|
@ -116,6 +116,7 @@ function test()
|
|||
return;
|
||||
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
|
||||
var checkSelectAndRemove = function(alreadyFocused)
|
||||
{
|
||||
|
|
|
@ -173,6 +173,7 @@ function test()
|
|||
return;
|
||||
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
let doc = win.document;
|
||||
dm.addListener(new bug413985obs(win));
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ function test()
|
|||
return;
|
||||
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
|
||||
win.focus();
|
||||
|
||||
// Note: This test will not be valid if the download list is built
|
||||
// synchronously in Startup in downloads.js
|
||||
|
|
|
@ -85,6 +85,7 @@ SimpleTest.waitForExplicitFinish();
|
|||
let windowObserver = {
|
||||
observe: function(aSubject, aTopic, aData) {
|
||||
let win = aSubject.QueryInterface(Ci.nsIDOMEventTarget);
|
||||
win.focus();
|
||||
|
||||
win.addEventListener("load", function onLoad(event) {
|
||||
win.removeEventListener("load", onLoad, false);
|
||||
|
|
Загрузка…
Ссылка в новой задаче