--- a/services/sync/tests/unit/test_storage_sync_engine.js
+++ b/services/sync/tests/unit/test_storage_sync_engine.js
@@ -36,11 +36,29 @@ add_task(function* test_calling_sync_cal
try {
yield engine.sync();
} finally {
StorageSyncEngine.prototype._sync = oldSync;
}
equal(syncMock.calls.length, 1);
});
+add_task(function* test_calling_sync_calls_ext_storage_sync() {
+ const extensionId = "my-extension";
+ let oldSync = ExtensionStorageSync.syncAll;
+ let syncMock = ExtensionStorageSync.syncAll = mock({returns: true});
+ try {
+ yield* withSyncContext(function* (context) {
+ // Set something so that everyone knows that we're using storage.sync
+ yield ExtensionStorageSync.set(extensionId, {"a": "b"}, context);
+
+ yield engine._sync();
+ });
+ } finally {
+ ExtensionStorageSync.syncAll = oldSync;
+ }
+ do_check_true(syncMock.calls.length >= 1);
+});
+
+
function run_test() {
run_next_test();
}