Update web-platform-tests to revision 5084587f6b05bf99ad09e7844be66dcc61070cdf

This commit is contained in:
WPT Sync Bot 2018-04-25 21:10:30 -04:00 committed by Anthony Ramine
parent 6d42d2f1e8
commit 7d1071a6a4
408 changed files with 8968 additions and 2608 deletions

View file

@ -529,8 +529,8 @@ const gCSSProperties = {
]
},
'font-stretch': {
// https://drafts.csswg.org/css-fonts-3/#propdef-font-stretch
types: [ 'fontStretch' ]
// https://drafts.csswg.org/css-fonts-4/#propdef-font-stretch
types: [ 'percentage' ]
},
'font-style': {
// https://drafts.csswg.org/css-fonts/#propdef-font-style

View file

@ -2566,54 +2566,6 @@ const dasharrayType = {
},
}
const fontStretchType = {
testInterpolation: (property, setup) => {
test(t => {
const idlName = propertyToIDL(property);
const target = createTestElement(t, setup);
const animation =
target.animate({ [idlName]: ['ultra-condensed', 'extra-condensed'] },
{ duration: 1000, fill: 'both' });
testAnimationSamples(animation, idlName,
[{ time: 499, expected: 'ultra-condensed' },
{ time: 500, expected: 'extra-condensed' }]);
}, `${property} supports animating as a font-stretch (adjacent values)`);
test(t => {
const idlName = propertyToIDL(property);
const target = createTestElement(t, setup);
const animation =
target.animate({ [idlName]: ['ultra-condensed', 'condensed'] },
{ duration: 1000, fill: 'both' });
testAnimationSamples(animation, idlName,
[{ time: 500, expected: 'extra-condensed' }]);
}, `${property} supports animating as a font-stretch (between value)`);
},
testAdditionOrAccumulation: (property, setup, composite) => {
test(t => {
const idlName = propertyToIDL(property);
const target = createTestElement(t, setup);
target.style[idlName] = 'condensed';
const animation =
target.animate({ [idlName]: ['expanded', 'ultra-expanded'] },
{ duration: 1000, composite });
testAnimationSamples(animation, idlName,
[{ time: 0, expected: 'normal' },
{ time: 250, expected: 'semi-expanded' }]);
},
`${property} uses font-stretch behavior for composite type ${composite}`);
},
testAddition: function(property, setup) {
this.testAdditionOrAccumulation(property, setup, 'add');
},
testAccumulation: function(property, setup) {
this.testAdditionOrAccumulation(property, setup, 'accumulate');
},
}
const fontVariationSettingsType = {
testInterpolation: (property, setup) => {
test(t => {
@ -2701,6 +2653,5 @@ const types = {
rect: rectType,
position: positionType,
dasharray: dasharrayType,
fontStretch: fontStretchType,
fontVariationSettings: fontVariationSettingsType,
};

View file

@ -15,10 +15,13 @@ test(t => {
const ct = effect.getComputedTiming();
assert_equals(ct.delay, 0, 'computed delay');
assert_equals(ct.endDelay, 0, 'computed endDelay');
assert_equals(ct.fill, 'none', 'computed fill');
assert_equals(ct.iterationStart, 0.0, 'computed iterationStart');
assert_equals(ct.iterations, 1.0, 'computed iterations');
assert_equals(ct.duration, 0, 'computed duration');
assert_equals(ct.direction, 'normal', 'computed direction');
assert_equals(ct.easing, 'linear', 'computed easing');
}, 'values of getComputedTiming() when a KeyframeEffect is ' +
'constructed without any KeyframeEffectOptions object');
@ -28,15 +31,21 @@ const gGetComputedTimingTests = [
expected: { } },
{ desc: 'a normal KeyframeEffectOptions object',
input: { delay: 1000,
endDelay: 2000,
fill: 'auto',
iterationStart: 0.5,
iterations: 5.5,
duration: 'auto',
direction: 'alternate' },
direction: 'alternate',
easing: 'steps(2)' },
expected: { delay: 1000,
endDelay: 2000,
fill: 'none',
iterationStart: 0.5,
iterations: 5.5,
duration: 0,
direction: 'alternate' } },
direction: 'alternate',
easing: 'steps(2)' } },
{ desc: 'a double value',
input: 3000,
timing: { duration: 3000 },
@ -78,14 +87,20 @@ for (const stest of gGetComputedTimingTests) {
const ct = effect.getComputedTiming();
assert_equals(ct.delay, expected('delay', 0),
'computed delay');
assert_equals(ct.endDelay, expected('endDelay', 0),
'computed endDelay');
assert_equals(ct.fill, expected('fill', 'none'),
'computed fill');
assert_equals(ct.iterationStart, expected('iterationStart', 0),
'computed iterations');
assert_equals(ct.iterations, expected('iterations', 1),
'computed iterations');
assert_equals(ct.duration, expected('duration', 0),
'computed duration');
assert_equals(ct.direction, expected('direction', 'normal'),
'computed direction');
assert_equals(ct.easing, expected('easing', 'linear'),
'computed easing');
}, 'values of getComputedTiming() when a KeyframeEffect is'
+ ` constructed by ${stest.desc}`);