mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-27 21:00:50 +00:00
Bug 1309866 - Use toolbox loader to load common libs into Netmonitor r=Honza
MozReview-Commit-ID: nENUb4FV61 --HG-- extra : rebase_source : cd462745c8f72091a9b42261e9a7c514ff1496f5
This commit is contained in:
parent
2df219dc2b
commit
b524278047
@ -14,8 +14,7 @@ devtools.jar:
|
||||
content/projecteditor/chrome/content/projecteditor-test.xul (projecteditor/chrome/content/projecteditor-test.xul)
|
||||
content/projecteditor/chrome/content/projecteditor-loader.js (projecteditor/chrome/content/projecteditor-loader.js)
|
||||
content/netmonitor/netmonitor.xul (netmonitor/netmonitor.xul)
|
||||
content/netmonitor/netmonitor-controller.js (netmonitor/netmonitor-controller.js)
|
||||
content/netmonitor/netmonitor-view.js (netmonitor/netmonitor-view.js)
|
||||
content/netmonitor/netmonitor.js (netmonitor/netmonitor.js)
|
||||
content/webconsole/webconsole.xul (webconsole/webconsole.xul)
|
||||
* content/scratchpad/scratchpad.xul (scratchpad/scratchpad.xul)
|
||||
content/scratchpad/scratchpad.js (scratchpad/scratchpad.js)
|
||||
|
@ -30,4 +30,21 @@ const actionTypes = {
|
||||
WATERFALL_RESIZE: "WATERFALL_RESIZE",
|
||||
};
|
||||
|
||||
module.exports = Object.assign({}, general, actionTypes);
|
||||
// Descriptions for what this frontend is currently doing.
|
||||
const ACTIVITY_TYPE = {
|
||||
// Standing by and handling requests normally.
|
||||
NONE: 0,
|
||||
|
||||
// Forcing the target to reload with cache enabled or disabled.
|
||||
RELOAD: {
|
||||
WITH_CACHE_ENABLED: 1,
|
||||
WITH_CACHE_DISABLED: 2,
|
||||
WITH_CACHE_DEFAULT: 3
|
||||
},
|
||||
|
||||
// Enabling or disabling the cache without triggering a reload.
|
||||
ENABLE_CACHE: 3,
|
||||
DISABLE_CACHE: 4
|
||||
};
|
||||
|
||||
module.exports = Object.assign({ ACTIVITY_TYPE }, general, actionTypes);
|
||||
|
@ -2,14 +2,14 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* import-globals-from ./netmonitor-controller.js */
|
||||
/* eslint-disable mozilla/reject-some-requires */
|
||||
/* globals dumpn, $, NetMonitorView, gNetwork */
|
||||
/* globals window, dumpn, $, NetMonitorView, gNetwork */
|
||||
|
||||
"use strict";
|
||||
|
||||
const promise = require("promise");
|
||||
const EventEmitter = require("devtools/shared/event-emitter");
|
||||
const Editor = require("devtools/client/sourceeditor/editor");
|
||||
const { Heritage } = require("devtools/client/shared/widgets/view-helpers");
|
||||
const { Task } = require("devtools/shared/task");
|
||||
const { ToolSidebar } = require("devtools/client/framework/sidebar");
|
||||
|
@ -16,7 +16,7 @@ function* throttleUploadTest(actuallyThrottle) {
|
||||
|
||||
info("Starting test... (actuallyThrottle = " + actuallyThrottle + ")");
|
||||
|
||||
let { NetMonitorView } = monitor.panelWin;
|
||||
let { NetMonitorController, NetMonitorView } = monitor.panelWin;
|
||||
let { RequestsMenu } = NetMonitorView;
|
||||
|
||||
const size = 4096;
|
||||
@ -32,7 +32,7 @@ function* throttleUploadTest(actuallyThrottle) {
|
||||
uploadBPSMax: uploadSize,
|
||||
},
|
||||
};
|
||||
let client = monitor._controller.webConsoleClient;
|
||||
let client = NetMonitorController.webConsoleClient;
|
||||
|
||||
info("sending throttle request");
|
||||
let deferred = promise.defer();
|
||||
|
@ -19,6 +19,8 @@ DevToolsModules(
|
||||
'events.js',
|
||||
'filter-predicates.js',
|
||||
'l10n.js',
|
||||
'netmonitor-controller.js',
|
||||
'netmonitor-view.js',
|
||||
'panel.js',
|
||||
'performance-statistics-view.js',
|
||||
'prefs.js',
|
||||
|
@ -3,37 +3,10 @@
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* eslint-disable mozilla/reject-some-requires */
|
||||
/* globals window, NetMonitorView, gStore, Actions */
|
||||
/* exported loader */
|
||||
/* globals window, NetMonitorView, gStore, dumpn */
|
||||
|
||||
"use strict";
|
||||
|
||||
var { utils: Cu } = Components;
|
||||
|
||||
// Descriptions for what this frontend is currently doing.
|
||||
const ACTIVITY_TYPE = {
|
||||
// Standing by and handling requests normally.
|
||||
NONE: 0,
|
||||
|
||||
// Forcing the target to reload with cache enabled or disabled.
|
||||
RELOAD: {
|
||||
WITH_CACHE_ENABLED: 1,
|
||||
WITH_CACHE_DISABLED: 2,
|
||||
WITH_CACHE_DEFAULT: 3
|
||||
},
|
||||
|
||||
// Enabling or disabling the cache without triggering a reload.
|
||||
ENABLE_CACHE: 3,
|
||||
DISABLE_CACHE: 4
|
||||
};
|
||||
|
||||
var BrowserLoaderModule = {};
|
||||
Cu.import("resource://devtools/client/shared/browser-loader.js", BrowserLoaderModule);
|
||||
var { loader, require } = BrowserLoaderModule.BrowserLoader({
|
||||
baseURI: "resource://devtools/client/netmonitor/",
|
||||
window
|
||||
});
|
||||
|
||||
const promise = require("promise");
|
||||
const Services = require("Services");
|
||||
const {XPCOMUtils} = require("resource://gre/modules/XPCOMUtils.jsm");
|
||||
@ -41,17 +14,23 @@ const EventEmitter = require("devtools/shared/event-emitter");
|
||||
const Editor = require("devtools/client/sourceeditor/editor");
|
||||
const {TimelineFront} = require("devtools/shared/fronts/timeline");
|
||||
const {Task} = require("devtools/shared/task");
|
||||
const {EVENTS} = require("./events");
|
||||
const { ACTIVITY_TYPE } = require("./constants");
|
||||
const { EVENTS } = require("./events");
|
||||
const { configureStore } = require("./store");
|
||||
const Actions = require("./actions/index");
|
||||
const { getDisplayedRequestById } = require("./selectors/index");
|
||||
const { Prefs } = require("./prefs");
|
||||
|
||||
XPCOMUtils.defineConstant(this, "EVENTS", EVENTS);
|
||||
XPCOMUtils.defineConstant(this, "ACTIVITY_TYPE", ACTIVITY_TYPE);
|
||||
XPCOMUtils.defineConstant(this, "Editor", Editor);
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Chart",
|
||||
XPCOMUtils.defineConstant(window, "EVENTS", EVENTS);
|
||||
XPCOMUtils.defineConstant(window, "ACTIVITY_TYPE", ACTIVITY_TYPE);
|
||||
XPCOMUtils.defineConstant(window, "Editor", Editor);
|
||||
XPCOMUtils.defineConstant(window, "Prefs", Prefs);
|
||||
XPCOMUtils.defineLazyModuleGetter(window, "Chart",
|
||||
"resource://devtools/client/shared/widgets/Chart.jsm");
|
||||
|
||||
// Initialize the global Redux store
|
||||
window.gStore = configureStore();
|
||||
|
||||
/**
|
||||
* Object defining the network monitor controller components.
|
||||
*/
|
||||
@ -739,7 +718,7 @@ NetworkEventsHandler.prototype = {
|
||||
/**
|
||||
* Convenient way of emitting events from the panel window.
|
||||
*/
|
||||
EventEmitter.decorate(this);
|
||||
EventEmitter.decorate(window);
|
||||
|
||||
/**
|
||||
* Preliminary setup for the NetMonitorController object.
|
||||
@ -759,14 +738,4 @@ Object.defineProperties(window, {
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Helper method for debugging.
|
||||
* @param string
|
||||
*/
|
||||
function dumpn(str) {
|
||||
if (wantLogging) {
|
||||
dump("NET-FRONTEND: " + str + "\n");
|
||||
}
|
||||
}
|
||||
|
||||
var wantLogging = Services.prefs.getBoolPref("devtools.debugger.log");
|
||||
exports.NetMonitorController = NetMonitorController;
|
||||
|
@ -2,26 +2,25 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* import-globals-from ./netmonitor-controller.js */
|
||||
/* eslint-disable mozilla/reject-some-requires */
|
||||
/* globals Prefs, setInterval, setTimeout, clearInterval, clearTimeout, btoa */
|
||||
/* exported $, $all */
|
||||
/* globals $, gStore, NetMonitorController, dumpn */
|
||||
|
||||
"use strict";
|
||||
|
||||
const { testing: isTesting } = require("devtools/shared/flags");
|
||||
const promise = require("promise");
|
||||
const Editor = require("devtools/client/sourceeditor/editor");
|
||||
const { Task } = require("devtools/shared/task");
|
||||
const { ViewHelpers } = require("devtools/client/shared/widgets/view-helpers");
|
||||
const { configureStore } = require("./store");
|
||||
const { RequestsMenuView } = require("./requests-menu-view");
|
||||
const { CustomRequestView } = require("./custom-request-view");
|
||||
const { ToolbarView } = require("./toolbar-view");
|
||||
const { SidebarView } = require("./sidebar-view");
|
||||
const { DetailsView } = require("./details-view");
|
||||
const { PerformanceStatisticsView } = require("./performance-statistics-view");
|
||||
var {Prefs} = require("./prefs");
|
||||
|
||||
// Initialize the global redux variables
|
||||
var gStore = configureStore();
|
||||
const { ACTIVITY_TYPE } = require("./constants");
|
||||
const Actions = require("./actions/index");
|
||||
const { Prefs } = require("./prefs");
|
||||
|
||||
// ms
|
||||
const WDA_DEFAULT_VERIFY_INTERVAL = 50;
|
||||
@ -236,13 +235,6 @@ var NetMonitorView = {
|
||||
_editorPromises: new Map()
|
||||
};
|
||||
|
||||
/**
|
||||
* DOM query helper.
|
||||
* TODO: Move it into "dom-utils.js" module and "require" it when needed.
|
||||
*/
|
||||
var $ = (selector, target = document) => target.querySelector(selector);
|
||||
var $all = (selector, target = document) => target.querySelectorAll(selector);
|
||||
|
||||
/**
|
||||
* Makes sure certain properties are available on all objects in a data store.
|
||||
*
|
||||
@ -287,3 +279,5 @@ NetMonitorView.NetworkDetails = new DetailsView();
|
||||
NetMonitorView.RequestsMenu = new RequestsMenuView();
|
||||
NetMonitorView.CustomRequest = new CustomRequestView();
|
||||
NetMonitorView.PerformanceStatistics = new PerformanceStatisticsView();
|
||||
|
||||
exports.NetMonitorView = NetMonitorView;
|
||||
|
60
devtools/client/netmonitor/netmonitor.js
Normal file
60
devtools/client/netmonitor/netmonitor.js
Normal file
@ -0,0 +1,60 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* globals window, document, NetMonitorController, NetMonitorView */
|
||||
/* exported Netmonitor, NetMonitorController, NetMonitorView, $, $all, dumpn */
|
||||
|
||||
"use strict";
|
||||
|
||||
const Cu = Components.utils;
|
||||
const { Services } = Cu.import("resource://gre/modules/Services.jsm", {});
|
||||
const { BrowserLoader } = Cu.import("resource://devtools/client/shared/browser-loader.js", {});
|
||||
|
||||
function Netmonitor(toolbox) {
|
||||
const { require } = BrowserLoader({
|
||||
baseURI: "resource://devtools/client/netmonitor/",
|
||||
window,
|
||||
commonLibRequire: toolbox.browserRequire,
|
||||
});
|
||||
|
||||
window.windowRequire = require;
|
||||
|
||||
const { NetMonitorController } = require("./netmonitor-controller.js");
|
||||
const { NetMonitorView } = require("./netmonitor-view.js");
|
||||
|
||||
window.NetMonitorController = NetMonitorController;
|
||||
window.NetMonitorView = NetMonitorView;
|
||||
|
||||
NetMonitorController._toolbox = toolbox;
|
||||
NetMonitorController._target = toolbox.target;
|
||||
}
|
||||
|
||||
Netmonitor.prototype = {
|
||||
init() {
|
||||
return window.NetMonitorController.startupNetMonitor();
|
||||
},
|
||||
|
||||
destroy() {
|
||||
return window.NetMonitorController.shutdownNetMonitor();
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* DOM query helper.
|
||||
* TODO: Move it into "dom-utils.js" module and "require" it when needed.
|
||||
*/
|
||||
var $ = (selector, target = document) => target.querySelector(selector);
|
||||
var $all = (selector, target = document) => target.querySelectorAll(selector);
|
||||
|
||||
/**
|
||||
* Helper method for debugging.
|
||||
* @param string
|
||||
*/
|
||||
function dumpn(str) {
|
||||
if (wantLogging) {
|
||||
dump("NET-FRONTEND: " + str + "\n");
|
||||
}
|
||||
}
|
||||
|
||||
var wantLogging = Services.prefs.getBoolPref("devtools.debugger.log");
|
@ -12,8 +12,7 @@
|
||||
|
||||
<script type="application/javascript;version=1.8"
|
||||
src="chrome://devtools/content/shared/theme-switching.js"/>
|
||||
<script type="text/javascript" src="netmonitor-controller.js"/>
|
||||
<script type="text/javascript" src="netmonitor-view.js"/>
|
||||
<script type="text/javascript" src="netmonitor.js"/>
|
||||
|
||||
<deck id="body"
|
||||
class="theme-sidebar"
|
||||
|
@ -14,10 +14,7 @@ function NetMonitorPanel(iframeWindow, toolbox) {
|
||||
this.panelDoc = iframeWindow.document;
|
||||
this._toolbox = toolbox;
|
||||
|
||||
this._view = this.panelWin.NetMonitorView;
|
||||
this._controller = this.panelWin.NetMonitorController;
|
||||
this._controller._target = this.target;
|
||||
this._controller._toolbox = this._toolbox;
|
||||
this._netmonitor = new iframeWindow.Netmonitor(toolbox);
|
||||
|
||||
EventEmitter.decorate(this);
|
||||
}
|
||||
@ -46,7 +43,8 @@ NetMonitorPanel.prototype = {
|
||||
yield this.target.makeRemote();
|
||||
}
|
||||
|
||||
yield this._controller.startupNetMonitor();
|
||||
yield this._netmonitor.init();
|
||||
|
||||
this.isReady = true;
|
||||
this.emit("ready");
|
||||
|
||||
@ -67,7 +65,7 @@ NetMonitorPanel.prototype = {
|
||||
let deferred = promise.defer();
|
||||
this._destroying = deferred.promise;
|
||||
|
||||
yield this._controller.shutdownNetMonitor();
|
||||
yield this._netmonitor.destroy();
|
||||
this.emit("destroyed");
|
||||
|
||||
deferred.resolve();
|
||||
|
@ -2,16 +2,21 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* import-globals-from ./netmonitor-controller.js */
|
||||
/* globals $ */
|
||||
/* eslint-disable mozilla/reject-some-requires */
|
||||
/* globals $, window, document, NetMonitorView */
|
||||
|
||||
"use strict";
|
||||
|
||||
const {XPCOMUtils} = require("resource://gre/modules/XPCOMUtils.jsm");
|
||||
const {PluralForm} = require("devtools/shared/plural-form");
|
||||
const {Filters} = require("./filter-predicates");
|
||||
const {L10N} = require("./l10n");
|
||||
const {EVENTS} = require("./events");
|
||||
const Actions = require("./actions/index");
|
||||
|
||||
XPCOMUtils.defineLazyModuleGetter(this, "Chart",
|
||||
"resource://devtools/client/shared/widgets/Chart.jsm");
|
||||
|
||||
const REQUEST_TIME_DECIMALS = 2;
|
||||
const CONTENT_SIZE_DECIMALS = 2;
|
||||
|
||||
|
@ -2,9 +2,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* eslint-disable mozilla/reject-some-requires */
|
||||
/* globals window, dumpn, $, gNetwork, EVENTS, Prefs,
|
||||
NetMonitorController, NetMonitorView */
|
||||
/* globals window, dumpn, $, gNetwork, NetMonitorController, NetMonitorView */
|
||||
|
||||
"use strict";
|
||||
|
||||
@ -20,6 +18,7 @@ const { Provider } = require("devtools/client/shared/vendor/react-redux");
|
||||
const RequestList = createFactory(require("./components/request-list"));
|
||||
const RequestListContextMenu = require("./request-list-context-menu");
|
||||
const Actions = require("./actions/index");
|
||||
const { Prefs } = require("./prefs");
|
||||
|
||||
const {
|
||||
formDataURI,
|
||||
|
@ -2,8 +2,7 @@
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* import-globals-from ./netmonitor-controller.js */
|
||||
/* globals dumpn, $, NetMonitorView */
|
||||
/* globals window, dumpn, $, NetMonitorView */
|
||||
|
||||
"use strict";
|
||||
|
||||
|
@ -13,14 +13,13 @@ add_task(function* () {
|
||||
let { tab, monitor } = yield initNetMonitor(FILTERING_URL);
|
||||
info("Starting test... ");
|
||||
|
||||
let { $, NetMonitorView, gStore } = monitor.panelWin;
|
||||
let { $, NetMonitorView, gStore, windowRequire } = monitor.panelWin;
|
||||
let { RequestsMenu } = NetMonitorView;
|
||||
|
||||
let winRequire = monitor.panelWin.require;
|
||||
let { getDisplayedRequestsSummary } =
|
||||
winRequire("devtools/client/netmonitor/selectors/index");
|
||||
let { L10N } = winRequire("devtools/client/netmonitor/l10n");
|
||||
let { PluralForm } = winRequire("devtools/shared/plural-form");
|
||||
windowRequire("devtools/client/netmonitor/selectors/index");
|
||||
let { L10N } = windowRequire("devtools/client/netmonitor/l10n");
|
||||
let { PluralForm } = windowRequire("devtools/shared/plural-form");
|
||||
|
||||
RequestsMenu.lazyUpdate = false;
|
||||
testStatus();
|
||||
|
@ -59,11 +59,11 @@ add_task(function* () {
|
||||
removeTab(tab);
|
||||
yield onDestroyed;
|
||||
|
||||
ok(!monitor._controller.client,
|
||||
ok(!monitor.panelWin.NetMonitorController.client,
|
||||
"There shouldn't be a client available after destruction.");
|
||||
ok(!monitor._controller.tabClient,
|
||||
ok(!monitor.panelWin.NetMonitorController.tabClient,
|
||||
"There shouldn't be a tabClient available after destruction.");
|
||||
ok(!monitor._controller.webConsoleClient,
|
||||
ok(!monitor.panelWin.NetMonitorController.webConsoleClient,
|
||||
"There shouldn't be a webConsoleClient available after destruction.");
|
||||
}
|
||||
});
|
||||
|
@ -22,50 +22,50 @@ function test() {
|
||||
function checkIfInitialized(tag) {
|
||||
info(`Checking if initialization is ok (${tag}).`);
|
||||
|
||||
ok(monitor._view,
|
||||
ok(monitor.panelWin.NetMonitorView,
|
||||
`The network monitor view object exists (${tag}).`);
|
||||
ok(monitor._controller,
|
||||
ok(monitor.panelWin.NetMonitorController,
|
||||
`The network monitor controller object exists (${tag}).`);
|
||||
ok(monitor._controller._startup,
|
||||
ok(monitor.panelWin.NetMonitorController._startup,
|
||||
`The network monitor controller object exists and is initialized (${tag}).`);
|
||||
|
||||
ok(monitor.isReady,
|
||||
`The network monitor panel appears to be ready (${tag}).`);
|
||||
|
||||
ok(monitor._controller.tabClient,
|
||||
ok(monitor.panelWin.NetMonitorController.tabClient,
|
||||
`There should be a tabClient available at this point (${tag}).`);
|
||||
ok(monitor._controller.webConsoleClient,
|
||||
ok(monitor.panelWin.NetMonitorController.webConsoleClient,
|
||||
`There should be a webConsoleClient available at this point (${tag}).`);
|
||||
ok(monitor._controller.timelineFront,
|
||||
ok(monitor.panelWin.NetMonitorController.timelineFront,
|
||||
`There should be a timelineFront available at this point (${tag}).`);
|
||||
}
|
||||
|
||||
function checkIfDestroyed(tag) {
|
||||
gInfo("Checking if destruction is ok.");
|
||||
|
||||
gOk(monitor._view,
|
||||
gOk(monitor.panelWin.NetMonitorView,
|
||||
`The network monitor view object still exists (${tag}).`);
|
||||
gOk(monitor._controller,
|
||||
gOk(monitor.panelWin.NetMonitorController,
|
||||
`The network monitor controller object still exists (${tag}).`);
|
||||
gOk(monitor._controller._shutdown,
|
||||
gOk(monitor.panelWin.NetMonitorController._shutdown,
|
||||
`The network monitor controller object still exists and is destroyed (${tag}).`);
|
||||
|
||||
gOk(!monitor._controller.tabClient,
|
||||
gOk(!monitor.panelWin.NetMonitorController.tabClient,
|
||||
`There shouldn't be a tabClient available after destruction (${tag}).`);
|
||||
gOk(!monitor._controller.webConsoleClient,
|
||||
gOk(!monitor.panelWin.NetMonitorController.webConsoleClient,
|
||||
`There shouldn't be a webConsoleClient available after destruction (${tag}).`);
|
||||
gOk(!monitor._controller.timelineFront,
|
||||
gOk(!monitor.panelWin.NetMonitorController.timelineFront,
|
||||
`There shouldn't be a timelineFront available after destruction (${tag}).`);
|
||||
}
|
||||
|
||||
executeSoon(() => {
|
||||
checkIfInitialized(1);
|
||||
|
||||
monitor._controller.startupNetMonitor()
|
||||
monitor.panelWin.NetMonitorController.startupNetMonitor()
|
||||
.then(() => {
|
||||
info("Starting up again shouldn't do anything special.");
|
||||
checkIfInitialized(2);
|
||||
return monitor._controller.connect();
|
||||
return monitor.panelWin.NetMonitorController.connect();
|
||||
})
|
||||
.then(() => {
|
||||
info("Connecting again shouldn't do anything special.");
|
||||
@ -78,11 +78,11 @@ function test() {
|
||||
registerCleanupFunction(() => {
|
||||
checkIfDestroyed(1);
|
||||
|
||||
monitor._controller.shutdownNetMonitor()
|
||||
monitor.panelWin.NetMonitorController.shutdownNetMonitor()
|
||||
.then(() => {
|
||||
gInfo("Shutting down again shouldn't do anything special.");
|
||||
checkIfDestroyed(2);
|
||||
return monitor._controller.disconnect();
|
||||
return monitor.panelWin.NetMonitorController.disconnect();
|
||||
})
|
||||
.then(() => {
|
||||
gInfo("Disconnecting again shouldn't do anything special.");
|
||||
|
@ -32,7 +32,7 @@ function* throttleTest(actuallyThrottle) {
|
||||
uploadBPSMax: 10000,
|
||||
},
|
||||
};
|
||||
let client = monitor._controller.webConsoleClient;
|
||||
let client = NetMonitorController.webConsoleClient;
|
||||
|
||||
info("sending throttle request");
|
||||
let deferred = promise.defer();
|
||||
|
@ -14,7 +14,8 @@ add_task(function* () {
|
||||
let target = TargetFactory.forTab(tab);
|
||||
let toolbox = yield gDevTools.showToolbox(target, "netmonitor");
|
||||
let netmonitor = toolbox.getPanel("netmonitor");
|
||||
netmonitor._view.RequestsMenu.lazyUpdate = false;
|
||||
let { RequestsMenu } = netmonitor.panelWin.NetMonitorView;
|
||||
RequestsMenu.lazyUpdate = false;
|
||||
|
||||
info("Navigating to test page");
|
||||
yield navigateTo(TEST_URL);
|
||||
@ -27,7 +28,7 @@ add_task(function* () {
|
||||
|
||||
info("Checking Netmonitor contents.");
|
||||
let items = [];
|
||||
for (let item of netmonitor._view.RequestsMenu.items) {
|
||||
for (let item of RequestsMenu.items) {
|
||||
if (item.url.endsWith("doc_uncached.css")) {
|
||||
items.push(item);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user