Bug 1608025 - Clean up the test for the upgrade from storage version 2.0; r=asuth
authorJan Varga <jan.varga@gmail.com>
Tue, 14 Jan 2020 06:15:53 +0000
changeset 510306 40063da9c025ed72fb691d44fb49539485cf25ae
parent 510305 968faf5e2e78ea1033f9477a64d230a3cc357973
child 510307 cef274a06b241c87d303e425c05a6638d8bd3961
push id37018
push usercsabou@mozilla.com
push dateWed, 15 Jan 2020 15:47:40 +0000
treeherdermozilla-central@28abd2840682 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersasuth
bugs1608025
milestone74.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1608025 - Clean up the test for the upgrade from storage version 2.0; r=asuth Differential Revision: https://phabricator.services.mozilla.com/D59709
dom/quota/test/unit/upgrades/test_upgradeStorageFrom2_0.js
dom/quota/test/unit/upgrades/test_version2_1upgrade.js
dom/quota/test/unit/upgrades/version2_0_profile.zip
dom/quota/test/unit/upgrades/version2_1upgrade_profile.zip
dom/quota/test/unit/upgrades/xpcshell.ini
rename from dom/quota/test/unit/upgrades/test_version2_1upgrade.js
rename to dom/quota/test/unit/upgrades/test_upgradeStorageFrom2_0.js
--- a/dom/quota/test/unit/upgrades/test_version2_1upgrade.js
+++ b/dom/quota/test/unit/upgrades/test_upgradeStorageFrom2_0.js
@@ -1,65 +1,68 @@
 /**
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/
  */
 
+/**
+ * This test is mainly to verify UpgradeStorageFrom2_0To2_1 method.
+ */
+
 var testGenerator = testSteps();
 
 function* testSteps() {
   const origins = [
     "storage/default/chrome/",
     "storage/default/http+++www.mozilla.org/",
   ];
   const paddingFilePath = "cache/.padding";
 
   info("Clearing");
 
   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
   // The file create_cache.js in the package was run locally, specifically it
   // was temporarily added to xpcshell.ini and then executed:
   //   mach xpcshell-test --interactive dom/quota/test/unit/create_cache.js
   // Note: it only creates the directory "storage/default/chrome/cache".
   // To make it become the profile in the test, two more manual steps are
   // needed.
   // 1. Remove the folder "storage/temporary".
   // 2. Copy the content under the "storage/default/chrome" to
   //    "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");
 
     info("Reading out contents of padding file");
 
     File.createFromNsIFile(paddingFile).then(grabArgAndContinueHandler);
     let domFile = yield undefined;
 
rename from dom/quota/test/unit/upgrades/version2_1upgrade_profile.zip
rename to dom/quota/test/unit/upgrades/version2_0_profile.zip
index 2b42848f52aea70807039aa75d7b4eece6607af5..c140df56e4b14219d71912a3a01a7743cd2b2fac
GIT binary patch
literal 5119
zc$^FHW@Zs#U|`^2Sly}Sy?)=>*5^Q86(a)!KZ5{6a#3nxNoss@Vsb{RURH5v1P{Yq
zovAUC1U5u|WfWnUI>FHYhyhRQ_di^#gKsai3=?2}q_R!;(%n9%N86@F?e@BJS@cM~
zIxq8@oR61(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*1<Y@u1G7)y@
zmKou+rh)CoB;&46#laIJkZcL+Q1kw#Bx`C23K%8^20nx>NToIpFcf(BAO>>teL1P)
z8R~Ib|CFyzpg~$fQbI~fK|nwP5VR!SY2aM1!yK`H-U;WpM_2lqfUy|h&B!FmjH_?T
z1B(@hEsY=wqo>LN@2Nrz!qtI881&Xr1!y#)JI4W!MSLa*pqLPaWCEgVhutL1jvcZ|
zGq9M1vzx~O@8%&}fZ54Iw%{%C7QniE9Pln5vNf0;K7=)Y9X*(cwg%RW;D9$HkkbHW
z=MQ1clE%fPT7%Za;DD!oe35N}5`vlRB-#ltAh0J0%w`+1ZKtu=25-cn2N|v=9I}A|
z95@XmEhe;3Vj`N5v1En33X0POc?sBoGo*19#K`4IGH%n6ie+?n<0^iUO+HS9$>72m
lyWyCnE^@%@@-bkP!5r{1IKZ2g4Wy7C2>n?Z7-sQ-cmU^bZ=3)C
--- a/dom/quota/test/unit/upgrades/xpcshell.ini
+++ b/dom/quota/test/unit/upgrades/xpcshell.ini
@@ -14,26 +14,26 @@ support-files =
   persistentAndDefaultStorageDirectory_profile.zip
   persistentStorageDirectory_flatOriginDirectories_profile.zip
   persistentStorageDirectory_originDirectories_profile.zip
   persistentStorageDirectory_profile.zip
   version0_0_profile.zip
   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]
 [test_localStorageArchive4upgrade.js]
 [test_localStorageArchiveDowngrade.js]
 [test_obsoleteOrigins.js]
 [test_upgradeFromIndexedDBDirectory.js]
 [test_upgradeFromIndexedDBDirectory_removeOldDirectory.js]
 [test_upgradeFromFlatOriginDirectories.js]
 [test_upgradeFromPersistentStorageDirectory.js]
 [test_upgradeFromPersistentStorageDirectory_removeOldDirectory.js]
 [test_upgradeFromPersistentStorageDirectory_upgradeOriginDirectories.js]
 [test_upgradeStorageFrom0_0.js]
 [test_upgradeStorageFrom1_0_removeAppsData.js]
 [test_upgradeStorageFrom1_0_removeMorgueDirectory.js]
 [test_upgradeStorageFrom1_0_stripObsoleteOriginAttributes.js]
-[test_version2_1upgrade.js]
+[test_upgradeStorageFrom2_0.js]