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:
Shawn Wilsher 2009-07-13 14:59:09 -07:00
Родитель 1cb9ed2d12
Коммит ed392e8ab0
18 изменённых файлов: 18 добавлений и 0 удалений

Просмотреть файл

@ -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);