browser_net_reload-button.js (721B)
1 /* Any copyright is dedicated to the Public Domain. 2 http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 /** 7 * Tests if the empty-requests reload button works. 8 */ 9 10 add_task(async function () { 11 const { monitor } = await initNetMonitor(SIMPLE_URL, { requestCount: 1 }); 12 info("Starting test... "); 13 14 const { document } = monitor.panelWin; 15 16 const wait = waitForNetworkEvents(monitor, 1); 17 EventUtils.sendMouseEvent( 18 { type: "click" }, 19 document.querySelector(".requests-list-reload-notice-button") 20 ); 21 await wait; 22 23 is( 24 document.querySelectorAll(".request-list-item").length, 25 1, 26 "The request list should have one item after reloading" 27 ); 28 29 return teardown(monitor); 30 });