mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
d190976dae
In nsGlobalWindow, we have a static counter for how many popups we've seen recently. We increment it and decrement it when popups open and close - although the decrement only occurs once the DocShell is detached, which happens asynchronously. The test uses a utility that returns Promises for window.open and window.close, but it uses dom-window-destroyed for resolving close, which happens _before_ the counter is decremented. The dom-window-destroyed observer queues a runnable which resolves the Promise. This means that the test is attempting to open windows before the windows from a previous test have finished detaching their DocShells (and decrementing the counter), which means that the attempts to open the window hit the popup limit, which blocks the popups. This test switches us to waiting for outer-window-destroyed instead, which gives us a greater certainty that the decrement has occurred. MozReview-Commit-ID: 3a7QzxelP0a |
||
---|---|---|
.. | ||
browser | ||
html | ||
js | ||
mochitest | ||
reftest | ||
unit | ||
moz.build |