Bug 145626

Summary: Non-deterministic Inspector Pause and Resume events makes tests flaky
Product: WebKit Reporter: Mark Lam <mark.lam>
Component: Web InspectorAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: bburg, graouts, inspector-bugzilla-changes, jonowells, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   

Description Mark Lam 2015-06-03 18:12:38 PDT
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.
Comment 1 Radar WebKit Bug Importer 2015-06-03 18:13:12 PDT
<rdar://problem/21234384>
Comment 2 BJ Burg 2016-12-14 13:19:58 PST

*** This bug has been marked as a duplicate of bug 161951 ***