diff options
Diffstat (limited to 'devtools/client/netmonitor/test/browser_net_aaa_leaktest.js')
-rw-r--r-- | devtools/client/netmonitor/test/browser_net_aaa_leaktest.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/devtools/client/netmonitor/test/browser_net_aaa_leaktest.js b/devtools/client/netmonitor/test/browser_net_aaa_leaktest.js new file mode 100644 index 000000000..31c1e03ad --- /dev/null +++ b/devtools/client/netmonitor/test/browser_net_aaa_leaktest.js @@ -0,0 +1,28 @@ +/* Any copyright is dedicated to the Public Domain. + http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +/** + * Tests if the network monitor leaks on initialization and sudden destruction. + * You can also use this initialization format as a template for other tests. + */ + +add_task(function* () { + let { tab, monitor } = yield initNetMonitor(SIMPLE_URL); + info("Starting test... "); + + let { document, NetMonitorView, NetMonitorController } = monitor.panelWin; + let { RequestsMenu, NetworkDetails } = NetMonitorView; + + ok(tab, "Should have a tab available."); + ok(monitor, "Should have a network monitor pane available."); + + ok(document, "Should have a document available."); + ok(NetMonitorView, "Should have a NetMonitorView object available."); + ok(NetMonitorController, "Should have a NetMonitorController object available."); + ok(RequestsMenu, "Should have a RequestsMenu object available."); + ok(NetworkDetails, "Should have a NetworkDetails object available."); + + yield teardown(monitor); +}); |