diff options
author | Moonchild <mcwerewolf@wolfbeast.com> | 2018-12-12 11:01:48 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-12 11:01:48 +0100 |
commit | bc8a25f5e33700f700b1e07b238bef5dae22f1ad (patch) | |
tree | c1f1ec816f1a85459d05bd6a4cf4f6170b01c602 /services/sync/tests/unit/test_records_crypto.js | |
parent | f2d4bd1e395f903355cc157a1de7207e5b22b7fb (diff) | |
parent | 9697bfa68f32984b196748e388d743dddbe6aa7b (diff) | |
download | UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.tar UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.tar.gz UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.tar.lz UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.tar.xz UXP-bc8a25f5e33700f700b1e07b238bef5dae22f1ad.zip |
Merge pull request #898 from MoonchildProductions/Sync-weave
Remove FxA Phase 1
Diffstat (limited to 'services/sync/tests/unit/test_records_crypto.js')
-rw-r--r-- | services/sync/tests/unit/test_records_crypto.js | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/services/sync/tests/unit/test_records_crypto.js b/services/sync/tests/unit/test_records_crypto.js index 392a746ef..4d623c917 100644 --- a/services/sync/tests/unit/test_records_crypto.js +++ b/services/sync/tests/unit/test_records_crypto.js @@ -10,7 +10,7 @@ Cu.import("resource://services-sync/service.js"); Cu.import("resource://services-sync/util.js"); Cu.import("resource://testing-common/services/sync/utils.js"); -var cryptoWrap; +let cryptoWrap; function crypted_resource_handler(metadata, response) { let obj = {id: "resource", @@ -148,32 +148,6 @@ function run_test() { do_check_eq(bookmarkItem.decrypt(Service.collectionKeys.keyForCollection("bookmarks")).stuff, "my payload here"); - do_check_true(Service.collectionKeys.hasKeysFor(["bookmarks"])); - - // Add a key for some new collection and verify that it isn't the - // default key. - do_check_false(Service.collectionKeys.hasKeysFor(["forms"])); - do_check_false(Service.collectionKeys.hasKeysFor(["bookmarks", "forms"])); - let oldFormsKey = Service.collectionKeys.keyForCollection("forms"); - do_check_eq(oldFormsKey, Service.collectionKeys._default); - let newKeys = Service.collectionKeys.ensureKeysFor(["forms"]); - do_check_true(newKeys.hasKeysFor(["forms"])); - do_check_true(newKeys.hasKeysFor(["bookmarks", "forms"])); - let newFormsKey = newKeys.keyForCollection("forms"); - do_check_neq(newFormsKey, oldFormsKey); - - // Verify that this doesn't overwrite keys - let regetKeys = newKeys.ensureKeysFor(["forms"]); - do_check_eq(regetKeys.keyForCollection("forms"), newFormsKey); - - const emptyKeys = new CollectionKeyManager(); - payload = { - default: Service.collectionKeys._default.keyPairB64, - collections: {} - }; - // Verify that not passing `modified` doesn't throw - emptyKeys.setContents(payload, null); - log.info("Done!"); } finally { |