зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1454202: Follow-up: Fix Marionette test bustage. r=bustage,test-only
MozReview-Commit-ID: 5iWc4ta8TOg
This commit is contained in:
Родитель
a770c946af
Коммит
9e4e8a2190
|
@ -31,7 +31,7 @@ class TestAddons(MarionetteTestCase):
|
||||||
with self.marionette.using_context("chrome"):
|
with self.marionette.using_context("chrome"):
|
||||||
addons = self.marionette.execute_async_script("""
|
addons = self.marionette.execute_async_script("""
|
||||||
Components.utils.import("resource://gre/modules/AddonManager.jsm");
|
Components.utils.import("resource://gre/modules/AddonManager.jsm");
|
||||||
AddonManager.getAllAddons(function(addons) {
|
AddonManager.getAllAddons().then(function(addons) {
|
||||||
let ids = addons.map(x => x.id);
|
let ids = addons.map(x => x.id);
|
||||||
marionetteScriptFinished(ids);
|
marionetteScriptFinished(ids);
|
||||||
});
|
});
|
||||||
|
@ -44,11 +44,10 @@ class TestAddons(MarionetteTestCase):
|
||||||
for addon in (self.all_addon_ids - self.preinstalled_addons):
|
for addon in (self.all_addon_ids - self.preinstalled_addons):
|
||||||
addon_id = self.marionette.execute_async_script("""
|
addon_id = self.marionette.execute_async_script("""
|
||||||
Components.utils.import("resource://gre/modules/AddonManager.jsm");
|
Components.utils.import("resource://gre/modules/AddonManager.jsm");
|
||||||
return new Promise(resolve => {
|
return new Promise(await resolve => {
|
||||||
AddonManager.getAddonByID(arguments[0], function(addon) {
|
let addon = await AddonManager.getAddonByID(arguments[0]);
|
||||||
addon.uninstall();
|
addon.uninstall();
|
||||||
marionetteScriptFinished(addon.id);
|
marionetteScriptFinished(addon.id);
|
||||||
});
|
|
||||||
});
|
});
|
||||||
""", script_args=(addon,))
|
""", script_args=(addon,))
|
||||||
self.assertEqual(addon_id, addon,
|
self.assertEqual(addon_id, addon,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче