Bug 1436187 - Fix linting errors in shared-head.js. r=bgrins
After moving shared-head.js, linting is activated because the new path is not
ignored.
MozReview-Commit-ID: GCLDfgJ7WCb
--- a/devtools/client/shared/test/shared-head.js
+++ b/devtools/client/shared/test/shared-head.js
@@ -79,17 +79,17 @@ registerCleanupFunction(function () {
// Services.prefs.setBoolPref("devtools.dump.emit", true);
/**
* Watch console messages for failed propType definitions in React components.
*/
const ConsoleObserver = {
QueryInterface: XPCOMUtils.generateQI([Ci.nsIObserver]),
- observe: function (subject, topic, data) {
+ observe: function (subject) {
let message = subject.wrappedJSObject.arguments[0];
if (message && /Failed propType/.test(message.toString())) {
ok(false, message);
}
}
};
@@ -438,22 +438,22 @@ var openNewTabAndToolbox = Task.async(fu
/**
* Close a tab and if necessary, the toolbox that belongs to it
* @param {Tab} tab The tab to close.
* @return {Promise} Resolves when the toolbox and tab have been destroyed and
* closed.
*/
var closeTabAndToolbox = Task.async(function* (tab = gBrowser.selectedTab) {
- let target = TargetFactory.forTab(gBrowser.selectedTab);
+ let target = TargetFactory.forTab(tab);
if (target) {
yield gDevTools.closeToolbox(target);
}
- yield removeTab(gBrowser.selectedTab);
+ yield removeTab(tab);
});
/**
* Close a toolbox and the current tab.
* @param {Toolbox} toolbox The toolbox to close.
* @return {Promise} Resolves when the toolbox and tab have been destroyed and
* closed.
*/
@@ -653,18 +653,17 @@ function stopRecordingTelemetryLogs(Tele
delete Telemetry.prototype.telemetryInfo;
}
/**
* Clean the logical clipboard content. This method only clears the OS clipboard on
* Windows (see Bug 666254).
*/
function emptyClipboard() {
- let clipboard = Cc["@mozilla.org/widget/clipboard;1"]
- .getService(SpecialPowers.Ci.nsIClipboard);
+ let clipboard = Services.clipboard;
clipboard.emptyClipboard(clipboard.kGlobalClipboard);
}
/**
* Check if the current operating system is Windows.
*/
function isWindows() {
return Services.appinfo.OS === "WINNT";