diff --git a/dom/quota/test/unit/upgrades/test_version2_1upgrade.js b/dom/quota/test/unit/upgrades/test_upgradeStorageFrom2_0.js similarity index 86% rename from dom/quota/test/unit/upgrades/test_version2_1upgrade.js rename to dom/quota/test/unit/upgrades/test_upgradeStorageFrom2_0.js index e8041b3d867b..c5bb540ddb29 100644 --- a/dom/quota/test/unit/upgrades/test_version2_1upgrade.js +++ b/dom/quota/test/unit/upgrades/test_upgradeStorageFrom2_0.js @@ -3,6 +3,10 @@ * http://creativecommons.org/publicdomain/zero/1.0/ */ +/** + * This test is mainly to verify UpgradeStorageFrom2_0To2_1 method. + */ + var testGenerator = testSteps(); function* testSteps() { @@ -17,6 +21,7 @@ function* testSteps() { clear(continueToNextStepSync); yield undefined; + // Storage used by FF 55-56 (storage version 2.0). // The profile contains two cache storages: // - storage/default/chrome/cache, // - storage/default/http+++www.mozilla.org/cache @@ -31,30 +36,28 @@ function* testSteps() { // "storage/default/http+++www.mozilla.org". // 3. Manually create an asmjs folder under the // "storage/default/http+++www.mozilla.org/". - installPackage("version2_1upgrade_profile"); + installPackage("version2_0_profile"); - info("Checking padding file before upgrade (QM version 2.0)"); + info("Checking padding files before upgrade (storage version 2.0)"); for (let origin of origins) { let paddingFile = getRelativeFile(origin + paddingFilePath); - let exists = paddingFile.exists(); ok(!exists, "Padding file doesn't exist"); } info("Initializing"); - // Initialize QuotaManager to trigger upgrade the QM to version 2.1 + // Initialize to trigger storage upgrade from version 2.0. let request = init(continueToNextStepSync); yield undefined; ok(request.resultCode == NS_OK, "Initialization succeeded"); - info("Checking padding files after upgrade (QM version 2.1)"); + info("Checking padding files after upgrade"); for (let origin of origins) { let paddingFile = getRelativeFile(origin + paddingFilePath); - let exists = paddingFile.exists(); ok(exists, "Padding file does exist"); diff --git a/dom/quota/test/unit/upgrades/version2_0_profile.zip b/dom/quota/test/unit/upgrades/version2_0_profile.zip new file mode 100644 index 000000000000..c140df56e4b1 Binary files /dev/null and b/dom/quota/test/unit/upgrades/version2_0_profile.zip differ diff --git a/dom/quota/test/unit/upgrades/version2_1upgrade_profile.zip b/dom/quota/test/unit/upgrades/version2_1upgrade_profile.zip deleted file mode 100644 index 2b42848f52ae..000000000000 Binary files a/dom/quota/test/unit/upgrades/version2_1upgrade_profile.zip and /dev/null differ diff --git a/dom/quota/test/unit/upgrades/xpcshell.ini b/dom/quota/test/unit/upgrades/xpcshell.ini index d6dd579f6579..6a27a02a9eff 100644 --- a/dom/quota/test/unit/upgrades/xpcshell.ini +++ b/dom/quota/test/unit/upgrades/xpcshell.ini @@ -19,7 +19,7 @@ support-files = version1_0_appsData_profile.zip version1_0_morgueDirectory_profile.zip version1_0_obsoleteOriginAttributes_profile.zip - version2_1upgrade_profile.zip + version2_0_profile.zip version2_2upgrade_profile.zip [test_localStorageArchive1upgrade.js] @@ -36,4 +36,4 @@ support-files = [test_upgradeStorageFrom1_0_removeAppsData.js] [test_upgradeStorageFrom1_0_removeMorgueDirectory.js] [test_upgradeStorageFrom1_0_stripObsoleteOriginAttributes.js] -[test_version2_1upgrade.js] +[test_upgradeStorageFrom2_0.js]