mirror of
https://github.com/servo/servo.git
synced 2025-08-14 09:55:35 +01:00
Update web-platform-tests to revision 2b758296541cf4f2209b8c2352cf6c7890c97be3
This commit is contained in:
parent
2304f02123
commit
835d593cd0
118 changed files with 3269 additions and 703 deletions
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/motion/animation/resources/interpolation-testcommon.js"></script>
|
||||
<title> 'layout-animations' Policy : Correct behavior for affected and unaffected properties when
|
||||
feature is disabled.
|
||||
</title>
|
||||
<body>
|
||||
<script>
|
||||
// Sanity-check: Properties which are not affected by the policy 'layout-animations' should be
|
||||
// interpolated normally (linearly) when the policy is disabled for the document.
|
||||
test_interpolation(
|
||||
{
|
||||
property: "color",
|
||||
from: "rgba(0, 50, 100, 1)",
|
||||
to: "rgba(200, 150, 200, 1)",
|
||||
test_prefix: 'Testing property "color".'
|
||||
},
|
||||
[
|
||||
{at: 0.00, expect: "rgba(0, 50, 100, 1)"},
|
||||
{at: 0.1, expect: "rgba(20, 60, 110, 1)"},
|
||||
{at: 0.2, expect: "rgba(40, 70, 120, 1)"},
|
||||
{at: 0.4, expect: "rgba(80, 90, 140, 1)"},
|
||||
{at: 0.6, expect: "rgba(120, 110, 160, 1)"},
|
||||
{at: 0.8, expect: "rgba(160, 130, 180, 1)"},
|
||||
{at: 0.9, expect: "rgba(180, 140, 190, 1)"},
|
||||
]);
|
||||
|
||||
// There is no interpolation for the affected properties when the policy is disabled.
|
||||
["bottom", "height", "left", "right", "top", "width"].forEach(
|
||||
(p) => test_no_interpolation(
|
||||
{
|
||||
property: p,
|
||||
from: "100px",
|
||||
to: "200px",
|
||||
test_prefix: `Testing property "${p}".`
|
||||
}));
|
||||
</script>
|
||||
</body>
|
|
@ -0,0 +1 @@
|
|||
Feature-Policy: layout-animations 'none'
|
|
@ -0,0 +1,30 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="/css/motion/animation/resources/interpolation-testcommon.js"></script>
|
||||
<title> 'layout-animations' Policy : Correct behavior for affected and unaffected properties when
|
||||
feature is enabled.
|
||||
</title>
|
||||
<body>
|
||||
<script>
|
||||
// The expectation for all the following properties could be the same (they are all of type length).
|
||||
let length_expectations_100_to_200 = [
|
||||
{at: 0.00, expect: "100px"},
|
||||
{at: 0.1, expect: "110px"},
|
||||
{at: 0.2, expect: "120px"},
|
||||
{at: 0.4, expect: "140px"},
|
||||
{at: 0.6, expect: "160px"},
|
||||
{at: 0.8, expect: "180px"},
|
||||
{at: 0.9, expect: "190px"},
|
||||
];
|
||||
// Ensure all the affected animations run normally.
|
||||
["bottom", "height", "left", "right", "top", "width"].forEach(
|
||||
(p) => test_interpolation({
|
||||
property: p,
|
||||
from: "100px",
|
||||
to: "200px",
|
||||
test_prefix: `Testing property "${p}".`
|
||||
},
|
||||
length_expectations_100_to_200));
|
||||
</script>
|
||||
</body>
|
Loading…
Add table
Add a link
Reference in a new issue