diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /devtools/client/framework/test/browser_ignore_toolbox_network_requests.js | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'devtools/client/framework/test/browser_ignore_toolbox_network_requests.js')
-rw-r--r-- | devtools/client/framework/test/browser_ignore_toolbox_network_requests.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/devtools/client/framework/test/browser_ignore_toolbox_network_requests.js b/devtools/client/framework/test/browser_ignore_toolbox_network_requests.js new file mode 100644 index 000000000..1cfc22f7e --- /dev/null +++ b/devtools/client/framework/test/browser_ignore_toolbox_network_requests.js @@ -0,0 +1,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; +}); |