[GRC]Add global clock ResourceCoordinatorClock.
Previously when we need to simulate clock ticks in tests, we need each indivisual components like PageCoordinationUnitImpl to carry its own tick clock, and we have to create helper functions to set the clock properly among different components. This is fragile and redudant. This patch introduces a ResourceCoordinatorClock which provides 4 helper methods to manipulate clock in testing across components. There's also a recent patch adding timing functions to chrome/browser/resource_coordinator: https://chromium-review.googlesource.com/c/chromium/src/+/723674 BUG=775691 Change-Id: I05e5d1fd688aaa35c8d8abcc4707439f00d9c958 Reviewed-on: https://chromium-review.googlesource.com/756211 Commit-Queue: lpy <lpy@chromium.org> Reviewed-by:Zhen Wang <zhenw@chromium.org> Cr-Commit-Position: refs/heads/master@{#515053}
Showing
Please register or sign in to comment