mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Bug 1330227 Tighten up mtime checking test_update.js r=rhelmer
MozReview-Commit-ID: Lk88rlRawZm --HG-- extra : rebase_source : 793b14afdc0d755998a26c4fc903d1162070e982
This commit is contained in:
parent
2ade684a77
commit
4a96af84c8
@ -232,6 +232,10 @@ for (let test of testParams) {
|
||||
|
||||
await promiseStartupManager();
|
||||
|
||||
// Grab the current time so we can check the mtime of the add-on below
|
||||
// without worrying too much about how long other tests take.
|
||||
let startupTime = Date.now();
|
||||
|
||||
do_check_true(isExtensionInAddonsList(profileDir, "addon1@tests.mozilla.org"));
|
||||
|
||||
AddonManager.getAddonByID("addon1@tests.mozilla.org", function(a1) {
|
||||
@ -247,7 +251,7 @@ for (let test of testParams) {
|
||||
// Make sure that the extension lastModifiedTime was updated.
|
||||
let testURI = a1.getResourceURI(TEST_UNPACKED ? "install.rdf" : "");
|
||||
let testFile = testURI.QueryInterface(Components.interfaces.nsIFileURL).file;
|
||||
let difference = testFile.lastModifiedTime - Date.now();
|
||||
let difference = testFile.lastModifiedTime - startupTime;
|
||||
do_check_true(Math.abs(difference) < MAX_TIME_DIFFERENCE);
|
||||
|
||||
a1.uninstall();
|
||||
|
Loading…
Reference in New Issue
Block a user