Bug 968436 - Add 1.5 to client records. r=trivial, a=sledru
authorRichard Newman <rnewman@mozilla.com>
Mon, 10 Feb 2014 18:36:02 -0800
changeset 182771 973ad0d8c8acd5941f434571fd82bf5c1c5f8b49
parent 182770 5dd0dfa084cb5285eedff63e383f1ecb8242740a
child 182772 422e4fda92e7f2ec07bd2d1417f5ad336bce1e4a
push id3343
push userffxbld
push dateMon, 17 Mar 2014 21:55:32 +0000
treeherdermozilla-beta@2f7d3415f79f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstrivial, sledru
bugs968436
milestone29.0a2
Bug 968436 - Add 1.5 to client records. r=trivial, a=sledru
services/sync/modules/engines/clients.js
services/sync/tests/unit/test_clients_engine.js
--- a/services/sync/modules/engines/clients.js
+++ b/services/sync/modules/engines/clients.js
@@ -13,17 +13,17 @@ Cu.import("resource://services-common/st
 Cu.import("resource://services-sync/constants.js");
 Cu.import("resource://services-sync/engines.js");
 Cu.import("resource://services-sync/record.js");
 Cu.import("resource://services-sync/util.js");
 
 const CLIENTS_TTL = 1814400; // 21 days
 const CLIENTS_TTL_REFRESH = 604800; // 7 days
 
-const SUPPORTED_PROTOCOL_VERSIONS = ["1.1"];
+const SUPPORTED_PROTOCOL_VERSIONS = ["1.1", "1.5"];
 
 this.ClientsRec = function ClientsRec(collection, id) {
   CryptoWrapper.call(this, collection, id);
 }
 ClientsRec.prototype = {
   __proto__: CryptoWrapper.prototype,
   _logName: "Sync.Record.Clients",
   ttl: CLIENTS_TTL
--- a/services/sync/tests/unit/test_clients_engine.js
+++ b/services/sync/tests/unit/test_clients_engine.js
@@ -27,18 +27,19 @@ function check_record_version(user, id) 
     rec.ciphertext = payload.ciphertext;
     rec.hmac = payload.hmac;
     rec.IV = payload.IV;
 
     let cleartext = rec.decrypt(Service.collectionKeys.keyForCollection("clients"));
 
     _("Payload is " + JSON.stringify(cleartext));
     do_check_eq(Services.appinfo.version, cleartext.version);
-    do_check_eq(1, cleartext.protocols.length);
+    do_check_eq(2, cleartext.protocols.length);
     do_check_eq("1.1", cleartext.protocols[0]);
+    do_check_eq("1.5", cleartext.protocols[1]);
 }
 
 add_test(function test_bad_hmac() {
   _("Ensure that Clients engine deletes corrupt records.");
   let contents = {
     meta: {global: {engines: {clients: {version: engine.version,
                                         syncID: engine.syncID}}}},
     clients: {},