mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1321214 - Remove legacy generator from addon-sdk/. r=mossop
This commit is contained in:
parent
5cd305b7b3
commit
b2673a988e
@ -52,7 +52,7 @@ const ChildPageMod = Class({
|
||||
// like `onMessage`, as it'll get piped.
|
||||
setListeners(this, model);
|
||||
|
||||
function deserializeRules(rules) {
|
||||
function* deserializeRules(rules) {
|
||||
for (let rule of rules) {
|
||||
yield rule.type == "string" ? rule.value
|
||||
: new RegExp(rule.pattern, rule.flags);
|
||||
|
@ -118,7 +118,7 @@ const PageMod = Class({
|
||||
pagemods.set(model.id, this);
|
||||
workers.set(this, []);
|
||||
|
||||
function serializeRules(rules) {
|
||||
function* serializeRules(rules) {
|
||||
for (let rule of rules) {
|
||||
yield isRegExp(rule) ? { type: "regexp", pattern: rule.source, flags: rule.flags }
|
||||
: { type: "string", value: rule };
|
||||
|
@ -21,7 +21,7 @@ const BOOTSTRAP_REASONS = {
|
||||
ADDON_DOWNGRADE : 8
|
||||
};
|
||||
|
||||
exports["test install/startup/shutdown/uninstall all return a promise"] = function(assert) {
|
||||
exports["test install/startup/shutdown/uninstall all return a promise"] = function*(assert) {
|
||||
let uri = require.resolve("./fixtures/addon/bootstrap.js");
|
||||
let id = "test-min-boot@jetpack";
|
||||
let bootstrapScope = create({
|
||||
|
@ -416,7 +416,7 @@ exports["test iframe context"] = withTab(function*(assert) {
|
||||
label: "element",
|
||||
context: [new Contexts.Selector("*")]
|
||||
})
|
||||
}, function(_) {
|
||||
}, function*(_) {
|
||||
assert.deepEqual((yield captureContextMenu("iframe")),
|
||||
menugroup(menuseparator(),
|
||||
menuitem({label: "page"}),
|
||||
|
@ -263,7 +263,7 @@ exports['test listen to all events'] = function(assert) {
|
||||
'wildcard listener called for unbound event name');
|
||||
};
|
||||
|
||||
exports['test once'] = function(assert, done) {
|
||||
exports['test once'] = function*(assert, done) {
|
||||
let target = {};
|
||||
let called = false;
|
||||
let { resolve, promise } = defer();
|
||||
|
@ -15,7 +15,7 @@ function countListeners(target, type) {
|
||||
return listeners.filter(listener => listener.type == type).length;
|
||||
}
|
||||
|
||||
exports['test window close clears listeners'] = function(assert) {
|
||||
exports['test window close clears listeners'] = function*(assert) {
|
||||
let window = yield openWindow();
|
||||
let loader = Loader(module);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user