From 056a79a42d11b53478bb57b0d9e0c983b43d730a Mon Sep 17 00:00:00 2001 From: Gregory Szorc Date: Thu, 8 Mar 2012 13:50:09 -0800 Subject: [PATCH] Bug 733987 - API to remove records from Sync's test HTTP server; r=rnewman --- services/sync/tests/unit/head_http_server.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/services/sync/tests/unit/head_http_server.js b/services/sync/tests/unit/head_http_server.js index da3b81ef6bb4..7d44b7300508 100644 --- a/services/sync/tests/unit/head_http_server.js +++ b/services/sync/tests/unit/head_http_server.js @@ -295,6 +295,16 @@ ServerCollection.prototype = { return this.insertWBO(new ServerWBO(id, payload, modified)); }, + /** + * Removes an object entirely from the collection. + * + * @param id + * (string) ID to remove. + */ + remove: function remove(id) { + delete this._wbos[id]; + }, + _inResultSet: function(wbo, options) { return wbo.payload && (!options.ids || (options.ids.indexOf(wbo.id) != -1))