summaryrefslogtreecommitdiffstats
path: root/devtools/client/debugger/test/mochitest/examples/doc-message-run-to-completion.html
diff options
context:
space:
mode:
Diffstat (limited to 'devtools/client/debugger/test/mochitest/examples/doc-message-run-to-completion.html')
-rw-r--r--devtools/client/debugger/test/mochitest/examples/doc-message-run-to-completion.html19
1 files changed, 19 insertions, 0 deletions
diff --git a/devtools/client/debugger/test/mochitest/examples/doc-message-run-to-completion.html b/devtools/client/debugger/test/mochitest/examples/doc-message-run-to-completion.html
new file mode 100644
index 0000000000..db6aa0b0a0
--- /dev/null
+++ b/devtools/client/debugger/test/mochitest/examples/doc-message-run-to-completion.html
@@ -0,0 +1,19 @@
+<iframe id="iframe" src="doc-message-run-to-completion-frame.html"></iframe>
+<script>
+function test() {
+ var messageName = "test-message";
+
+ function handleMessage(event) {
+ // While paused here, the additional posted messages should not be delivered.
+ // The debugger should pause three times.
+ debugger;
+ }
+
+ window.addEventListener("message", handleMessage, true);
+ document.getElementById("iframe").contentWindow.addEventListener("message", handleMessage, true);
+
+ window.postMessage("first", "*");
+ document.getElementById("iframe").contentWindow.postMessage("second", "*");
+ window.postMessage("third", "*");
+}
+</script>