Bug 1429108 - Switch FormHistory::count to promises. r=sgalich,mconley

Differential Revision: https://phabricator.services.mozilla.com/D160923
This commit is contained in:
Marco Bonardo
2022-11-03 09:35:38 +00:00
parent d799769a5f
commit dcb62ba55a
13 changed files with 68 additions and 243 deletions

View File

@@ -343,14 +343,7 @@ class TestFirefoxRefresh(MarionetteTestCase):
formHistoryCount = self.runAsyncCode(
"""
let [resolve] = arguments;
let count;
let callbacks = {
handleResult: rv => count = rv,
handleCompletion() {
resolve(count);
},
};
global.FormHistory.count({}, callbacks);
global.FormHistory.count({}).then(resolve);
"""
)
self.assertEqual(