This patch contains two changes:
(1) The addition of refVisitedLink and the use of
waitForVisitedLinkColoring() on it.
(2) Changing the URL of the visited lisks (both visitedLink and
refVisitedLink) from "" to window.top.location.href, since the
former doesn't work for Android mochitests while it does work on
Linux mochitest-e10s.
I tested locally that without the patch I get the failures, and with the
patch the failures go away, using:
./mach mochitest-plain --e10s --setpref layers.acceleration.force-enabled=true --setpref layers.offmainthreadcomposition.async-animations=true layout/style/test/test_animations_omta.html
Further, when running (and passing), I checked that
waitForVisitedLinkColoring() does go through one setTimeout cycle.
Also, I tested that if I effectively revert
https://hg.mozilla.org/mozilla-central/rev/d13154302d77 by changing the
third parameter to the GetContext call in
nsStyleSet::ResolveStyleWithReplacement to be nullptr instead of
visitedRuleNode, I get the failure:
TEST-UNEXPECTED-FAIL | layout/style/test/test_animations_omta.html | visited link background color after animation-only flush - got rgb(255, 255, 0), expected rgb(0, 0, 255)
which confirms that the test is still testing what it was designed to
test.