addOutstandingCallback method
void
addOutstandingCallback()
Tells the invoker that there's a callback running that it should wait for before considering the test successful.
Each call to addOutstandingCallback should be followed by a call to removeOutstandingCallback once the callback is no longer running. Note that only successful tests wait for outstanding callbacks; as soon as a test experiences an error, any further calls to addOutstandingCallback or removeOutstandingCallback will do nothing.
Throws a ClosedException if this test has been closed.
Implementation
void addOutstandingCallback() {
if (closed) throw ClosedException();
_outstandingCallbacks.increment();
}