DebuggerManager.debuggerDidResume() defers the dispatch of the Resumed event. DebuggerManager.debuggerDidPause() can eat that Resumed event as well as the next Paused Event if debuggerDidPause() happens to be called before debuggerDidResume()'s delayedWork() fires. As a result, we can cannot write tests that can depend on a consistent order of Pause and Resume events. I was advised to use the CallFramesDidChange event instead. The problem with this is that the number of CallFramesDidChange events firing also depends on the race between debuggerDidPause() and debuggerDidResume()'s delayedWork(). For example, the regression test of https://bugs.webkit.org/show_bug.cgi?id=145525 (which is currently written to assume that some Paused and Resume events will be eaten) runs fine on WK1 using DumpRenderTree. When we run it on WK2 using WKRT which runs a lot slower, the events don't get eaten. As a result, the test fails.
<rdar://problem/21234384>
*** This bug has been marked as a duplicate of bug 161951 ***