OnionSoup: Migrate WebViewTest to TestMockTimeTaskRunner
This is a followup of http://crrev.com/c/1590101. In this CL WebViewTest is moved out of time function overrides. TestMockTimeTaskRunner is used instead. The migration is far from trivial. Some other classes had to be migrated first, InteractiveDetector (with test) and DocumentLoader among others. In order to simplify a bit the migration, a new attribute was added to WebNavigationParams carrying the clock to be used by DocumentLoader. That clock is precisely the one being used by TestMockTimeTaskRunner. That modifications in DocumentLoader had some side effects in order non directly related tests, in particular CSSAnimationTests. There is a pretty tiny rounding error in TimeTicks <-> double conversions that force us to replace an exact comparison (EXPECT_DOUBLE_EQ) by an approximation (EXPECT_NEAR) with a very tiny margin error. Bug: 919383 Change-Id: Ie1bf2402a9cf55f312ba4cf5f129097e25ed4ae1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1588650 Commit-Queue: Sergio Villar <svillar@igalia.com> Reviewed-by:Daniel Cheng <dcheng@chromium.org> Cr-Commit-Position: refs/heads/master@{#664697}
Showing
This diff is collapsed.
Please register or sign in to comment