Commit 0bb673f3 authored by Robert Flack's avatar Robert Flack Committed by Commit Bot

Test that CSS animations composite in their animation-name order.

This adds a WPT test verifying that CSS animations are composited in the
order of their name within the animation-name property.

Bug: 1045835
Change-Id: I8e746e1841cd4f5ca55e3e067762c2ea93e5c101
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2022616
Auto-Submit: Robert Flack <flackr@chromium.org>
Reviewed-by: default avatarKevin Ellis <kevers@chromium.org>
Commit-Queue: Robert Flack <flackr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#736825}
parent 981d6bf9
This is a testharness.js-based test.
FAIL Animations are composited by their order in the animation-name property. assert_equals: expected "100px" but got "50px"
Harness: the test ran to completion.
<!DOCTYPE html>
<meta charset="utf-8">
<title>Animation composite order</title>
<link rel="help" href="https://drafts.csswg.org/css-animations-2/#animation-composite-order">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="support/testcommon.js"></script>
<style>
@keyframes margin50 {
from {
margin-left: 50px;
}
to {
margin-left: 50px;
}
}
@keyframes margin100 {
from {
margin-left: 100px;
}
to {
margin-left: 100px;
}
}
</style>
<div id="log"</div>
<script>
'use strict';
promise_test(async t => {
const div = addDiv(t);
div.style.animation = 'margin100 100s';
assert_equals(getComputedStyle(div).marginLeft, '100px');
div.style.animation = 'margin50 100s, margin100 100s';
// The margin should be unaffected by margin50 since it is named earlier
// in the animation list.
assert_equals(getComputedStyle(div).marginLeft, '100px');
}, "Animations are composited by their order in the animation-name property.");
</script>
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