browser_devtools.js (648B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 /* import-globals-from ../head.js */ 6 7 "use strict"; 8 9 const { require } = ChromeUtils.importESModule( 10 "resource://devtools/shared/loader/Loader.sys.mjs" 11 ); 12 const { gDevTools } = require("devtools/client/framework/devtools"); 13 14 add_task(async function capture() { 15 if (!shouldCapture()) { 16 return; 17 } 18 let sets = ["DevTools"]; 19 20 await TestRunner.start(sets, "devtools"); 21 22 await gDevTools.closeToolboxForTab(gBrowser.selectedTab); 23 });