Backed out 2 changesets (bug 1943998) for causing wd failures @ phases.py CLOSED...
[gecko.git] / devtools / client / netmonitor / test / browser_net_internal-stylesheet.js
blob098f2803aad0d03dd3622dc991526d710531ef60
1 /* Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ */
4 "use strict";
6 const TEST_URL = EXAMPLE_URL + "html_internal-stylesheet.html";
8 /**
9 * Test for the stylesheet which is loaded as internal.
11 add_task(async function () {
12 const { monitor } = await initNetMonitor(TEST_URL, {
13 requestCount: 2,
14 });
16 const wait = waitForNetworkEvents(monitor, 2);
17 await reloadBrowser();
18 await wait;
20 const { store } = monitor.panelWin;
21 const requests = store.getState().requests.requests;
22 is(
23 requests.length,
25 "The number of requests state in the store is correct"
28 const styleSheetRequest = requests.find(
29 r => r.urlDetails.baseNameWithQuery === "internal-loaded.css"
31 ok(
32 styleSheetRequest,
33 "The stylesheet which is loaded as internal is in the request"
36 return teardown(monitor);
37 });