Bug 1608025 - Clean up the test for the upgrade from storage version 2.0; r=asuth

Differential Revision: https://phabricator.services.mozilla.com/D59709

--HG--
rename : dom/quota/test/unit/upgrades/test_version2_1upgrade.js => dom/quota/test/unit/upgrades/test_upgradeStorageFrom2_0.js
rename : dom/quota/test/unit/upgrades/version2_1upgrade_profile.zip => dom/quota/test/unit/upgrades/version2_0_profile.zip
extra : moz-landing-system : lando
This commit is contained in:
Jan Varga 2020-01-14 06:15:53 +00:00
Родитель c93adc6459
Коммит 83c009bffd
4 изменённых файлов: 11 добавлений и 8 удалений

Просмотреть файл

@ -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");

Двоичные данные
dom/quota/test/unit/upgrades/version2_0_profile.zip Normal file

Двоичный файл не отображается.

Двоичный файл не отображается.

Просмотреть файл

@ -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]