Bug 1574170 [wpt PR 18457] - [css-transitions-2] Make null-effect test properly wait for the transition to start, a=testonly

Automatic update from web-platform-tests
[css-transitions-2] Make null-effect test properly wait for the transition to start (#18457)

Previously this test would just rAF a single frame and assume that the
transition had started and that the 'left' had changed. Instead, this PR
changes the test to explicitly wait for 'left' to change, so that we can
be sure the transition has started before we interrupt it.
--

wpt-commits: 386d028948caf18c09ba67a68fc5b5667a6b8961
wpt-pr: 18457
This commit is contained in:
Stephen McGruer 2019-08-19 14:41:43 +00:00 коммит произвёл moz-wptsync-bot
Родитель f38dfa6b36
Коммит b02bc81abc
1 изменённых файлов: 3 добавлений и 2 удалений

Просмотреть файл

@ -111,9 +111,10 @@ promise_test(async t => {
// The transition needs to have a non-zero currentTime for the interruption
// reversal logic to apply.
await singleFrame();
while (getComputedStyle(div).left == '0px') {
await singleFrame();
}
assert_not_equals(transition.currentTime, 0);
assert_not_equals(getComputedStyle(div).left, '0px');
// Without yielding to the rendering loop, set the current transition's
// effect to null and interrupt the transition. This should work correctly.