Backed out changeset 018647263e4a (bug 1352699)

This commit is contained in:
Sebastian Hengst 2017-04-07 18:56:10 +02:00
Родитель 5de2d8377f
Коммит 598aa2f2fe
9 изменённых файлов: 36 добавлений и 55 удалений

Просмотреть файл

@ -14,25 +14,25 @@ add_task(function* () {
let { monitor } = yield initNetMonitor(SIMPLE_URL);
info("Starting test... ");
let { document, parent } = monitor.panelWin;
let { document, windowRequire, parent } = monitor.panelWin;
ok(!document.querySelector("#requests-list-status-button"),
"Status column should be hidden");
ok(!document.querySelector("#requests-list-contentSize-button"),
"Content size column should be hidden");
let { Prefs } = windowRequire("devtools/client/netmonitor/src/utils/prefs");
yield showColumn("status");
yield showColumn("contentSize");
ok(!Services.prefs.getCharPref("devtools.netmonitor.hiddenColumns").includes("status"),
"Pref should be synced for status");
ok(!Services.prefs.getCharPref("devtools.netmonitor.hiddenColumns")
.includes("contentSize"), "Pref should be synced for contentSize");
ok(!Prefs.hiddenColumns.includes("status"), "Pref should be synced for status");
ok(!Prefs.hiddenColumns.includes("contentSize"),
"Pref should be synced for contentSize");
yield hideColumn("status");
ok(Services.prefs.getCharPref("devtools.netmonitor.hiddenColumns").includes("status"),
"Pref should be synced for status");
ok(Prefs.hiddenColumns.includes("status"), "Pref should be synced for status");
yield showColumn("status");

Просмотреть файл

@ -11,10 +11,9 @@ add_task(function* () {
let { tab, monitor } = yield initNetMonitor(CONTENT_TYPE_WITHOUT_CACHE_URL);
info("Starting test... ");
let { document, gStore, windowRequire } = monitor.panelWin;
let { document, gStore, windowRequire, NetMonitorController } =
monitor.panelWin;
let Actions = windowRequire("devtools/client/netmonitor/src/actions/index");
let { NetMonitorController } =
windowRequire("devtools/client/netmonitor/src/netmonitor-controller");
let {
ACTIVITY_TYPE,
EVENTS,

Просмотреть файл

@ -13,10 +13,8 @@ add_task(function* test() {
let { tab, monitor } = yield initNetMonitor(IMAGE_TOOLTIP_URL);
info("Starting test... ");
let { document, gStore, windowRequire } = monitor.panelWin;
let { document, gStore, windowRequire, NetMonitorController } = monitor.panelWin;
let Actions = windowRequire("devtools/client/netmonitor/src/actions/index");
let { NetMonitorController } =
windowRequire("devtools/client/netmonitor/src/netmonitor-controller");
let {
ACTIVITY_TYPE,
EVENTS,

Просмотреть файл

@ -13,8 +13,6 @@ add_task(function* () {
info("Starting test... ");
let { windowRequire } = monitor.panelWin;
let { NetMonitorController } =
windowRequire("devtools/client/netmonitor/src/netmonitor-controller");
let { EVENTS } = windowRequire("devtools/client/netmonitor/src/constants");
yield testNavigate();
@ -62,11 +60,11 @@ add_task(function* () {
removeTab(tab);
yield onDestroyed;
ok(!NetMonitorController.client,
ok(!monitor.panelWin.NetMonitorController.client,
"There shouldn't be a client available after destruction.");
ok(!NetMonitorController.tabClient,
ok(!monitor.panelWin.NetMonitorController.tabClient,
"There shouldn't be a tabClient available after destruction.");
ok(!NetMonitorController.webConsoleClient,
ok(!monitor.panelWin.NetMonitorController.webConsoleClient,
"There shouldn't be a webConsoleClient available after destruction.");
}
});

Просмотреть файл

@ -11,10 +11,8 @@ add_task(function* () {
let { monitor } = yield initNetMonitor(SIMPLE_SJS);
info("Starting test... ");
let { gStore, windowRequire } = monitor.panelWin;
let { gStore, windowRequire, NetMonitorController } = monitor.panelWin;
let Actions = windowRequire("devtools/client/netmonitor/src/actions/index");
let { NetMonitorController } =
windowRequire("devtools/client/netmonitor/src/netmonitor-controller");
let {
getSortedRequests,
} = windowRequire("devtools/client/netmonitor/src/selectors/index");

Просмотреть файл

@ -16,56 +16,52 @@ function test() {
initNetMonitor(SIMPLE_URL).then(({ tab, monitor }) => {
info("Starting test... ");
let { windowRequire } = monitor.panelWin;
let { NetMonitorController } =
windowRequire("devtools/client/netmonitor/src/netmonitor-controller");
is(tab.linkedBrowser.currentURI.spec, SIMPLE_URL,
"The current tab's location is the correct one.");
function checkIfInitialized(tag) {
info(`Checking if initialization is ok (${tag}).`);
ok(NetMonitorController,
ok(monitor.panelWin.NetMonitorController,
`The network monitor controller object exists (${tag}).`);
ok(NetMonitorController._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(NetMonitorController.tabClient,
ok(monitor.panelWin.NetMonitorController.tabClient,
`There should be a tabClient available at this point (${tag}).`);
ok(NetMonitorController.webConsoleClient,
ok(monitor.panelWin.NetMonitorController.webConsoleClient,
`There should be a webConsoleClient available at this point (${tag}).`);
ok(NetMonitorController.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(NetMonitorController,
gOk(monitor.panelWin.NetMonitorController,
`The network monitor controller object still exists (${tag}).`);
gOk(NetMonitorController._shutdown,
gOk(monitor.panelWin.NetMonitorController._shutdown,
`The network monitor controller object still exists and is destroyed (${tag}).`);
gOk(!NetMonitorController.tabClient,
gOk(!monitor.panelWin.NetMonitorController.tabClient,
`There shouldn't be a tabClient available after destruction (${tag}).`);
gOk(!NetMonitorController.webConsoleClient,
gOk(!monitor.panelWin.NetMonitorController.webConsoleClient,
`There shouldn't be a webConsoleClient available after destruction (${tag}).`);
gOk(!NetMonitorController.timelineFront,
gOk(!monitor.panelWin.NetMonitorController.timelineFront,
`There shouldn't be a timelineFront available after destruction (${tag}).`);
}
executeSoon(() => {
checkIfInitialized(1);
NetMonitorController.startupNetMonitor()
monitor.panelWin.NetMonitorController.startupNetMonitor()
.then(() => {
info("Starting up again shouldn't do anything special.");
checkIfInitialized(2);
return NetMonitorController.connect();
return monitor.panelWin.NetMonitorController.connect();
})
.then(() => {
info("Connecting again shouldn't do anything special.");
@ -78,11 +74,11 @@ function test() {
registerCleanupFunction(() => {
checkIfDestroyed(1);
NetMonitorController.shutdownNetMonitor()
monitor.panelWin.NetMonitorController.shutdownNetMonitor()
.then(() => {
gInfo("Shutting down again shouldn't do anything special.");
checkIfDestroyed(2);
return NetMonitorController.disconnect();
return monitor.panelWin.NetMonitorController.disconnect();
})
.then(() => {
gInfo("Disconnecting again shouldn't do anything special.");

Просмотреть файл

@ -14,11 +14,9 @@ function* throttleTest(actuallyThrottle) {
requestLongerTimeout(2);
let { monitor } = yield initNetMonitor(SIMPLE_URL);
let { gStore, windowRequire } = monitor.panelWin;
let { gStore, windowRequire, NetMonitorController } = monitor.panelWin;
let { ACTIVITY_TYPE } = windowRequire("devtools/client/netmonitor/src/constants");
let { EVENTS } = windowRequire("devtools/client/netmonitor/src/constants");
let { NetMonitorController } =
windowRequire("devtools/client/netmonitor/src/netmonitor-controller");
let {
getSortedRequests,
} = windowRequire("devtools/client/netmonitor/src/selectors/index");

Просмотреть файл

@ -181,9 +181,6 @@ function teardown(monitor) {
function waitForNetworkEvents(monitor, getRequests, postRequests = 0) {
let deferred = promise.defer();
let panel = monitor.panelWin;
let { windowRequire } = panel;
let { NetMonitorController } =
windowRequire("devtools/client/netmonitor/src/netmonitor-controller");
let progress = {};
let genericEvents = 0;
let postEvents = 0;
@ -236,7 +233,8 @@ function waitForNetworkEvents(monitor, getRequests, postRequests = 0) {
postEvents + "/" + (postRequests * 2) + ", " +
"got " + event + " for " + actor);
let networkInfo = NetMonitorController.webConsoleClient.getNetworkRequest(actor);
let networkInfo =
panel.NetMonitorController.webConsoleClient.getNetworkRequest(actor);
let url = networkInfo.request.url;
updateProgressForURL(url, event);

Просмотреть файл

@ -1346,13 +1346,13 @@ date-now@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
debug@2.6.1, debug@^2.1.1:
debug@2.6.1:
version "2.6.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351"
dependencies:
ms "0.7.2"
debug@2.6.3, debug@^2.2.0:
debug@2.6.3, debug@^2.1.1, debug@^2.2.0:
version "2.6.3"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.3.tgz#0f7eb8c30965ec08c72accfa0130c8b79984141d"
dependencies:
@ -3807,7 +3807,7 @@ read-pkg@^1.0.0:
normalize-package-data "^2.3.2"
path-type "^1.0.0"
readable-stream@^2.0.0, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.2, readable-stream@^2.1.4, readable-stream@^2.2.2, readable-stream@^2.2.6:
readable-stream@^2.0.0, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.5, readable-stream@^2.1.4, readable-stream@^2.2.2, readable-stream@^2.2.6:
version "2.2.7"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.7.tgz#07057acbe2467b22042d36f98c5ad507054e95b1"
dependencies:
@ -3819,7 +3819,7 @@ readable-stream@^2.0.0, "readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.
string_decoder "~1.0.0"
util-deprecate "~1.0.1"
readable-stream@^2.0.1, readable-stream@^2.0.5, readable-stream@~2.0.6:
readable-stream@~2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e"
dependencies:
@ -4757,14 +4757,10 @@ window-size@0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
wordwrap@0.0.2:
wordwrap@0.0.2, wordwrap@~0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f"
wordwrap@~0.0.2:
version "0.0.3"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"
wordwrap@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb"