зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1320736 - Part 1: Set installDate in installAddonFromLocation, r=aswan
MozReview-Commit-ID: AB5GexbHYge --HG-- extra : rebase_source : 9defeb7b88deecea341920f572c18528e7b4c78f extra : source : 61b2e5fdc05505fa2be55d3abf9d80fbc857db93
This commit is contained in:
Родитель
e5c9c58008
Коммит
c8cd7f9dd7
|
@ -4065,6 +4065,8 @@ this.XPIProvider = {
|
|||
this.unloadBootstrapScope(existingAddonID);
|
||||
flushChromeCaches();
|
||||
}
|
||||
} else {
|
||||
addon.installDate = Date.now();
|
||||
}
|
||||
|
||||
let file = addon._sourceBundle;
|
||||
|
|
|
@ -79,8 +79,11 @@ add_task(function* test_unsigned_no_id_temp_install() {
|
|||
|
||||
const addonDir = yield promiseWriteWebManifestForExtension(manifest, gTmpD,
|
||||
"the-addon-sub-dir");
|
||||
const testDate = new Date();
|
||||
const addon = yield AddonManager.installTemporaryAddon(addonDir);
|
||||
ok(addon.id, "ID should have been auto-generated");
|
||||
ok(Math.abs(addon.installDate - testDate) < 10000, "addon has an expected installDate");
|
||||
ok(Math.abs(addon.updateDate - testDate) < 10000, "addon has an expected updateDate");
|
||||
|
||||
// The sourceURI of a temporary installed addon should be equal to the
|
||||
// file url of the installed source dir.
|
||||
|
|
Загрузка…
Ссылка в новой задаче