mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 03:45:46 +00:00
Bug 657462: don't select the first item in the download manager automatically, r=dolske
--HG-- extra : rebase_source : d84c3ce6b80048c2a0c8c5dc8fb7302cc22d8349
This commit is contained in:
parent
29da26def0
commit
cc09ca680a
@ -1159,7 +1159,6 @@ function buildDownloadList(aForceBuild)
|
||||
gBuilder = setTimeout(function() {
|
||||
// Start building the list and select the first item
|
||||
stepListBuilder(1);
|
||||
gDownloadsView.selectedIndex = 0;
|
||||
|
||||
// We just tried to add a single item, so we probably need to enable
|
||||
updateClearListButton();
|
||||
|
@ -166,6 +166,7 @@ function test()
|
||||
try {
|
||||
stmt.executeStep();
|
||||
let richlistbox = doc.getElementById("downloadView");
|
||||
richlistbox.selectedIndex = 0;
|
||||
is(stmt.getInt32(0), richlistbox.children.length,
|
||||
"The database and the number of downloads display matches");
|
||||
stmt.reset();
|
||||
|
@ -176,14 +176,18 @@ function test()
|
||||
if (aTopic != DLMGR_UI_DONE)
|
||||
return;
|
||||
|
||||
SimpleTest.waitForFocus(function () { sendEnter(aSubject) }, aSubject);
|
||||
}
|
||||
};
|
||||
os.removeObserver(testObs, DLMGR_UI_DONE);
|
||||
|
||||
function sendEnter(win) {
|
||||
// Send the enter key to Download Manager to retry the download
|
||||
synthesizeKey("VK_ENTER", {}, win);
|
||||
os.removeObserver(testObs, DLMGR_UI_DONE);
|
||||
SimpleTest.waitForFocus(function () {
|
||||
let win = aSubject;
|
||||
|
||||
// Down arrow to select the download
|
||||
synthesizeKey("VK_DOWN", {}, win);
|
||||
|
||||
// Enter key to retry the download
|
||||
synthesizeKey("VK_ENTER", {}, win);
|
||||
}, aSubject);
|
||||
}
|
||||
};
|
||||
|
||||
// Register with the observer service
|
||||
|
@ -171,6 +171,7 @@ function test()
|
||||
try {
|
||||
stmt.executeStep();
|
||||
let richlistbox = doc.getElementById("downloadView");
|
||||
richlistbox.selectedIndex = 0;
|
||||
is(stmt.getInt32(0), richlistbox.children.length,
|
||||
"The database and the number of downloads display matches");
|
||||
stmt.reset();
|
||||
|
Loading…
Reference in New Issue
Block a user