Bug 1388954: Remove usages of deprecated SDK modules in DAMP tests. r?bgrins
MozReview-Commit-ID: EqkHiEX2PNr
--- a/testing/talos/talos/tests/devtools/addon/content/damp.js
+++ b/testing/talos/talos/tests/devtools/addon/content/damp.js
@@ -1,24 +1,30 @@
Components.utils.import("resource://devtools/client/framework/gDevTools.jsm");
Components.utils.import("resource://gre/modules/Services.jsm");
const { devtools } =
Components.utils.import("resource://devtools/shared/Loader.jsm", {});
-const { getActiveTab } = devtools.require("sdk/tabs/utils");
-const { getMostRecentBrowserWindow } = devtools.require("sdk/window/utils");
const ThreadSafeChromeUtils = devtools.require("ThreadSafeChromeUtils");
const { EVENTS } = devtools.require("devtools/client/netmonitor/src/constants");
const { Task } = Cu.import("resource://gre/modules/Task.jsm", {});
const webserver = Services.prefs.getCharPref("addon.test.damp.webserver");
const SIMPLE_URL = webserver + "/tests/devtools/addon/content/pages/simple.html";
const COMPLICATED_URL = webserver + "/tests/tp5n/bild.de/www.bild.de/index.html";
+function getMostRecentBrowserWindow() {
+ return Services.wm.getMostRecentWindow("navigator:browser");
+}
+
+function getActiveTab(window) {
+ return window.gBrowser.selectedTab;
+}
+
/* globals res:true */
function Damp() {
// Path to the temp file where the heap snapshot file is saved. Set by
// saveHeapSnapshot and read by readHeapSnapshot.
this._heapSnapshotFilePath = null;
// HeapSnapshot instance. Set by readHeapSnapshot, used by takeCensus.
this._snapshot = null;