assaf/zombie — Issue #244: new events do not restart event loop
Author: csosborn
Created: 2011-12-29 17:12:12+00:00
State: open

After zombie has processed all of its queued events, injecting a new event probably ought to restart the event loop, but currently it does not. For instance, if I call browser.wait() then browser.window.setTimeout(func, 10), func will never be called. However, if I then call browser.wait() a second time, it restarts the loop and func (which was queued all along) is invoked.

For most zombie applications this works fine since new events are only queued as a result of other events; the event loop never has a chance to run dry. I'm using zombie for functional testing, though, and I often want to inject new events into a quiescent zombie document and watch what happens. As is, I have to keep calling zombie.wait() to kickstart things.