browser_aboutprofiling-threads.js (973B)
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 "use strict"; 5 6 add_task(async function test() { 7 info("Test that about:profiling can be loaded, and the threads changed."); 8 9 await withAboutProfiling(async document => { 10 const geckoMainInput = await getNearestInputFromText(document, "GeckoMain"); 11 12 ok( 13 geckoMainInput.checked, 14 "The GeckoMain thread starts checked by default." 15 ); 16 17 ok( 18 activeConfigurationHasThread("GeckoMain"), 19 "The profiler was started with the GeckoMain thread" 20 ); 21 22 info("Click the GeckoMain checkbox."); 23 geckoMainInput.click(); 24 ok(!geckoMainInput.checked, "The GeckoMain thread UI is toggled off."); 25 26 ok( 27 !activeConfigurationHasThread("GeckoMain"), 28 "The profiler was not started with the GeckoMain thread." 29 ); 30 }); 31 });