зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1714238 - Fix some tentative WPT tests to align with CSS animations and new Gecko behavior / Safari. r=longsonr
Differential Revision: https://phabricator.services.mozilla.com/D214594
This commit is contained in:
Родитель
b1a45fd599
Коммит
738b535154
|
@ -1,5 +0,0 @@
|
|||
[animate-path-animation-Ll-Vv-Hh.tentative.html]
|
||||
expected:
|
||||
if (os == "android") and fission: [OK, TIMEOUT]
|
||||
[Path animation where coordinate modes of start and end differ (L-l, V-v and H-h)]
|
||||
expected: FAIL
|
|
@ -1,5 +0,0 @@
|
|||
[animate-path-animation-Mm-Aa-Z.tentative.html]
|
||||
expected:
|
||||
if (os == "android") and fission: [OK, TIMEOUT]
|
||||
[Path animation where coordinate modes of start and end differ (M-m, A-a and Z)]
|
||||
expected: FAIL
|
|
@ -1,5 +0,0 @@
|
|||
[animate-path-animation-Qq-Tt.tentative.html]
|
||||
expected:
|
||||
if (os == "android") and fission: [OK, TIMEOUT]
|
||||
[Path animation where coordinate modes of start and end differ (Q-q and T-t)]
|
||||
expected: FAIL
|
|
@ -33,15 +33,24 @@ function sample1() {
|
|||
}
|
||||
|
||||
function sample2() {
|
||||
assert_animated_path_equals(path, "M -15 -15 l 30 15 v 15 h -15 Z");
|
||||
assert_animated_path_in_array(path, [
|
||||
"M -15 -15 l 30 15 v 15 h -15 Z",
|
||||
"M -15 -15 L 15 0 V 15 H 0 Z",
|
||||
]);
|
||||
}
|
||||
|
||||
function sample3() {
|
||||
assert_animated_path_equals(path, "M 15 15 l -30 -15 v -15 h 15 Z");
|
||||
assert_animated_path_in_array(path, [
|
||||
"M 15 15 l -30 -15 v -15 h 15 Z",
|
||||
"M 15 15 L -15 0 V -15 H 0 Z",
|
||||
]);
|
||||
}
|
||||
|
||||
function sample4() {
|
||||
assert_animated_path_equals(path, "M 29.985 29.985 l -59.97 -29.985 v -29.985 h 29.985 Z");
|
||||
assert_animated_path_in_array(path, [
|
||||
"M 29.985 29.985 l -59.97 -29.985 v -29.985 h 29.985 Z",
|
||||
"M 29.98 29.98 L -29.98 0 V -29.98 H 0 Z",
|
||||
]);
|
||||
}
|
||||
|
||||
smil_async_test(t => {
|
||||
|
|
|
@ -34,18 +34,24 @@ function sample1() {
|
|||
}
|
||||
|
||||
function sample2() {
|
||||
assert_animated_path_equals(
|
||||
path, "m -77.5 37.5 a 152.5 162.5 37.5 1 1 75 55 m 60 -12.5 a 172.5 182.5 97.5 1 1 220 142.5 Z m 225 15");
|
||||
assert_animated_path_in_array(path, [
|
||||
"m -77.5 37.5 a 152.5 162.5 37.5 1 1 75 55 m 60 -12.5 a 172.5 182.5 97.5 1 1 220 142.5 Z m 225 15",
|
||||
"M -77.5 37.5 A 152.5 162.5 37.5 1 1 -2.5 92.5 M 57.5 80 A 172.5 182.5 97.5 1 1 277.5 222.5 Z M 282.5 95",
|
||||
]);
|
||||
}
|
||||
|
||||
function sample3() {
|
||||
assert_animated_path_equals(
|
||||
path, "m -72.5 32.5 a 157.5 167.5 52.5 1 1 65 45 m 100 42.5 a 177.5 187.5 112.5 1 1 140 147.5 Z m 155 -35");
|
||||
assert_animated_path_in_array(path, [
|
||||
"m -72.5 32.5 a 157.5 167.5 52.5 1 1 65 45 m 100 42.5 a 177.5 187.5 112.5 1 1 140 147.5 Z m 155 -35",
|
||||
"M -72.5 32.5 A 157.5 167.5 52.5 1 1 -7.5 77.5 M 92.5 120 A 177.5 187.5 112.5 1 1 232.5 267.5 Z M 247.5 85",
|
||||
]);
|
||||
}
|
||||
|
||||
function sample4() {
|
||||
assert_animated_path_equals(
|
||||
path, "m -70.0025 30.0025 a 159.997 169.997 59.9925 1 1 60.005 40.005 m 119.98 69.9725 a 179.997 189.997 119.993 1 1 100.04 149.998 Z m 120.035 -59.975");
|
||||
assert_animated_path_in_array(path, [
|
||||
"m -70.0025 30.0025 a 159.997 169.997 59.9925 1 1 60.005 40.005 m 119.98 69.9725 a 179.997 189.997 119.993 1 1 100.04 149.998 Z m 120.035 -59.975",
|
||||
"M -70 30 A 160 170 59.99 1 1 -10 70.01 M 109.98 139.98 A 180 190 119.99 1 1 210.02 289.98 Z M 230.02 80",
|
||||
]);
|
||||
}
|
||||
|
||||
smil_async_test(t => {
|
||||
|
|
|
@ -33,15 +33,24 @@ function sample1() {
|
|||
}
|
||||
|
||||
function sample2() {
|
||||
assert_animated_path_equals(path, "M -30 -30 q 52.5 0 52.5 30 t -52.5 30 Z");
|
||||
assert_animated_path_in_array(path, [
|
||||
"M -30 -30 q 52.5 0 52.5 30 t -52.5 30 Z",
|
||||
"M -30 -30 Q 22.5 -30 22.5 0 T -30 30 Z",
|
||||
]);
|
||||
}
|
||||
|
||||
function sample3() {
|
||||
assert_animated_path_equals(path, "M -30 -30 q 37.5 0 37.5 30 t -37.5 30 Z");
|
||||
assert_animated_path_in_array(path, [
|
||||
"M -30 -30 q 37.5 0 37.5 30 t -37.5 30 Z",
|
||||
"M -30 -30 Q 7.5 -30 7.5 0 T -30 30 Z",
|
||||
]);
|
||||
}
|
||||
|
||||
function sample4() {
|
||||
assert_animated_path_equals(path, "M -30 -30 q 30.0075 0 30.0075 30 t -30.0075 30 Z");
|
||||
assert_animated_path_in_array(path, [
|
||||
"M -30 -30 q 30.0075 0 30.0075 30 t -30.0075 30 Z",
|
||||
"M -30 -30 Q 0.01 -30 0.01 0 T -30 30 Z",
|
||||
]);
|
||||
}
|
||||
|
||||
smil_async_test(t => {
|
||||
|
|
|
@ -56,21 +56,29 @@ function normalizeProperty(path_string) {
|
|||
return string;
|
||||
}
|
||||
|
||||
// Assert that the animated path data of |target| matches that of
|
||||
// |expected_path_string|. Numbers will be rounded to 2 decimal places.
|
||||
function assert_animated_path_equals(target, expected_path_string) {
|
||||
// Assert that the animated path data of |target| matches one of
|
||||
// |expected_paths|. Numbers will be rounded to 2 decimal places.
|
||||
function assert_animated_path_in_array(target, expected_paths) {
|
||||
const kDecimals = 2;
|
||||
let expected, actual;
|
||||
if ('animatedPathSegList' in target) {
|
||||
let probePathElement = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
||||
probePathElement.setAttribute('d', expected_path_string);
|
||||
expected = serializePathSegList(probePathElement.pathSegList, kDecimals)
|
||||
expected = expected_paths.map(p => {
|
||||
probePathElement.setAttribute('d', p);
|
||||
return serializePathSegList(probePathElement.pathSegList, kDecimals)
|
||||
});
|
||||
actual = serializePathSegList(target.animatedPathSegList, kDecimals);
|
||||
} else if ('d' in target.style) {
|
||||
expected = normalizeValue(normalizeProperty(expected_path_string), kDecimals);
|
||||
expected = expected_paths.map(p => normalizeValue(normalizeProperty(p), kDecimals));
|
||||
actual = normalizeValue(getComputedStyle(target).getPropertyValue('d'), kDecimals);
|
||||
} else {
|
||||
assert_unreached('no animated path data');
|
||||
}
|
||||
assert_equals(actual, expected);
|
||||
assert_in_array(actual, expected);
|
||||
}
|
||||
|
||||
// Assert that the animated path data of |target| matches that of
|
||||
// |expected_path_string|. Numbers will be rounded to 2 decimal places.
|
||||
function assert_animated_path_equals(target, expected_path_string) {
|
||||
return assert_animated_path_in_array(target, [expected_path_string]);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче