summaryrefslogtreecommitdiffstats
path: root/devtools/client/debugger/test/mochitest/browser_dbg-stepping.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/debugger/test/mochitest/browser_dbg-stepping.js')
-rw-r--r--devtools/client/debugger/test/mochitest/browser_dbg-stepping.js38
1 files changed, 38 insertions, 0 deletions
diff --git a/devtools/client/debugger/test/mochitest/browser_dbg-stepping.js b/devtools/client/debugger/test/mochitest/browser_dbg-stepping.js
new file mode 100644
index 0000000000..682d834ae7
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/browser_dbg-stepping.js
@@ -0,0 +1,38 @@
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at <http://mozilla.org/MPL/2.0/>. */
+
+"use strict";
+
+// This test can be really slow on debug platforms
+requestLongerTimeout(5);
+
+add_task(async function test() {
+ const dbg = await initDebugger("big-sourcemap.html", "bundle.js");
+ invokeInTab("hitDebugStatement");
+ await waitForPaused(dbg, "bundle.js");
+ assertPausedAtSourceAndLine(dbg, findSource(dbg, "bundle.js").id, 52411);
+
+ await stepIn(dbg);
+
+ const whyPaused = await waitFor(
+ () => dbg.win.document.querySelector(".why-paused")?.innerText
+ );
+ is(whyPaused, `Paused while stepping`);
+
+ await stepIn(dbg);
+ await stepIn(dbg);
+ await stepIn(dbg);
+ await stepIn(dbg);
+ await stepIn(dbg);
+ await stepIn(dbg);
+ await stepIn(dbg);
+ await stepIn(dbg);
+ await stepIn(dbg);
+ await stepIn(dbg);
+ await stepIn(dbg);
+ await stepIn(dbg);
+ await stepIn(dbg);
+
+ assertPausedAtSourceAndLine(dbg, findSource(dbg, "step-in-test.js").id, 7679);
+});