summaryrefslogtreecommitdiff
path: root/browser/devtools/netmonitor/test/browser_net_page-nav.js
diff options
context:
space:
mode:
Diffstat (limited to 'browser/devtools/netmonitor/test/browser_net_page-nav.js')
-rw-r--r--browser/devtools/netmonitor/test/browser_net_page-nav.js68
1 files changed, 0 insertions, 68 deletions
diff --git a/browser/devtools/netmonitor/test/browser_net_page-nav.js b/browser/devtools/netmonitor/test/browser_net_page-nav.js
deleted file mode 100644
index 3c0a8d519..000000000
--- a/browser/devtools/netmonitor/test/browser_net_page-nav.js
+++ /dev/null
@@ -1,68 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
- http://creativecommons.org/publicdomain/zero/1.0/ */
-
-/**
- * Tests if page navigation ("close", "navigate", etc.) triggers an appropriate
- * action in the network monitor.
- */
-
-function test() {
- initNetMonitor(SIMPLE_URL).then(([aTab, aDebuggee, aMonitor]) => {
- info("Starting test... ");
-
- testNavigate(() => testNavigateBack(() => testClose(() => finish())));
-
- function testNavigate(aCallback) {
- info("Navigating forward...");
-
- aMonitor.panelWin.once(aMonitor.panelWin.EVENTS.TARGET_WILL_NAVIGATE, () => {
- is(aDebuggee.location, SIMPLE_URL,
- "Target started navigating to the correct location.");
-
- aMonitor.panelWin.once(aMonitor.panelWin.EVENTS.TARGET_DID_NAVIGATE, () => {
- is(aDebuggee.location, NAVIGATE_URL,
- "Target finished navigating to the correct location.");
-
- aCallback();
- });
- });
-
- aDebuggee.location = NAVIGATE_URL;
- }
-
- function testNavigateBack(aCallback) {
- info("Navigating backward...");
-
- aMonitor.panelWin.once(aMonitor.panelWin.EVENTS.TARGET_WILL_NAVIGATE, () => {
- is(aDebuggee.location, NAVIGATE_URL,
- "Target started navigating back to the previous location.");
-
- aMonitor.panelWin.once(aMonitor.panelWin.EVENTS.TARGET_DID_NAVIGATE, () => {
- is(aDebuggee.location, SIMPLE_URL,
- "Target finished navigating back to the previous location.");
-
- aCallback();
- });
- });
-
- aDebuggee.location = SIMPLE_URL;
- }
-
- function testClose(aCallback) {
- info("Closing...");
-
- aMonitor.once("destroyed", () => {
- ok(!aMonitor._controller.client,
- "There shouldn't be a client available after destruction.");
- ok(!aMonitor._controller.tabClient,
- "There shouldn't be a tabClient available after destruction.");
- ok(!aMonitor._controller.webConsoleClient,
- "There shouldn't be a webConsoleClient available after destruction.");
-
- aCallback();
- });
-
- removeTab(aTab);
- }
- });
-}