blob: 1cfc22f7e09b7a1f002b02e4a6369ad68d9c8792 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
/* -*- indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set ft=javascript ts=2 et sw=2 tw=80: */
/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/ */
"use strict";
// Test that network requests originating from the toolbox don't get recorded in
// the network panel.
add_task(function* () {
// TODO: This test tries to verify the normal behavior of the netmonitor and
// therefore needs to avoid the explicit check for tests. Bug 1167188 will
// allow us to remove this workaround.
let isTesting = flags.testing;
flags.testing = false;
let tab = yield addTab(URL_ROOT + "doc_viewsource.html");
let target = TargetFactory.forTab(tab);
let toolbox = yield gDevTools.showToolbox(target, "styleeditor");
let panel = toolbox.getPanel("styleeditor");
is(panel.UI.editors.length, 1, "correct number of editors opened");
let monitor = yield toolbox.selectTool("netmonitor");
let { RequestsMenu } = monitor.panelWin.NetMonitorView;
is(RequestsMenu.itemCount, 0, "No network requests appear in the network panel");
yield gDevTools.closeToolbox(target);
tab = target = toolbox = panel = null;
gBrowser.removeCurrentTab();
flags.testing = isTesting;
});
|