Bug 1207490 - Part 8: Remove use of expression closure from browser/fuel/. r=Gijs

This commit is contained in:
Tooru Fujisawa 2015-09-21 02:28:00 +09:00
parent f148e7bbde
commit 6ef222e046
3 changed files with 13 additions and 13 deletions

View File

@ -18,34 +18,34 @@ var Utilities = {
get bookmarks() {
let bookmarks = Cc["@mozilla.org/browser/nav-bookmarks-service;1"].
getService(Ci.nsINavBookmarksService);
this.__defineGetter__("bookmarks", function() bookmarks);
this.__defineGetter__("bookmarks", () => bookmarks);
return this.bookmarks;
},
get bookmarksObserver() {
let bookmarksObserver = new BookmarksObserver();
this.__defineGetter__("bookmarksObserver", function() bookmarksObserver);
this.__defineGetter__("bookmarksObserver", () => bookmarksObserver);
return this.bookmarksObserver;
},
get annotations() {
let annotations = Cc["@mozilla.org/browser/annotation-service;1"].
getService(Ci.nsIAnnotationService);
this.__defineGetter__("annotations", function() annotations);
this.__defineGetter__("annotations", () => annotations);
return this.annotations;
},
get history() {
let history = Cc["@mozilla.org/browser/nav-history-service;1"].
getService(Ci.nsINavHistoryService);
this.__defineGetter__("history", function() history);
this.__defineGetter__("history", () => history);
return this.history;
},
get windowMediator() {
let windowMediator = Cc["@mozilla.org/appshell/window-mediator;1"].
getService(Ci.nsIWindowMediator);
this.__defineGetter__("windowMediator", function() windowMediator);
this.__defineGetter__("windowMediator", () => windowMediator);
return this.windowMediator;
},

View File

@ -136,10 +136,10 @@ function test() {
// test names array - NOTE: "bookmarkProperties/description" is an annotation too
var names = testBookmark.annotations.names;
ok(names.some(function (f) f == "bookmarkProperties/description"), "Checking for description annotation");
ok(names.some(function (f) f == "testing/bookmark/string"), "Checking for string test annotation");
ok(names.some(function (f) f == "testing/bookmark/int"), "Checking for int test annotation");
ok(names.some(function (f) f == "testing/bookmark/double"), "Checking for double test annotation");
ok(names.some(f => f == "bookmarkProperties/description"), "Checking for description annotation");
ok(names.some(f => f == "testing/bookmark/string"), "Checking for string test annotation");
ok(names.some(f => f == "testing/bookmark/int"), "Checking for int test annotation");
ok(names.some(f => f == "testing/bookmark/double"), "Checking for double test annotation");
// test adding a separator
var testSeparator = testFolder.addSeparator();

View File

@ -85,10 +85,10 @@ function test() {
onPageBLoadComplete();
}
},
onLocationChange: function () 0,
onProgressChange: function () 0,
onStatusChange: function () 0,
onSecurityChange: function () 0
onLocationChange: () => 0,
onProgressChange: () => 0,
onStatusChange: () => 0,
onSecurityChange: () => 0
});
// test loading new content with a frame into a tab