From da4c7e7ed675c3bf405668739c3012d140856109 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:34:42 +0200 Subject: Adding upstream version 126.0. Signed-off-by: Daniel Baumann --- .../interfaces/Animation/progress.tentative.html | 81 ++++++++++ .../scroll-timeline-progress.tentative.html | 166 +++++++++++++++++++++ .../interfaces/Animation/style-change-events.html | 1 + .../processing-a-keyframes-argument-001.html | 1 - .../responsive/background-position-responsive.html | 53 +++++++ .../responsive/box-shadow-responsive.html | 61 ++++++++ .../responsive/neutral-keyframe-ref.html | 16 ++ .../responsive/neutral-keyframe.html | 41 +++++ .../web-animations/responsive/responsive-test.js | 65 ++++++++ .../tests/web-animations/responsive/width.html | 88 +++++++++++ 10 files changed, 572 insertions(+), 1 deletion(-) create mode 100644 testing/web-platform/tests/web-animations/interfaces/Animation/progress.tentative.html create mode 100644 testing/web-platform/tests/web-animations/interfaces/Animation/scroll-timeline-progress.tentative.html create mode 100644 testing/web-platform/tests/web-animations/responsive/background-position-responsive.html create mode 100644 testing/web-platform/tests/web-animations/responsive/box-shadow-responsive.html create mode 100644 testing/web-platform/tests/web-animations/responsive/neutral-keyframe-ref.html create mode 100644 testing/web-platform/tests/web-animations/responsive/neutral-keyframe.html create mode 100644 testing/web-platform/tests/web-animations/responsive/responsive-test.js create mode 100644 testing/web-platform/tests/web-animations/responsive/width.html (limited to 'testing/web-platform/tests/web-animations') diff --git a/testing/web-platform/tests/web-animations/interfaces/Animation/progress.tentative.html b/testing/web-platform/tests/web-animations/interfaces/Animation/progress.tentative.html new file mode 100644 index 0000000000..38f37cbfeb --- /dev/null +++ b/testing/web-platform/tests/web-animations/interfaces/Animation/progress.tentative.html @@ -0,0 +1,81 @@ + + +Animation.progress + + + + + +
+ + diff --git a/testing/web-platform/tests/web-animations/interfaces/Animation/scroll-timeline-progress.tentative.html b/testing/web-platform/tests/web-animations/interfaces/Animation/scroll-timeline-progress.tentative.html new file mode 100644 index 0000000000..b40e72482b --- /dev/null +++ b/testing/web-platform/tests/web-animations/interfaces/Animation/scroll-timeline-progress.tentative.html @@ -0,0 +1,166 @@ + + +Animation.progress + + + + + + + +
+ + diff --git a/testing/web-platform/tests/web-animations/interfaces/Animation/style-change-events.html b/testing/web-platform/tests/web-animations/interfaces/Animation/style-change-events.html index 0ec21657e3..d2d6e9d4c9 100644 --- a/testing/web-platform/tests/web-animations/interfaces/Animation/style-change-events.html +++ b/testing/web-platform/tests/web-animations/interfaces/Animation/style-change-events.html @@ -169,6 +169,7 @@ const tests = { // no effect. rangeStart: UsePropertyTest(animation => animation.rangeStart), rangeEnd: UsePropertyTest(animation => animation.rangeEnd), + progress: UsePropertyTest(animation => animation.progress), replaceState: UsePropertyTest(animation => animation.replaceState), ready: UsePropertyTest(animation => animation.ready), finished: UsePropertyTest(animation => { diff --git a/testing/web-platform/tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html b/testing/web-platform/tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html index 271a47b301..2252248e23 100644 --- a/testing/web-platform/tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html +++ b/testing/web-platform/tests/web-animations/interfaces/KeyframeEffect/processing-a-keyframes-argument-001.html @@ -37,7 +37,6 @@ const gNonAnimatableProps = [ 'transitionTimingFunction', 'contain', 'direction', - 'display', 'textCombineUpright', 'textOrientation', 'unicodeBidi', diff --git a/testing/web-platform/tests/web-animations/responsive/background-position-responsive.html b/testing/web-platform/tests/web-animations/responsive/background-position-responsive.html new file mode 100644 index 0000000000..7b1a6cd4db --- /dev/null +++ b/testing/web-platform/tests/web-animations/responsive/background-position-responsive.html @@ -0,0 +1,53 @@ + + + + + Animation with neutral keyframe is responsive to change in underlying style + + + + + + + diff --git a/testing/web-platform/tests/web-animations/responsive/box-shadow-responsive.html b/testing/web-platform/tests/web-animations/responsive/box-shadow-responsive.html new file mode 100644 index 0000000000..4f5325dca6 --- /dev/null +++ b/testing/web-platform/tests/web-animations/responsive/box-shadow-responsive.html @@ -0,0 +1,61 @@ + + + + + Animation with neutral keyframe is responsive to change in underlying style + + + + + + + diff --git a/testing/web-platform/tests/web-animations/responsive/neutral-keyframe-ref.html b/testing/web-platform/tests/web-animations/responsive/neutral-keyframe-ref.html new file mode 100644 index 0000000000..3893330fb9 --- /dev/null +++ b/testing/web-platform/tests/web-animations/responsive/neutral-keyframe-ref.html @@ -0,0 +1,16 @@ + + + + + + +
+ + diff --git a/testing/web-platform/tests/web-animations/responsive/neutral-keyframe.html b/testing/web-platform/tests/web-animations/responsive/neutral-keyframe.html new file mode 100644 index 0000000000..813aa7c04c --- /dev/null +++ b/testing/web-platform/tests/web-animations/responsive/neutral-keyframe.html @@ -0,0 +1,41 @@ + + + + + + Animation with neutral keyframe is responsive to change in underlying style + + + + + + + +
+ + + diff --git a/testing/web-platform/tests/web-animations/responsive/responsive-test.js b/testing/web-platform/tests/web-animations/responsive/responsive-test.js new file mode 100644 index 0000000000..feca53259c --- /dev/null +++ b/testing/web-platform/tests/web-animations/responsive/responsive-test.js @@ -0,0 +1,65 @@ +class ResponsiveTest { + constructor(target, property, keyframes) { + this.property = property; + this.target = target; + this.duration = 1000; + this.anim = target.animate(keyframes, this.duration); + this.anim.pause(); + } + + get ready() { + return new Promise(resolve => { + this.anim.ready.then(resolve); + }); + } + + set underlyingValue(value) { + this.target.style[this.property] = value; + } + + set inheritedValue(value) { + this.target.parentElement.style[this.property] = value; + } + + // The testCases are of the form: + // [{at: , is: }, ...] + assertResponsive(testCases) { + for (let i = 0; i < testCases.length; i++) { + const testCase = testCases[i]; + this.anim.currentTime = this.duration * testCase.at; + assert_equals(getComputedStyle(this.target)[this.property], testCase.is, + `${this.property} at ${testCase.at}`); + } + } +} + +// Creates a test that allows setting the underlying style of the target +// element or its parent. +// Options are of the form: +// property: required property in camelcase form as used in the +// web animation API. +// from: optional starting keyframe as a string. +// to: optional ending keyframe as a string. +function createResponsiveTest(test, options) { + const parent = document.createElement('div'); + const target = document.createElement('div'); + document.body.appendChild(parent); + parent.appendChild(target); + const property = options.property; + const keyframes = []; + const createKeyframe = (value) => { + const keyframe = {}; + keyframe[property] = value; + return keyframe; + } + if (options.from) { + keyframes.push(createKeyframe(options.from)); + } + if (options.to) { + keyframes.push(createKeyframe(options.to)); + } + test.add_cleanup(() => { + parent.remove(); + }); + return new ResponsiveTest(target, property, keyframes); +} diff --git a/testing/web-platform/tests/web-animations/responsive/width.html b/testing/web-platform/tests/web-animations/responsive/width.html new file mode 100644 index 0000000000..9f5bf5a29d --- /dev/null +++ b/testing/web-platform/tests/web-animations/responsive/width.html @@ -0,0 +1,88 @@ + + + + + +
+
+
+
+
+
+ + -- cgit v1.2.3