Backed out changeset b71c8c052463 (bug 1943846) for causing mass failures. CLOSED...
[gecko.git] / devtools / client / netmonitor / test / browser_net_header-request-priority.js
blob196116a98d9f0990d38f1480628920f45d467505
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 "use strict";
6 /**
7 * Tests if "Request Priority" is displayed in the header panel.
8 */
9 add_task(async function () {
10 const { monitor } = await initNetMonitor(POST_RAW_URL, {
11 requestCount: 1,
12 });
14 const { document } = monitor.panelWin;
16 const waitReq = waitForNetworkEvents(monitor, 1);
17 EventUtils.sendMouseEvent(
18 { type: "click" },
19 document.querySelector(".requests-list-reload-notice-button")
21 await waitReq;
23 // Wait until the tab panel summary is displayed
24 const wait = waitUntil(
25 () => document.querySelectorAll(".tabpanel-summary-label")[0]
27 EventUtils.sendMouseEvent(
28 { type: "mousedown" },
29 document.querySelectorAll(".request-list-item")[0]
31 await wait;
33 const requestPriorityHeaderExists = Array.from(
34 document.querySelectorAll(".tabpanel-summary-label")
35 ).some(header => header.textContent === "Request Priority");
36 is(
37 requestPriorityHeaderExists,
38 true,
39 '"Request Priority" header is displayed in the header panel.'
42 return teardown(monitor);
43 });