browser_webconsole_console_profile_unavailable.js (884B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ */ 3 4 "use strict"; 5 6 // Check console.profile() shows a warning with the new performance panel. 7 const TEST_URI = 8 "data:text/html;charset=utf8,<!DOCTYPE html><h1>test console.profile</h1>"; 9 10 const EXPECTED_WARNING = 11 "console.profile is not compatible with the new Performance recorder"; 12 13 add_task(async function consoleProfileWarningWithNewPerfPanel() { 14 const hud = await openNewTabAndConsole(TEST_URI); 15 16 info("Use console.profile in the content page"); 17 await SpecialPowers.spawn(gBrowser.selectedBrowser, [], function () { 18 content.wrappedJSObject.console.profile(); 19 }); 20 21 await waitFor( 22 () => findWarningMessage(hud, EXPECTED_WARNING), 23 "Wait until the warning about console.profile is displayed" 24 ); 25 ok(true, "The expected warning was displayed."); 26 });