diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /devtools/client/debugger/test/mochitest/browser_dbg-outline.js | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-upstream/125.0.1.tar.xz firefox-upstream/125.0.1.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/debugger/test/mochitest/browser_dbg-outline.js')
-rw-r--r-- | devtools/client/debugger/test/mochitest/browser_dbg-outline.js | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/devtools/client/debugger/test/mochitest/browser_dbg-outline.js b/devtools/client/debugger/test/mochitest/browser_dbg-outline.js index 6048a7a92d..bfc1c846d1 100644 --- a/devtools/client/debugger/test/mochitest/browser_dbg-outline.js +++ b/devtools/client/debugger/test/mochitest/browser_dbg-outline.js @@ -6,6 +6,41 @@ "use strict"; +// Test that the outline panel updates correctly when a source is selected +// This scenario covers the case where the outline panel always focused. +add_task(async function () { + const dbg = await initDebugger("doc-scripts.html", "simple1.js"); + openOutlinePanel(dbg, false); + is( + findAllElements(dbg, "outlineItems").length, + 0, + " There are no outline items when no source is selected" + ); + + await selectSource(dbg, "simple1.js", 1); + + info("Wait for all the outline list to load"); + await waitForElementWithSelector(dbg, ".outline-list"); + + assertOutlineItems(dbg, [ + "λmain()", + "λdoEval()", + "λevaledFunc()", + "λdoNamedEval()", + // evaledFunc is set twice + "λevaledFunc()", + "class MyClass", + "λconstructor(a, b)", + "λtest()", + "λ#privateFunc(a, b)", + "class Klass", + "λconstructor()", + "λtest()", + ]); +}); + +// Test that the outline panel updates correctly when a source is selected +// This scenario covers the case where the outline panel gets un-selected and selected again add_task(async function () { const dbg = await initDebugger("doc-scripts.html", "simple1.js"); @@ -73,7 +108,7 @@ add_task(async function () { ]); }); -// Test empty panel when source has not function or class symbols +// Test empty panel when source has no function or class symbols add_task(async function () { const dbg = await initDebugger("doc-on-load.html", "top-level.js"); await selectSource(dbg, "top-level.js", 1); |