mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update web-platform-tests to revision 936827a6527f1c53051d3bc5bc79304c88c0737f
This commit is contained in:
parent
c585f4fff5
commit
02a68a38f0
338 changed files with 14862 additions and 2933 deletions
|
@ -10,6 +10,12 @@
|
|||
<script>
|
||||
'use strict';
|
||||
|
||||
function singleFrame() {
|
||||
return new Promise((resolve, reject) => {
|
||||
requestAnimationFrame(resolve);
|
||||
});
|
||||
}
|
||||
|
||||
test(t => {
|
||||
const div = addDiv(t);
|
||||
div.style.left = '0px';
|
||||
|
@ -87,6 +93,38 @@ promise_test(async t => {
|
|||
assert_equals(getComputedStyle(div).left, '0px');
|
||||
}, 'After setting a transition\'s effect to null, a new transition can be started');
|
||||
|
||||
// This is a regression test for https://crbug.com/992668, where Chromium would
|
||||
// crash if the running transition's effect was set to null and the transition
|
||||
// was interrupted before it could finish due to the null effect.
|
||||
promise_test(async t => {
|
||||
const div = addDiv(t);
|
||||
div.style.left = '0px';
|
||||
|
||||
div.style.transition = 'left 100s';
|
||||
getComputedStyle(div).left;
|
||||
div.style.left = '100px';
|
||||
|
||||
assert_equals(div.getAnimations().length, 1);
|
||||
|
||||
const transition = div.getAnimations()[0];
|
||||
await transition.ready;
|
||||
|
||||
// The transition needs to have a non-zero currentTime for the interruption
|
||||
// reversal logic to apply.
|
||||
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.
|
||||
transition.effect = null;
|
||||
div.style.left = '0px';
|
||||
|
||||
// Yield to the rendering loop. This should not crash.
|
||||
await singleFrame();
|
||||
}, 'After setting a transition\'s effect to null, it should be possible to '
|
||||
+ 'interrupt that transition');
|
||||
|
||||
promise_test(async t => {
|
||||
const div = addDiv(t);
|
||||
div.style.left = '0px';
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>CSS Animations: getComputedStyle().transitionTimingFunction</title>
|
||||
<link rel="help" href="https://drafts.csswg.org/css-transitions/#propdef-transition-timing-function">
|
||||
<meta name="assert" content="transition-timing-function computed value is a computed <easing-function> list.">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/support/computed-testcommon.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="target"></div>
|
||||
<script>
|
||||
test_computed_value("transition-timing-function", "linear");
|
||||
|
||||
test_computed_value("transition-timing-function", "ease");
|
||||
test_computed_value("transition-timing-function", "ease-in");
|
||||
test_computed_value("transition-timing-function", "ease-out");
|
||||
test_computed_value("transition-timing-function", "ease-in-out");
|
||||
test_computed_value("transition-timing-function", "cubic-bezier(0.1, 0.2, 0.8, 0.9)");
|
||||
test_computed_value("transition-timing-function", "cubic-bezier(0, -2, 1, 3)");
|
||||
test_computed_value("transition-timing-function", "cubic-bezier(0, 0.7, 1, 1.3)");
|
||||
|
||||
|
||||
test_computed_value("transition-timing-function", "steps(4, start)");
|
||||
test_computed_value("transition-timing-function", "steps(2, end)", "steps(2)");
|
||||
test_computed_value("transition-timing-function", "steps(2, jump-start)");
|
||||
test_computed_value("transition-timing-function", "steps(2, jump-end)", "steps(2)");
|
||||
test_computed_value("transition-timing-function", "steps(2, jump-both)");
|
||||
test_computed_value("transition-timing-function", "steps(2, jump-none)");
|
||||
|
||||
test_computed_value("transition-timing-function", "linear, ease, linear");
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue