chromeos: gets TabScrubber tests working with mash
Many of these tests previously worked by using a pattern such as: . make TabScrubbers timer use a zero delay. . generate a bunch of async scroll events (using EventGenerator) . record when active tab changes. . run message loop, waiting for active tab to change to certain index, then stop. This is problematic in the mash case as EventGenerator, for mash, runs a message loop. This meant the timer would fire at unexpected times. The fix is to increase the timer delay, generate a single event and then force the TabScrubber timer to complete. This way the test gets consistent results, regardless of whether EventGenerator internally runs a message loop. BUG=889097,890050 TEST=test only changes Change-Id: I5decb690c4ef7ff67af21cc9a588aaa5046fad89 Reviewed-on: https://chromium-review.googlesource.com/c/1297288Reviewed-by:Jun Mukai <mukai@chromium.org> Commit-Queue: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#602522}
Showing
Please register or sign in to comment