Investigate double alert601234 DOMModal
Categories
(Remote Protocol :: Marionette, enhancement, P1)
Tracking
(Not tracked)
People
(Reporter: whimboo, Unassigned)
References
()
Details
(In reply to Henrik Skupin (:whimboo) [⌚️UTC+2] from bug 1487358 comment #22)
It looks like just spinning the event loop before checking for remaining alerts on the page after a prompt has been accepted/dismissed is not enough. Only when I add sleeps of about 30ms and more, a remaining prompt will be detected. Here is the HTML/JS snippet:
<script type="text/javascript"> function setInnerText(id, value) { document.getElementById(id).innerHTML = "<p>" + value + "</p>"; } function handleTwoDialogs() { setInnerText("text1", prompt("First")); setInnerText("text2", prompt("Second")); } </script> [..] <a href="#" id="open-two-dialogs" onclick="handleTwoDialogs()">Open two prompts.</a>
Olli, right now my code is waiting for the
DOMModalDialogClosed
event before it immediately checks for any remaining prompt via this method:
https://searchfox.org/mozilla-central/rev/9eb2f739c165b4e294929f7b99fbb4d90f8a396b/testing/marionette/modal.js#62Maybe you know if there is some other kind of event Marionette would have to wait for before checking for remaining alerts? Or is the first prompt just blocking, and the second opens after the first has been closed? If that is the case maybe we need a sleep call for now until bug 1477977 has been fixed.
Reporter | ||
Comment 1•5 years ago
|
||
Not sure what I did here but that got accidentally filed and bug 1560015 is the right one.
Reporter | ||
Updated•5 years ago
|
Updated•1 year ago
|
Description
•