summaryrefslogtreecommitdiffstats
path: root/devtools/client/debugger/test/mochitest/browser_dbg-sourcemaps-bogus.js
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:14:29 +0000
commitfbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch)
tree4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /devtools/client/debugger/test/mochitest/browser_dbg-sourcemaps-bogus.js
parentReleasing progress-linux version 124.0.1-1~progress7.99u1. (diff)
downloadfirefox-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-bogus.js')
-rw-r--r--devtools/client/debugger/test/mochitest/browser_dbg-sourcemaps-bogus.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/devtools/client/debugger/test/mochitest/browser_dbg-sourcemaps-bogus.js b/devtools/client/debugger/test/mochitest/browser_dbg-sourcemaps-bogus.js
index e9e3a3c7f2..79a8245613 100644
--- a/devtools/client/debugger/test/mochitest/browser_dbg-sourcemaps-bogus.js
+++ b/devtools/client/debugger/test/mochitest/browser_dbg-sourcemaps-bogus.js
@@ -53,6 +53,16 @@ add_task(async function () {
"There is a warning about the missing source map file"
);
+ let footerButton = findElement(dbg, "sourceMapFooterButton");
+ ok(
+ footerButton.classList.contains("not-mapped"),
+ "The source map error causes the file to be reported as not mapped"
+ );
+ ok(
+ footerButton.classList.contains("error"),
+ "The source map error is displayed in the source map icon"
+ );
+
// Test a Source Map with missing original text content
await selectSource(dbg, "map-with-failed-original-request.js");
ok(
@@ -87,5 +97,24 @@ add_task(async function () {
`Error while fetching an original source: request failed with status 404\nSource URL: ${EXAMPLE_URL}map-with-failed-original-request.original.js`
);
+ footerButton = findElement(dbg, "sourceMapFooterButton");
+ is(
+ footerButton.textContent,
+ "original file",
+ "Even if the original can't be loaded, it is reported as original in the footer"
+ );
+ ok(
+ !footerButton.classList.contains("loading"),
+ "The source map isn't loading because of the missing text content"
+ );
+ ok(
+ !footerButton.classList.contains("error"),
+ "The source map isn't reported with an error because of the missing text content"
+ );
+ ok(
+ footerButton.classList.contains("original"),
+ "The source map icon is set to original"
+ );
+
await resume(dbg);
});