Bug 797639 - Part 4: Fix Network Monitor test leaks. r=vporof

This commit is contained in:
J. Ryan Stinnett 2014-05-14 14:30:02 -05:00
Родитель d00a33574f
Коммит 39f5fd8ef2
2 изменённых файлов: 3 добавлений и 3 удалений

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

@ -23,7 +23,7 @@ function test() {
is(Prefs.filters[1], "bogus", is(Prefs.filters[1], "bogus",
"The second filter type is invalid, but loaded anyway."); "The second filter type is invalid, but loaded anyway.");
waitForNetworkEvents(aMonitor, 7).then(() => { waitForNetworkEvents(aMonitor, 8).then(() => {
testFilterButtons(aMonitor, "js"); testFilterButtons(aMonitor, "js");
ok(true, "Only the correct filter type was taken into consideration."); ok(true, "Only the correct filter type was taken into consideration.");

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

@ -25,7 +25,7 @@ function test() {
is(NetMonitorView.detailsPaneHidden, true, is(NetMonitorView.detailsPaneHidden, true,
"The details pane should be hidden when the frontend is opened."); "The details pane should be hidden when the frontend is opened.");
aMonitor.panelWin.once(aMonitor.panelWin.EVENTS.NETWORK_EVENT, () => { waitForNetworkEvents(aMonitor, 1).then(() => {
is(document.querySelector("#details-pane-toggle") is(document.querySelector("#details-pane-toggle")
.hasAttribute("disabled"), false, .hasAttribute("disabled"), false,
"The pane toggle button should be enabled after the first request."); "The pane toggle button should be enabled after the first request.");
@ -37,7 +37,7 @@ function test() {
is(NetMonitorView.detailsPaneHidden, true, is(NetMonitorView.detailsPaneHidden, true,
"The details pane should still be hidden after the first request."); "The details pane should still be hidden after the first request.");
aMonitor.panelWin.once(aMonitor.panelWin.EVENTS.NETWORK_EVENT, () => { waitForNetworkEvents(aMonitor, 1).then(() => {
is(document.querySelector("#details-pane-toggle") is(document.querySelector("#details-pane-toggle")
.hasAttribute("disabled"), false, .hasAttribute("disabled"), false,
"The pane toggle button should be still be enabled after a reload."); "The pane toggle button should be still be enabled after a reload.");