summaryrefslogtreecommitdiffstats
path: root/devtools/client/debugger/new/test/mochitest/browser_dbg-iframes.js
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/debugger/new/test/mochitest/browser_dbg-iframes.js')
-rw-r--r--devtools/client/debugger/new/test/mochitest/browser_dbg-iframes.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/devtools/client/debugger/new/test/mochitest/browser_dbg-iframes.js b/devtools/client/debugger/new/test/mochitest/browser_dbg-iframes.js
new file mode 100644
index 000000000..9039da1be
--- /dev/null
+++ b/devtools/client/debugger/new/test/mochitest/browser_dbg-iframes.js
@@ -0,0 +1,26 @@
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+/**
+ * Test debugging a page with iframes
+ * 1. pause in the main thread
+ * 2. pause in the iframe
+ */
+add_task(function* () {
+ const dbg = yield initDebugger("doc-iframes.html");
+
+ // test pausing in the main thread
+ yield reload(dbg);
+ yield waitForPaused(dbg);
+ assertPausedLocation(dbg, "iframes.html", 8);
+
+ // test pausing in the iframe
+ yield resume(dbg);
+ yield waitForPaused(dbg);
+ assertPausedLocation(dbg, "debugger-statements.html", 8);
+
+ // test pausing in the iframe
+ yield resume(dbg);
+ yield waitForPaused(dbg);
+ assertPausedLocation(dbg, "debugger-statements.html", 12);
+});