1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
7 * Tests if "Request URL" containing "#" in its query is correctly decoded.
9 add_task(async
function () {
10 const { tab
, monitor
} = await
initNetMonitor(POST_RAW_URL_WITH_HASH
, {
13 info("Starting test... ");
15 const { document
, store
, windowRequire
} = monitor
.panelWin
;
16 const Actions
= windowRequire("devtools/client/netmonitor/src/actions/index");
17 store
.dispatch(Actions
.batchEnable(false));
20 await
performRequests(monitor
, tab
, 1);
22 // Wait until the url preview ihas loaded
23 const wait
= waitUntil(() =>
24 document
.querySelector("#headers-panel .url-preview")
27 EventUtils
.sendMouseEvent(
28 { type
: "mousedown" },
29 document
.querySelectorAll(".request-list-item")[0]
34 const requestURL
= document
.querySelector("#headers-panel .url-preview .url");
36 requestURL
.textContent
.endsWith("foo # bar"),
38 "\"Request URL\" containing '#' is correctly decoded."
41 return teardown(monitor
);