diff --git a/addon-sdk/source/lib/sdk/content/page-mod.js b/addon-sdk/source/lib/sdk/content/page-mod.js index 8ff9b1e7b7fe..2c12781dfa14 100644 --- a/addon-sdk/source/lib/sdk/content/page-mod.js +++ b/addon-sdk/source/lib/sdk/content/page-mod.js @@ -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); diff --git a/addon-sdk/source/lib/sdk/page-mod.js b/addon-sdk/source/lib/sdk/page-mod.js index 538be2732beb..cd1090478f28 100644 --- a/addon-sdk/source/lib/sdk/page-mod.js +++ b/addon-sdk/source/lib/sdk/page-mod.js @@ -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 }; diff --git a/addon-sdk/source/test/test-addon-bootstrap.js b/addon-sdk/source/test/test-addon-bootstrap.js index 01e2d15fc3d4..a23e9b588044 100644 --- a/addon-sdk/source/test/test-addon-bootstrap.js +++ b/addon-sdk/source/test/test-addon-bootstrap.js @@ -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({ diff --git a/addon-sdk/source/test/test-context-menu@2.js b/addon-sdk/source/test/test-context-menu@2.js index 78c496220ab2..9de465ae08bc 100644 --- a/addon-sdk/source/test/test-context-menu@2.js +++ b/addon-sdk/source/test/test-context-menu@2.js @@ -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"}), diff --git a/addon-sdk/source/test/test-event-core.js b/addon-sdk/source/test/test-event-core.js index ca937b259651..221b05872509 100644 --- a/addon-sdk/source/test/test-event-core.js +++ b/addon-sdk/source/test/test-event-core.js @@ -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(); diff --git a/addon-sdk/source/test/test-event-dom.js b/addon-sdk/source/test/test-event-dom.js index fbbc6825bf88..8ed4d1eb41d7 100644 --- a/addon-sdk/source/test/test-event-dom.js +++ b/addon-sdk/source/test/test-event-dom.js @@ -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);