mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 932759 (part 2) - Have form sync work correctly if FormHistory is disabled. r=rnewman
This commit is contained in:
parent
99feb3d01a
commit
74f929ccaf
@ -53,6 +53,9 @@ let FormWrapper = {
|
||||
},
|
||||
|
||||
_updateSpinningly: function(changes) {
|
||||
if (!Svc.FormHistory.enabled) {
|
||||
return; // update isn't going to do anything.
|
||||
}
|
||||
let cb = Async.makeSpinningCallback();
|
||||
let callbacks = {
|
||||
handleCompletion: function(reason) {
|
||||
|
@ -5,6 +5,7 @@ _("Make sure the form store follows the Store api and correctly accesses the bac
|
||||
Cu.import("resource://services-sync/engines/forms.js");
|
||||
Cu.import("resource://services-sync/service.js");
|
||||
Cu.import("resource://services-sync/util.js");
|
||||
Cu.import("resource://gre/modules/Services.jsm");
|
||||
|
||||
function run_test() {
|
||||
let baseuri = "http://fake/uri/";
|
||||
@ -129,4 +130,22 @@ function run_test() {
|
||||
for (let id in store.getAllIDs()) {
|
||||
do_throw("Shouldn't get any ids!");
|
||||
}
|
||||
|
||||
_("Ensure we work if formfill is disabled.");
|
||||
Services.prefs.setBoolPref("browser.formfill.enable", false);
|
||||
try {
|
||||
// a search
|
||||
for (let id in store.getAllIDs()) {
|
||||
do_throw("Shouldn't get any ids!");
|
||||
}
|
||||
// an update.
|
||||
applyEnsureNoFailures([{
|
||||
id: Utils.makeGUID(),
|
||||
name: "some",
|
||||
value: "entry"
|
||||
}]);
|
||||
} finally {
|
||||
Services.prefs.clearUserPref("browser.formfill.enable");
|
||||
store.wipe();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user