зеркало из https://github.com/mozilla/gecko-dev.git
Bug 618760 - Multiple add-on entries in list view when downloading an update. r=dtownsend, a=blocking-final
This commit is contained in:
Родитель
6811b0f49c
Коммит
e69e9815e7
|
@ -2129,6 +2129,9 @@ var gListView = {
|
||||||
if (aObj.type != this._type)
|
if (aObj.type != this._type)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (aIsInstall && aObj.existingAddon)
|
||||||
|
return;
|
||||||
|
|
||||||
let prop = aIsInstall ? "mInstall" : "mAddon";
|
let prop = aIsInstall ? "mInstall" : "mAddon";
|
||||||
for (let i = 0; i < this._listBox.itemCount; i++) {
|
for (let i = 0; i < this._listBox.itemCount; i++) {
|
||||||
let item = this._listBox.childNodes[i];
|
let item = this._listBox.childNodes[i];
|
||||||
|
|
|
@ -62,6 +62,9 @@ function installUpgrade(aCallback) {
|
||||||
is(get_list_item_count(), 1, "Should be only one item in the list");
|
is(get_list_item_count(), 1, "Should be only one item in the list");
|
||||||
|
|
||||||
aInstall.addListener({
|
aInstall.addListener({
|
||||||
|
onDownloadEnded: function() {
|
||||||
|
is(get_list_item_count(), 1, "Should be only one item in the list once the update has started");
|
||||||
|
},
|
||||||
onInstallEnded: function() {
|
onInstallEnded: function() {
|
||||||
executeSoon(aCallback);
|
executeSoon(aCallback);
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче