1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
7 * Tests that the request for a domain that is not found shows
10 add_task(async
function () {
11 const URL
= "https://not-existed.com/";
12 const { monitor
} = await
initNetMonitor(URL
, {
16 info("Starting test... ");
18 const { document
, store
, windowRequire
} = monitor
.panelWin
;
19 const Actions
= windowRequire("devtools/client/netmonitor/src/actions/index");
21 store
.dispatch(Actions
.batchEnable(false));
23 const wait
= waitForNetworkEvents(monitor
, 1);
24 reloadBrowser({ waitForLoad
: false });
27 const firstItem
= document
.querySelectorAll(".request-list-item")[0];
30 firstItem
.querySelector(".requests-list-url").innerText
,
32 "The url in the displayed request is correct"
35 firstItem
.querySelector(".requests-list-transferred").innerText
,
36 "NS_ERROR_UNKNOWN_HOST",
37 "The error in the displayed request is correct"
40 await
teardown(monitor
);