From 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel.baumann@progress-linux.org>
Date: Fri, 19 Apr 2024 03:47:29 +0200
Subject: Adding upstream version 115.8.0esr.

Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
---
 .../css/scroll-timeline-axis-writing-mode.html     | 139 +++++++++++++++++++++
 1 file changed, 139 insertions(+)
 create mode 100644 testing/web-platform/tests/scroll-animations/css/scroll-timeline-axis-writing-mode.html

(limited to 'testing/web-platform/tests/scroll-animations/css/scroll-timeline-axis-writing-mode.html')

diff --git a/testing/web-platform/tests/scroll-animations/css/scroll-timeline-axis-writing-mode.html b/testing/web-platform/tests/scroll-animations/css/scroll-timeline-axis-writing-mode.html
new file mode 100644
index 0000000000..958ce4964e
--- /dev/null
+++ b/testing/web-platform/tests/scroll-animations/css/scroll-timeline-axis-writing-mode.html
@@ -0,0 +1,139 @@
+<!DOCTYPE html>
+<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1">
+<link rel="help" src="https://drafts.csswg.org/scroll-animations-1/#scroll-timeline-axis">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/web-animations/testcommon.js"></script>
+<style>
+  .scroller {
+    overflow: hidden;
+    width: 100px;
+    height: 100px;
+  }
+  .contents {
+    height: 200px;
+    width: 200px;
+  }
+  @keyframes expand {
+    from { width: 100px; }
+    to { width: 200px; }
+  }
+  #timeline_initial_axis {
+    scroll-timeline: timeline_initial_axis;
+  }
+  #timeline_vertical {
+    scroll-timeline: timeline_vertical vertical;
+  }
+  #timeline_horizontal {
+    scroll-timeline: timeline_horizontal horizontal;
+  }
+  #timeline_block_in_horizontal {
+    scroll-timeline: timeline_block_in_horizontal block;
+  }
+  #timeline_inline_in_horizontal {
+    scroll-timeline: timeline_inline_in_horizontal inline;
+  }
+  #timeline_block_in_vertical {
+    scroll-timeline: timeline_block_in_vertical block;
+    writing-mode: vertical-lr;
+  }
+  #timeline_inline_in_vertical {
+    scroll-timeline: timeline_inline_in_vertical inline;
+    writing-mode: vertical-lr;
+  }
+  .target {
+    width: 0px;
+    animation-name: expand;
+    animation-duration: 10s;
+    animation-timing-function: linear;
+    position: absolute;
+  }
+  /* Ensure stable expectations if feature is not supported */
+  @supports not (animation-timeline:foo) {
+    .target { animation-play-state: paused; }
+  }
+  #element_initial_axis { animation-timeline: timeline_initial_axis; }
+  #element_vertical { animation-timeline: timeline_vertical; }
+  #element_horizontal { animation-timeline: timeline_horizontal; }
+  #element_block_in_horizontal { animation-timeline: timeline_block_in_horizontal; }
+  #element_inline_in_horizontal { animation-timeline: timeline_inline_in_horizontal; }
+  #element_block_in_vertical { animation-timeline: timeline_block_in_vertical; }
+  #element_inline_in_vertical { animation-timeline: timeline_inline_in_vertical; }
+</style>
+<div class=scroller id=timeline_initial_axis>
+  <div class=contents></div>
+  <div class=target id=element_initial_axis></div>
+</div>
+<div class=scroller id=timeline_vertical>
+  <div class=contents></div>
+  <div class=target id=element_vertical></div>
+</div>
+<div class=scroller id=timeline_horizontal>
+  <div class=contents></div>
+  <div class=target id=element_horizontal></div>
+</div>
+<div class=scroller id=timeline_block_in_horizontal>
+  <div class=contents></div>
+  <div class=target id=element_block_in_horizontal></div>
+</div>
+<div class=scroller id=timeline_inline_in_horizontal>
+  <div class=contents></div>
+  <div class=target id=element_inline_in_horizontal></div>
+</div>
+<div class=scroller id=timeline_block_in_vertical>
+  <div class=contents></div>
+  <div class=target id=element_block_in_vertical></div>
+</div>
+<div class=scroller id=timeline_inline_in_vertical>
+  <div class=contents></div>
+  <div class=target id=element_inline_in_vertical></div>
+</div>
+<script>
+  // Animations linked to vertical scroll-timelines are at 75% progress.
+  timeline_initial_axis.scrollTop = 75;
+  timeline_vertical.scrollTop = 75;
+  timeline_block_in_horizontal.scrollTop = 75;
+  timeline_inline_in_vertical.scrollTop = 75;
+  // Animations linked to horizontal scroll-timelines are at 25% progress.
+  timeline_horizontal.scrollLeft = 25;
+  timeline_block_in_vertical.scrollLeft = 25;
+  timeline_inline_in_horizontal.scrollLeft = 25;
+
+  promise_test(async (t) => {
+    await waitForNextFrame();
+    assert_equals(getComputedStyle(element_initial_axis).width, '175px');
+  }, 'Initial axis');
+
+  promise_test(async (t) => {
+    await waitForNextFrame();
+    assert_equals(getComputedStyle(element_vertical).width, '175px');
+  }, 'Vertical axis');
+
+  promise_test(async (t) => {
+    await waitForNextFrame();
+    assert_equals(getComputedStyle(element_horizontal).width, '125px');
+  }, 'Horizontal axis');
+
+  promise_test(async (t) => {
+    await waitForNextFrame();
+    assert_equals(getComputedStyle(element_block_in_horizontal).width, '175px');
+  }, 'Block axis in horizontal writing-mode');
+
+  promise_test(async (t) => {
+    await waitForNextFrame();
+    assert_equals(getComputedStyle(element_inline_in_horizontal).width, '125px');
+  }, 'Inline axis in horizontal writing-mode');
+
+  promise_test(async (t) => {
+    await waitForNextFrame();
+    assert_equals(getComputedStyle(timeline_block_in_vertical).writingMode, 'vertical-lr');
+    assert_equals(getComputedStyle(element_block_in_vertical).width, '125px');
+  }, 'Block axis in vertical writing-mode');
+
+  promise_test(async (t) => {
+    await waitForNextFrame();
+    assert_equals(getComputedStyle(timeline_inline_in_vertical).writingMode, 'vertical-lr');
+    assert_equals(getComputedStyle(element_inline_in_vertical).width, '175px');
+  }, 'Inline axis in vertical writing-mode');
+
+</script>
-- 
cgit v1.2.3