1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
7 * Test the 'Open in debugger' feature
10 add_task(async
function () {
11 const { tab
, monitor
, toolbox
} = await
initNetMonitor(
12 CONTENT_TYPE_WITHOUT_CACHE_URL
,
15 info("Starting test... ");
17 const { document
, store
, windowRequire
} = monitor
.panelWin
;
18 // Avoid async processing
19 const Actions
= windowRequire("devtools/client/netmonitor/src/actions/index");
20 store
.dispatch(Actions
.batchEnable(false));
23 await
performRequests(monitor
, tab
, CONTENT_TYPE_WITHOUT_CACHE_REQUESTS
);
25 EventUtils
.sendMouseEvent(
26 { type
: "mousedown" },
27 document
.querySelectorAll(".request-list-item")[2]
29 EventUtils
.sendMouseEvent(
30 { type
: "contextmenu" },
31 document
.querySelectorAll(".request-list-item")[2]
33 const onDebuggerReady
= toolbox
.once("jsdebugger-ready");
34 await
selectContextMenuItem(monitor
, "request-list-context-open-in-debugger");
35 await onDebuggerReady
;
37 ok(true, "Debugger has been open");
39 await
teardown(monitor
);