Bug 1386052: Update testBrowserDatabaseHelperUpgrades from new info. r=grisha draft
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 02 Aug 2017 13:47:57 -0700
changeset 620035 d3568dd714b1489992af8e361f94756102bf4f51
parent 620034 29db64e95990bde9750da2efee061fa5e7845b89
child 620036 13ffd3a70c2d279de665197040b6373445fbb5eb
push id71897
push usermichael.l.comella@gmail.com
push dateWed, 02 Aug 2017 23:58:29 +0000
reviewersgrisha
bugs1386052
milestone56.0a1
Bug 1386052: Update testBrowserDatabaseHelperUpgrades from new info. r=grisha Grisha showed me the link from Android API level to SQLite version and presumably all 3.7.* releases are forwards compatible so we can relax the requirement of which version of Android the test DBs need to be created on: I updated the comment accordingly. MozReview-Commit-ID: Fhu95671kSK
mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserDatabaseHelperUpgrades.java
--- a/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserDatabaseHelperUpgrades.java
+++ b/mobile/android/tests/browser/robocop/src/org/mozilla/gecko/tests/testBrowserDatabaseHelperUpgrades.java
@@ -43,25 +43,22 @@ import java.util.ArrayList;
  * this via Margaret's copy profile addon - take browser.db from the profile directory. This db copy should contain a
  * used profile - e.g. history items, bookmarks. A good way to get a used profile is to sign into sync.
  *   * MAKE SURE YOU COPY YOUR DB FIRST. Then make your changes to the DB schema code.
  *   * Test!
  *   * Note: when the application starts for testing, it may need to upgrade the database from your existing version. If
  * this fails, the application will crash and the test may fail to start.
  *
  * IMPORTANT:
- * Test DBs must be created on the oldest version of Android that is currently supported. SQLite
- * is not forwards compatible. E.g. uploading a DB created on a 6.0 device will cause failures
- * when robocop tests running on 4.3 are unable to load it.
- *
- * [mcomella] I was unable to find an API 15 device so I created the v37 DB using API 18 (Jelly Bean). According to
- * https://stackoverflow.com/a/4377116/2219998, API 16-20 share the same version of SQLite so only API 15 devices
- * may not be able to run the test. We run robocop on 4.3 devices so CI should still pass and it's unlikely that
- * someone is developing on a 4.0.3 device at this time: I don't think it's worth the time to create an API 15
- * DB.
+ * Test DBs must be created on APIs 11-20 (as of the time of writing): SQLite is not forwards compatible,
+ * e.g. uploading a DB created on 6.0 will cause failures when running this test on 4.3, so test DBs must
+ * be created on the version of SQLite from the oldest version of Android that is currently supported.
+ * See https://developer.android.com/reference/android/database/sqlite/package-summary.html for a list of
+ * Android API level to SQLite version. Caveat from the link: "Some device manufacturers include different
+ * versions of SQLite on their devices."
  *
  * Implementation inspired by:
  *   http://riggaroo.co.za/automated-testing-sqlite-database-upgrades-android/
  */
 public class testBrowserDatabaseHelperUpgrades extends UITest {
     private static final int TEST_FROM_VERSION = 27; // We only started testing on this version.
 
     private ArrayList<File> temporaryDbFiles;