Add a class which allows timeouts and time.sleep to function during unit testing without actually waiting.
Created attachment 404560 [details] Patch
Created attachment 404946 [details] Patch
<rdar://problem/66052539>
Created attachment 405578 [details] Patch
Created attachment 405663 [details] Patch
Created attachment 405937 [details] Patch
Created attachment 405986 [details] Patch
Created attachment 406176 [details] Patch
Comment on attachment 406176 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=406176&action=review > Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/time_.py:53 > + self.patches.append([ Interesting, I thought patches is a list of patch, but it's actually a list of patch list. Correct?
Comment on attachment 406176 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=406176&action=review >> Tools/Scripts/libraries/webkitcorepy/webkitcorepy/mocks/time_.py:53 >> + self.patches.append([ > > Interesting, I thought patches is a list of patch, but it's actually a list of patch list. Correct? Yes! That lets us stack this context, so something like this: with mocks.Time: with mocks.Time: pass Not something generally want to do, but a caller may not know what it's callees are doing.
Created attachment 406196 [details] Patch for landing
Committed r265386: <https://trac.webkit.org/changeset/265386> All reviewed patches have been landed. Closing bug and clearing flags on attachment 406196 [details].