diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /devtools/client/debugger/test/mochitest/browser_dbg-sourcemaps-disabled.js | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/debugger/test/mochitest/browser_dbg-sourcemaps-disabled.js')
-rw-r--r-- | devtools/client/debugger/test/mochitest/browser_dbg-sourcemaps-disabled.js | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/devtools/client/debugger/test/mochitest/browser_dbg-sourcemaps-disabled.js b/devtools/client/debugger/test/mochitest/browser_dbg-sourcemaps-disabled.js index 93440dc9e1..4348e2103d 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg-sourcemaps-disabled.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg-sourcemaps-disabled.js @@ -17,7 +17,34 @@ add_task(async function () { info("Pretty print the bundle"); await selectSource(dbg, bundleSrc); + + const footerButton = findElement(dbg, "sourceMapFooterButton"); + is( + footerButton.textContent, + "Source Maps disabled", + "The source map button reports the disabling" + ); + ok( + footerButton.classList.contains("disabled"), + "The source map button is disabled" + ); + clickElement(dbg, "prettyPrintButton"); await waitForSelectedSource(dbg, "bundle.js:formatted"); - ok(true, "everything finished"); + ok(true, "Pretty printed source shown"); + + const toggled = waitForDispatch(dbg.store, "TOGGLE_SOURCE_MAPS_ENABLED"); + await clickOnSourceMapMenuItem(dbg, ".debugger-source-map-enabled"); + await toggled; + ok(true, "Toggled the Source map setting"); + + is( + footerButton.textContent, + "original file", + "The source map button now reports the pretty printed file as original file" + ); + ok( + !footerButton.classList.contains("disabled"), + "The source map button is no longer disabled" + ); }); |