Update web-platform-tests to revision 84af6c875d378944b39d895acdcfc170736b2d3d

This commit is contained in:
WPT Sync Bot 2019-07-10 10:26:06 +00:00
parent d0bd2d5e44
commit b81cdc75ce
246 changed files with 10836 additions and 1337 deletions

View file

@ -0,0 +1,25 @@
<!DOCTYPE html>
<meta charset=utf-8>
<title>KeyframeEffect getKeyframes()</title>
<link rel="help"
href="https://drafts.csswg.org/web-animations/#dom-keyframeeffect-getkeyframes">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../../resources/keyframe-utils.js"></script>
<script src="../../resources/keyframe-tests.js"></script>
<body>
<div id="log"></div>
<div id="target"></div>
<script>
'use strict';
const target = document.getElementById('target');
for (const subtest of gKeyframeSerializationTests) {
test(t => {
const effect = new KeyframeEffect(target, subtest.input);
assert_frame_lists_equal(effect.getKeyframes(), subtest.output);
}, `getKeyframes() should serialize its css values with ${subtest.desc}`);
}
</script>

View file

@ -159,6 +159,13 @@ const gKeyframesTests = [
output: [keyframe(computedOffset(0), { left: '10px' }),
keyframe(computedOffset(1), {})]
},
{
desc: 'a property-indexed keyframes specification with a CSS variable as'
+ ' the property',
input: { '--custom': ['1', '2'] },
output: [keyframe(computedOffset(0), { '--custom': '1' }),
keyframe(computedOffset(1), { '--custom': '2' })]
},
// ----------- Property-indexed keyframes: offset handling -----------
@ -453,6 +460,13 @@ const gKeyframesTests = [
keyframe(computedOffset(1),
{ margin: 'calc(var(--dist) + 100px)' })],
},
{
desc: 'a keyframe sequence with a CSS variable as its property',
input: [{ '--custom': 'a' },
{ '--custom': 'b' }],
output: [keyframe(computedOffset(0), { '--custom': 'a' }),
keyframe(computedOffset(1), { '--custom': 'b' })]
},
// ----------- Keyframe sequence: offset handling -----------
@ -682,6 +696,18 @@ const gInvalidKeyframesTests = [
},
];
const gKeyframeSerializationTests = [
{
desc: 'a on keyframe sequence which requires value serilaization of its'
+ ' values',
input: [{offset: 0, backgroundColor: 'rgb(1,2,3)' }],
output: [keyframe(offset(0), { backgroundColor: 'rgb(1, 2, 3)' })],
},
];
// ------------------------------
// KeyframeEffectOptions
// ------------------------------