Bug 1321214 - Remove legacy generator from addon-sdk/. r=mossop

This commit is contained in:
Tooru Fujisawa 2016-12-01 18:04:50 +09:00
parent 5cd305b7b3
commit b2673a988e
6 changed files with 6 additions and 6 deletions

View File

@ -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);

View File

@ -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 };

View File

@ -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({

View File

@ -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"}),

View File

@ -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();

View File

@ -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);