Commit b564b8ca authored by Xianzhu Wang's avatar Xianzhu Wang

Fix CSSAnimationsTest.RetargetedTransition

It failed on Linux on my (and others') local machine:

[ RUN      ] CSSAnimationsTest.RetargetedTransition
../../third_party/blink/renderer/core/animation/css/css_animations_test.cc:84: Failure
The difference between 0.6 and GetContrastFilterAmount(element) is 9.3132279666008344e-11, which exceeds 0.00000000001, where
0.6 evaluates to 0.59999999999999998,
GetContrastFilterAmount(element) evaluates to 0.60000000009313226, and
0.00000000001 evaluates to 9.9999999999999994e-12.
Stack trace:

../../third_party/blink/renderer/core/animation/css/css_animations_test.cc:90: Failure
The difference between 0.3 and GetContrastFilterAmount(element) is 4.6566139833004172e-11, which exceeds 0.00000000001, where
0.3 evaluates to 0.29999999999999999,
GetContrastFilterAmount(element) evaluates to 0.30000000004656613, and
0.00000000001 evaluates to 9.9999999999999994e-12.
Stack trace:

TBR=svillar@igalia.com

Change-Id: Idf6c9c10d02203460c9978431eedd016eab7f66a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1640138Reviewed-by: default avatarXianzhu Wang <wangxianzhu@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665412}
parent 4b1ba5a0
......@@ -81,13 +81,13 @@ TEST_F(CSSAnimationsTest, RetargetedTransition) {
element->setAttribute(html_names::kClassAttr, "contrast2");
GetPage().Animator().ServiceScriptedAnimations(CurrentTimeTicks());
UpdateAllLifecyclePhasesForTest();
EXPECT_NEAR(0.6, GetContrastFilterAmount(element), 0.00000000001);
EXPECT_NEAR(0.6, GetContrastFilterAmount(element), 0.0000000001);
// As it has been retargeted, advancing halfway should go to 0.3.
AdvanceClockSeconds(0.5);
GetPage().Animator().ServiceScriptedAnimations(CurrentTimeTicks());
UpdateAllLifecyclePhasesForTest();
EXPECT_NEAR(0.3, GetContrastFilterAmount(element), 0.00000000001);
EXPECT_NEAR(0.3, GetContrastFilterAmount(element), 0.0000000001);
}
// Test that when an incompatible in progress compositor transition
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment