Fix flaky MouseLatencyBrowserTests

Waiting on a synthetic gesture being completed is when the gesture has
sent the events to the renderer not necessarily when it has processed
them. Wait for MouseUp events before ending tracing.

This test appears to be flaky when run with mojo input messages which
has slightly different timing properties.

BUG=722928

Change-Id: I409c76b718051f75d4ff9e7309c146631fc546a8
Reviewed-on: https://chromium-review.googlesource.com/733642
Reviewed-by: Scott Violet <[email protected]>
Reviewed-by: Timothy Dresser <[email protected]>
Commit-Queue: Dave Tapuska <[email protected]>
Cr-Commit-Position: refs/heads/master@{#511432}
3 files changed