зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1207490 - Part 8: Remove use of expression closure from browser/fuel/. r=Gijs
--HG-- extra : commitid : SuNk0ZfVLn extra : rebase_source : 936f90e7e039eb85b45e836e766d99f56874f14a
This commit is contained in:
Родитель
7cfd1e3584
Коммит
0059c5fb26
|
@ -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;
|
||||
},
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче