diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/cssom-view/support | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/cssom-view/support')
44 files changed, 124 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/cssom-view/support/1x1-green.png b/testing/web-platform/tests/css/cssom-view/support/1x1-green.png Binary files differnew file mode 100644 index 0000000000..b98ca0ba0a --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/1x1-green.png diff --git a/testing/web-platform/tests/css/cssom-view/support/1x1-lime.png b/testing/web-platform/tests/css/cssom-view/support/1x1-lime.png Binary files differnew file mode 100644 index 0000000000..cb397fb090 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/1x1-lime.png diff --git a/testing/web-platform/tests/css/cssom-view/support/1x1-maroon.png b/testing/web-platform/tests/css/cssom-view/support/1x1-maroon.png Binary files differnew file mode 100644 index 0000000000..3f86b07219 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/1x1-maroon.png diff --git a/testing/web-platform/tests/css/cssom-view/support/1x1-navy.png b/testing/web-platform/tests/css/cssom-view/support/1x1-navy.png Binary files differnew file mode 100644 index 0000000000..9b9a03955b --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/1x1-navy.png diff --git a/testing/web-platform/tests/css/cssom-view/support/1x1-red.png b/testing/web-platform/tests/css/cssom-view/support/1x1-red.png Binary files differnew file mode 100644 index 0000000000..6bd73ac101 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/1x1-red.png diff --git a/testing/web-platform/tests/css/cssom-view/support/1x1-white.png b/testing/web-platform/tests/css/cssom-view/support/1x1-white.png Binary files differnew file mode 100644 index 0000000000..dd43faec54 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/1x1-white.png diff --git a/testing/web-platform/tests/css/cssom-view/support/60x60-gg-rr.png b/testing/web-platform/tests/css/cssom-view/support/60x60-gg-rr.png Binary files differnew file mode 100644 index 0000000000..84f5b2a4f1 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/60x60-gg-rr.png diff --git a/testing/web-platform/tests/css/cssom-view/support/60x60-green.png b/testing/web-platform/tests/css/cssom-view/support/60x60-green.png Binary files differnew file mode 100644 index 0000000000..b3c8cf3eb4 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/60x60-green.png diff --git a/testing/web-platform/tests/css/cssom-view/support/README b/testing/web-platform/tests/css/cssom-view/support/README new file mode 100644 index 0000000000..2e5f2ad073 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/README @@ -0,0 +1,28 @@ +CSS Global Support Directory +============================ + +This directory contains common support files (such as images and external +style sheets). These are sync'ed into the support directories of all our +test suites. If you have test-suite-specific support files, please add +them to the appropriate test-suite-specific support/ directory. + +If you add to a support/ directory, please run the tools/supportprop.py +script from the top of the repository to cascade support files into the +lower-level support directories. + +Description of the Common Support File Collection +------------------------------------------------- + +The 1x1-* images are all exactly one pixel. + +The swatch-* images all use 15x15 cells. + +The square-* images all use 15x15 cells with one pixel borders. + +The pattern-* images use cells of various sizes: + + pattern-grg-rgr-grg.png 20x20 + pattern-rgr-grg-rgr.png 20x20 + pattern-tr.png 15x15 + pattern-grg-rrg-rgg.png 15x15 + diff --git a/testing/web-platform/tests/css/cssom-view/support/a-green.css b/testing/web-platform/tests/css/cssom-view/support/a-green.css new file mode 100644 index 0000000000..b0dbb071d5 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/a-green.css @@ -0,0 +1 @@ +.a { color: green; } diff --git a/testing/web-platform/tests/css/cssom-view/support/b-green.css b/testing/web-platform/tests/css/cssom-view/support/b-green.css new file mode 100644 index 0000000000..a0473f5ca2 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/b-green.css @@ -0,0 +1 @@ +.b { color: green; }
\ No newline at end of file diff --git a/testing/web-platform/tests/css/cssom-view/support/c-red.css b/testing/web-platform/tests/css/cssom-view/support/c-red.css new file mode 100644 index 0000000000..d4ba5c64e9 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/c-red.css @@ -0,0 +1 @@ +.c { color: red; }
\ No newline at end of file diff --git a/testing/web-platform/tests/css/cssom-view/support/cat.png b/testing/web-platform/tests/css/cssom-view/support/cat.png Binary files differnew file mode 100644 index 0000000000..85dd732481 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/cat.png diff --git a/testing/web-platform/tests/css/cssom-view/support/import-green.css b/testing/web-platform/tests/css/cssom-view/support/import-green.css new file mode 100644 index 0000000000..537104e663 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/import-green.css @@ -0,0 +1 @@ +.import { color: green; } diff --git a/testing/web-platform/tests/css/cssom-view/support/import-red.css b/testing/web-platform/tests/css/cssom-view/support/import-red.css new file mode 100644 index 0000000000..9945ef4711 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/import-red.css @@ -0,0 +1 @@ +.import { color: red; } diff --git a/testing/web-platform/tests/css/cssom-view/support/pattern-grg-rgr-grg.png b/testing/web-platform/tests/css/cssom-view/support/pattern-grg-rgr-grg.png Binary files differnew file mode 100644 index 0000000000..9b88fbd811 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/pattern-grg-rgr-grg.png diff --git a/testing/web-platform/tests/css/cssom-view/support/pattern-grg-rrg-rgg.png b/testing/web-platform/tests/css/cssom-view/support/pattern-grg-rrg-rgg.png Binary files differnew file mode 100644 index 0000000000..fcf4f3fd7d --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/pattern-grg-rrg-rgg.png diff --git a/testing/web-platform/tests/css/cssom-view/support/pattern-rgr-grg-rgr.png b/testing/web-platform/tests/css/cssom-view/support/pattern-rgr-grg-rgr.png Binary files differnew file mode 100644 index 0000000000..d454e3a630 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/pattern-rgr-grg-rgr.png diff --git a/testing/web-platform/tests/css/cssom-view/support/pattern-tr.png b/testing/web-platform/tests/css/cssom-view/support/pattern-tr.png Binary files differnew file mode 100644 index 0000000000..8b4b25364e --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/pattern-tr.png diff --git a/testing/web-platform/tests/css/cssom-view/support/ruler-h-50%.png b/testing/web-platform/tests/css/cssom-view/support/ruler-h-50%.png Binary files differnew file mode 100644 index 0000000000..cf2eea6b43 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/ruler-h-50%.png diff --git a/testing/web-platform/tests/css/cssom-view/support/ruler-h-50px.png b/testing/web-platform/tests/css/cssom-view/support/ruler-h-50px.png Binary files differnew file mode 100644 index 0000000000..9f46583665 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/ruler-h-50px.png diff --git a/testing/web-platform/tests/css/cssom-view/support/ruler-v-100px.png b/testing/web-platform/tests/css/cssom-view/support/ruler-v-100px.png Binary files differnew file mode 100644 index 0000000000..a837eca222 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/ruler-v-100px.png diff --git a/testing/web-platform/tests/css/cssom-view/support/ruler-v-50px.png b/testing/web-platform/tests/css/cssom-view/support/ruler-v-50px.png Binary files differnew file mode 100644 index 0000000000..8414102802 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/ruler-v-50px.png diff --git a/testing/web-platform/tests/css/cssom-view/support/scroll-behavior.js b/testing/web-platform/tests/css/cssom-view/support/scroll-behavior.js new file mode 100644 index 0000000000..0a0968e025 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/scroll-behavior.js @@ -0,0 +1,87 @@ +function observeScrolling(elements, callback) { + if (!Array.isArray(elements)) + elements = [elements]; + var lastChangedFrame = 0; + var lastLeft = new Map(); + var lastTop = new Map(); + elements.forEach((element) => { + lastLeft.set(element, element.scrollLeft); + lastTop.set(element, element.scrollTop); + }); + function tick(frames) { + // We requestAnimationFrame either for 500 frames or until 20 frames with + // no change have been observed. + if (frames >= 500 || frames - lastChangedFrame > 20) { + callback(true); + } else { + var scrollHappened = elements.some((element) => { + return element.scrollLeft != lastLeft.get(element) || element.scrollTop != lastTop.get(element); + }); + if (scrollHappened) { + lastChangedFrame = frames; + elements.forEach((element) => { + lastLeft.set(element, element.scrollLeft); + lastTop.set(element, element.scrollTop); + }); + callback(false); + } + requestAnimationFrame(tick.bind(null, frames + 1)); + } + } + tick(0); +} + +function waitForScrollEnd(elements) { + return new Promise((resolve) => { + observeScrolling(elements, (done) => { + if (done) + resolve(); + }); + }); +} + +function resetScroll(scrollingElement) { + // Try various methods to ensure the element position is reset immediately. + scrollingElement.scrollLeft = 0; + scrollingElement.scrollTop = 0; + scrollingElement.scroll({left: 0, top: 0, behavior: "instant"}); +} + +function resetScrollForWindow(scrollingWindow) { + // Try various methods to ensure the element position is reset immediately. + scrollingWindow.document.scrollingElement.scrollLeft = 0; + scrollingWindow.document.scrollingElement.scrollTop = 0; + scrollingWindow.scroll({left: 0, top: 0, behavior: "instant"}); +} + +function setScrollBehavior(styledElement, className) { + styledElement.classList.remove("autoBehavior", "smoothBehavior"); + styledElement.classList.add(className); +} + +function scrollNode(scrollingElement, scrollFunction, behavior, elementToRevealLeft, elementToRevealTop) { + var args = {}; + if (behavior) + args.behavior = behavior; + switch (scrollFunction) { + case "scrollIntoView": + args.inline = "start"; + args.block = "start"; + elementToReveal.scrollIntoView(args); + break; + default: + args.left = elementToRevealLeft; + args.top = elementToRevealTop; + scrollingElement[scrollFunction](args); + break; + } +} + +function scrollWindow(scrollingWindow, scrollFunction, behavior, elementToRevealLeft, elementToRevealTop) { + var args = {}; + if (behavior) + args.behavior = behavior; + args.left = elementToRevealLeft; + args.top = elementToRevealTop; + scrollingWindow[scrollFunction](args); +} diff --git a/testing/web-platform/tests/css/cssom-view/support/square-purple.png b/testing/web-platform/tests/css/cssom-view/support/square-purple.png Binary files differnew file mode 100644 index 0000000000..0f522d7872 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/square-purple.png diff --git a/testing/web-platform/tests/css/cssom-view/support/square-teal.png b/testing/web-platform/tests/css/cssom-view/support/square-teal.png Binary files differnew file mode 100644 index 0000000000..e567f51b91 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/square-teal.png diff --git a/testing/web-platform/tests/css/cssom-view/support/square-white.png b/testing/web-platform/tests/css/cssom-view/support/square-white.png Binary files differnew file mode 100644 index 0000000000..5853cbb238 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/square-white.png diff --git a/testing/web-platform/tests/css/cssom-view/support/support/README b/testing/web-platform/tests/css/cssom-view/support/support/README new file mode 100644 index 0000000000..ea8cb9ef35 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/support/README @@ -0,0 +1,4 @@ +The swatch-green.png file in this directory is really a RED swatch, +and the swatch-red.png file is really a green swatch. + +This directory is used to test relative URIs.
\ No newline at end of file diff --git a/testing/web-platform/tests/css/cssom-view/support/support/swatch-green.png b/testing/web-platform/tests/css/cssom-view/support/support/swatch-green.png Binary files differnew file mode 100644 index 0000000000..1caf25c992 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/support/swatch-green.png diff --git a/testing/web-platform/tests/css/cssom-view/support/support/swatch-red.png b/testing/web-platform/tests/css/cssom-view/support/support/swatch-red.png Binary files differnew file mode 100644 index 0000000000..0aa79b0c86 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/support/swatch-red.png diff --git a/testing/web-platform/tests/css/cssom-view/support/swatch-blue.png b/testing/web-platform/tests/css/cssom-view/support/swatch-blue.png Binary files differnew file mode 100644 index 0000000000..bf2759634d --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/swatch-blue.png diff --git a/testing/web-platform/tests/css/cssom-view/support/swatch-green.png b/testing/web-platform/tests/css/cssom-view/support/swatch-green.png Binary files differnew file mode 100644 index 0000000000..0aa79b0c86 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/swatch-green.png diff --git a/testing/web-platform/tests/css/cssom-view/support/swatch-lime.png b/testing/web-platform/tests/css/cssom-view/support/swatch-lime.png Binary files differnew file mode 100644 index 0000000000..55fd7fdaed --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/swatch-lime.png diff --git a/testing/web-platform/tests/css/cssom-view/support/swatch-orange.png b/testing/web-platform/tests/css/cssom-view/support/swatch-orange.png Binary files differnew file mode 100644 index 0000000000..d3cd498b52 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/swatch-orange.png diff --git a/testing/web-platform/tests/css/cssom-view/support/swatch-red.png b/testing/web-platform/tests/css/cssom-view/support/swatch-red.png Binary files differnew file mode 100644 index 0000000000..1caf25c992 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/swatch-red.png diff --git a/testing/web-platform/tests/css/cssom-view/support/swatch-teal.png b/testing/web-platform/tests/css/cssom-view/support/swatch-teal.png Binary files differnew file mode 100644 index 0000000000..0293ce89de --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/swatch-teal.png diff --git a/testing/web-platform/tests/css/cssom-view/support/swatch-white.png b/testing/web-platform/tests/css/cssom-view/support/swatch-white.png Binary files differnew file mode 100644 index 0000000000..1a7d4323d7 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/swatch-white.png diff --git a/testing/web-platform/tests/css/cssom-view/support/swatch-yellow.png b/testing/web-platform/tests/css/cssom-view/support/swatch-yellow.png Binary files differnew file mode 100644 index 0000000000..1591aa0e2e --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/swatch-yellow.png diff --git a/testing/web-platform/tests/css/cssom-view/support/test-bl.png b/testing/web-platform/tests/css/cssom-view/support/test-bl.png Binary files differnew file mode 100644 index 0000000000..904e24e996 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/test-bl.png diff --git a/testing/web-platform/tests/css/cssom-view/support/test-br.png b/testing/web-platform/tests/css/cssom-view/support/test-br.png Binary files differnew file mode 100644 index 0000000000..f413ff5c1a --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/test-br.png diff --git a/testing/web-platform/tests/css/cssom-view/support/test-inner-half-size.png b/testing/web-platform/tests/css/cssom-view/support/test-inner-half-size.png Binary files differnew file mode 100644 index 0000000000..e473bf80ef --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/test-inner-half-size.png diff --git a/testing/web-platform/tests/css/cssom-view/support/test-outer.png b/testing/web-platform/tests/css/cssom-view/support/test-outer.png Binary files differnew file mode 100644 index 0000000000..82eeace7fc --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/test-outer.png diff --git a/testing/web-platform/tests/css/cssom-view/support/test-tl.png b/testing/web-platform/tests/css/cssom-view/support/test-tl.png Binary files differnew file mode 100644 index 0000000000..f6ac0ef7e8 --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/test-tl.png diff --git a/testing/web-platform/tests/css/cssom-view/support/test-tr.png b/testing/web-platform/tests/css/cssom-view/support/test-tr.png Binary files differnew file mode 100644 index 0000000000..59843ae54b --- /dev/null +++ b/testing/web-platform/tests/css/cssom-view/support/test-tr.png |