1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
7 * Tests if "DNS Resolution" is displayed in the headers panel and
8 * that requests that are resolve over DNS over HTTPS are accuratelly tracked.
9 * Note: Test has to run as a http3 test for the DoH servers to be used
12 add_task(async
function testCheckDNSResolution() {
13 Services
.dns
.clearCache(true);
14 // Force to use DNS Trusted Recursive Resolver only
15 await
pushPref("network.trr.mode", 3);
17 const { monitor
} = await
initNetMonitor(HTTPS_SIMPLE_URL
, {
22 const { document
} = monitor
.panelWin
;
24 const requestsComplete
= waitForNetworkEvents(monitor
, 1);
25 await
reloadBrowser();
26 await requestsComplete
;
28 // Wait until the tab panel summary is displayed
29 const waitForTab
= waitUntil(
30 () => document
.querySelectorAll(".tabpanel-summary-label")[0]
32 EventUtils
.sendMouseEvent(
33 { type
: "mousedown" },
34 document
.querySelectorAll(".request-list-item")[0]
38 const dnsEl
= [...document
.querySelectorAll(".headers-summary")].find(
40 el
.querySelector(".headers-summary-label").textContent
===
45 dnsEl
.querySelector(".tabpanel-summary-value").textContent
,
46 L10N
.getStr(`netmonitor.headers.dns.overHttps`),
47 "The DNS Resolution value showed correctly"
50 return teardown(monitor
);