Bug 1266235 - Rename kinto-updater to blocklist-updater,r=mgoodwin
MozReview-Commit-ID: 8bDKbxbIus3
rename from services/common/kinto-updater.js
rename to services/common/blocklist-updater.js
--- a/services/common/moz.build
+++ b/services/common/moz.build
@@ -10,19 +10,19 @@ with Files('**'):
TEST_DIRS += ['tests']
EXTRA_COMPONENTS += [
'servicesComponents.manifest',
]
EXTRA_JS_MODULES['services-common'] += [
'async.js',
+ 'blocklist-updater.js',
'kinto-http-client.js',
'kinto-offline-client.js',
- 'kinto-updater.js',
'KintoBlocklist.js',
'logmanager.js',
'observers.js',
'rest.js',
'stringbundle.js',
'utils.js',
]
rename from services/common/tests/unit/test_kinto_updater.js
rename to services/common/tests/unit/test_blocklist_updater.js
--- a/services/common/tests/unit/test_kinto_updater.js
+++ b/services/common/tests/unit/test_blocklist_updater.js
@@ -1,9 +1,8 @@
-Cu.import("resource://services-common/kinto-updater.js")
Cu.import("resource://testing-common/httpd.js");
var server;
const PREF_KINTO_BASE = "services.kinto.base";
const PREF_LAST_UPDATE = "services.kinto.last_update_seconds";
const PREF_LAST_ETAG = "services.kinto.last_etag";
const PREF_CLOCK_SKEW_SECONDS = "services.kinto.clock_skew_seconds";
@@ -47,17 +46,17 @@ add_task(function* test_check_maybeSync(
// set some initial values so we can check these are updated appropriately
Services.prefs.setIntPref(PREF_LAST_UPDATE, 0);
Services.prefs.setIntPref(PREF_CLOCK_SKEW_SECONDS, 0);
Services.prefs.clearUserPref(PREF_LAST_ETAG);
let startTime = Date.now();
- let updater = Cu.import("resource://services-common/kinto-updater.js");
+ let updater = Cu.import("resource://services-common/blocklist-updater.js");
let syncPromise = new Promise(function(resolve, reject) {
// add a test kinto client that will respond to lastModified information
// for a collection called 'test-collection'
updater.addTestKintoClient("test-collection", {
maybeSync(lastModified, serverTime) {
do_check_eq(lastModified, 1000);
do_check_eq(serverTime, 2000);
--- a/services/common/tests/unit/xpcshell.ini
+++ b/services/common/tests/unit/xpcshell.ini
@@ -4,20 +4,21 @@ tail =
firefox-appdir = browser
skip-if = toolkit == 'gonk'
support-files =
test_storage_adapter/**
# Test load modules first so syntax failures are caught early.
[test_load_modules.js]
-[test_kinto.js]
-[test_kinto_updater.js]
+[test_blocklist_updater.js]
[test_kintoAddonPluginBlocklist.js]
[test_kintoCertBlocklist.js]
+
+[test_kinto.js]
[test_storage_adapter.js]
[test_utils_atob.js]
[test_utils_convert_string.js]
[test_utils_dateprefs.js]
[test_utils_deepCopy.js]
[test_utils_encodeBase32.js]
[test_utils_encodeBase64URL.js]
--- a/toolkit/mozapps/extensions/nsBlocklistService.js
+++ b/toolkit/mozapps/extensions/nsBlocklistService.js
@@ -628,17 +628,17 @@ Blocklist.prototype = {
// When the blocklist loads we need to compare it to the current copy so
// make sure we have loaded it.
if (!this._isBlocklistLoaded())
this._loadBlocklist();
// If kinto update is enabled, do the kinto update
if (gPref.getBoolPref(PREF_KINTO_UPDATE_ENABLED)) {
let KintoUpdater =
- Components.utils.import("resource://services-common/kinto-updater.js",
+ Components.utils.import("resource://services-common/blocklist-updater.js",
{});
KintoUpdater.checkVersions().catch(() => {
// Before we enable this in release, we want to collect telemetry on
// failed kinto updates - see bug 1254099
});
}
},