1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/devtools/netmonitor/test/browser_net_aaa_leaktest.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,28 @@ 1.4 +/* Any copyright is dedicated to the Public Domain. 1.5 + http://creativecommons.org/publicdomain/zero/1.0/ */ 1.6 + 1.7 +/** 1.8 + * Tests if the network monitor leaks on initialization and sudden destruction. 1.9 + * You can also use this initialization format as a template for other tests. 1.10 + */ 1.11 + 1.12 +function test() { 1.13 + initNetMonitor(SIMPLE_URL).then(([aTab, aDebuggee, aMonitor]) => { 1.14 + info("Starting test... "); 1.15 + 1.16 + let { document, NetMonitorView, NetMonitorController } = aMonitor.panelWin; 1.17 + let { RequestsMenu, NetworkDetails } = NetMonitorView; 1.18 + 1.19 + ok(aTab, "Should have a tab available."); 1.20 + ok(aDebuggee, "Should have a debuggee available."); 1.21 + ok(aMonitor, "Should have a network monitor pane available."); 1.22 + 1.23 + ok(document, "Should have a document available."); 1.24 + ok(NetMonitorView, "Should have a NetMonitorView object available."); 1.25 + ok(NetMonitorController, "Should have a NetMonitorController object available."); 1.26 + ok(RequestsMenu, "Should have a RequestsMenu object available."); 1.27 + ok(NetworkDetails, "Should have a NetworkDetails object available."); 1.28 + 1.29 + teardown(aMonitor).then(finish); 1.30 + }); 1.31 +}