mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1207490 - Part 8: Remove use of expression closure from browser/fuel/. r=Gijs
This commit is contained in:
parent
f148e7bbde
commit
6ef222e046
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user