fune/testing/web-platform/tests/css/css-animations/display-interpolation.html
Joey Arhar e69b8a9fc6 Bug 1846029 [wpt PR 41228] - CSSTransitionDiscrete: Rename transition-animation-type to transition-behavior, a=testonly
Automatic update from web-platform-tests
CSSTransitionDiscrete: Rename transition-animation-type to transition-behavior

This patch also renames the "discrete" value to "allow-discrete"
This was resolved in the csswg:
https://github.com/w3c/csswg-drafts/issues/8857#issuecomment-1646035541

Bug: 1453112
Change-Id: I9b9aad124376d5e7bf532d891b7a0e25b651ce2d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4718633
Reviewed-by: David Baron <dbaron@chromium.org>
Commit-Queue: Joey Arhar <jarhar@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1176694}

--

wpt-commits: d4c199f7f994faa4b63c61afea89c936e770509e
wpt-pr: 41228
2023-08-10 14:58:33 +00:00

79 lines
1.9 KiB
HTML

<!DOCTYPE html>
<link rel=author href="mailto:jarhar@chromium.org">
<link rel=help href="https://github.com/w3c/csswg-drafts/issues/6429">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/interpolation-testcommon.js"></script>
<body>
<script>
const alwaysBlock = [
{at: -1, expect: 'block'},
{at: 0, expect: 'block'},
{at: 0.1, expect: 'block'},
{at: 0.9, expect: 'block'},
{at: 1, expect: 'block'},
{at: 1.5, expect: 'block'},
];
const alwaysNone = [
{at: -1, expect: 'none'},
{at: 0, expect: 'none'},
{at: 0.1, expect: 'none'},
{at: 0.9, expect: 'none'},
{at: 1, expect: 'none'},
{at: 1.5, expect: 'none'},
];
test_interpolation({
property: 'display',
behavior: 'allow-discrete',
from: 'block',
to: 'none',
}, [
{at: -1, expect: 'block'},
{at: 0, expect: 'block'},
{at: 0.1, expect: 'block'},
{at: 0.9, expect: 'block'},
{at: 1, expect: 'none'},
{at: 1.5, expect: 'none'},
]);
// This transitions test expect 'block' at every point because transitioning
// from display:none does not provide an initial style. This is expected and
// can be worked around by using @initial.
test_interpolation({
property: 'display',
behavior: 'allow-discrete',
from: 'none',
to: 'block',
'CSS Transitions with transition: all': alwaysBlock,
'CSS Transitions': alwaysBlock
}, [
{at: -1, expect: 'none'},
{at: 0, expect: 'none'},
{at: 0.1, expect: 'block'},
{at: 0.9, expect: 'block'},
{at: 1, expect: 'block'},
{at: 1.5, expect: 'block'},
]);
test_no_interpolation({
property: 'display',
from: 'inline',
to: 'block'
});
test_interpolation({
property: 'display',
behavior: 'allow-discrete',
from: 'block',
to: 'block'
}, alwaysBlock);
test_interpolation({
property: 'display',
behavior: 'allow-discrete',
from: 'none',
to: 'none'
}, alwaysNone);
</script>