gecko-dev/browser/components/migration/tests/unit/test_Edge_availability.js
Gijs Kruitbosch 8d23ab9355 Bug 1311043 - make eslint much more strict in browser/components/migration/, and fix issues, r=mikedeboer
MozReview-Commit-ID: RXO68w3Kv3

--HG--
extra : rebase_source : b25a1976f2be89f12c2ad14e649270bacd17d174
2016-10-18 16:03:06 +01:00

20 lines
769 B
JavaScript

"use strict";
const EDGE_AVAILABLE_MIGRATIONS =
MigrationUtils.resourceTypes.COOKIES |
MigrationUtils.resourceTypes.BOOKMARKS |
MigrationUtils.resourceTypes.HISTORY |
MigrationUtils.resourceTypes.PASSWORDS;
add_task(function* () {
let migrator = MigrationUtils.getMigrator("edge");
Cu.import("resource://gre/modules/AppConstants.jsm");
Assert.equal(!!(migrator && migrator.sourceExists), AppConstants.isPlatformAndVersionAtLeast("win", "10"),
"Edge should be available for migration if and only if we're on Win 10+");
if (migrator) {
let migratableData = migrator.getMigrateData(null, false);
Assert.equal(migratableData, EDGE_AVAILABLE_MIGRATIONS,
"All the data types we expect should be available");
}
});