diff options
Diffstat (limited to 'devtools/client/webconsole/test/browser/browser_webconsole_console_profile_unavailable.js')
-rw-r--r-- | devtools/client/webconsole/test/browser/browser_webconsole_console_profile_unavailable.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/devtools/client/webconsole/test/browser/browser_webconsole_console_profile_unavailable.js b/devtools/client/webconsole/test/browser/browser_webconsole_console_profile_unavailable.js new file mode 100644 index 0000000000..c40e1b9cac --- /dev/null +++ b/devtools/client/webconsole/test/browser/browser_webconsole_console_profile_unavailable.js @@ -0,0 +1,26 @@ +/* Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/publicdomain/zero/1.0/ */ + +"use strict"; + +// Check console.profile() shows a warning with the new performance panel. +const TEST_URI = + "data:text/html;charset=utf8,<!DOCTYPE html><h1>test console.profile</h1>"; + +const EXPECTED_WARNING = + "console.profile is not compatible with the new Performance recorder"; + +add_task(async function consoleProfileWarningWithNewPerfPanel() { + const hud = await openNewTabAndConsole(TEST_URI); + + info("Use console.profile in the content page"); + await SpecialPowers.spawn(gBrowser.selectedBrowser, [], function () { + content.wrappedJSObject.console.profile(); + }); + + await waitFor( + () => findWarningMessage(hud, EXPECTED_WARNING), + "Wait until the warning about console.profile is displayed" + ); + ok(true, "The expected warning was displayed."); +}); |