summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/cssom-view/support
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/css/cssom-view/support')
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/1x1-green.pngbin0 -> 135 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/1x1-lime.pngbin0 -> 135 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/1x1-maroon.pngbin0 -> 109 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/1x1-navy.pngbin0 -> 109 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/1x1-red.pngbin0 -> 135 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/1x1-white.pngbin0 -> 109 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/60x60-gg-rr.pngbin0 -> 224 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/60x60-green.pngbin0 -> 218 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/README28
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/a-green.css1
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/b-green.css1
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/c-red.css1
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/cat.pngbin0 -> 1883 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/import-green.css1
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/import-red.css1
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/pattern-grg-rgr-grg.pngbin0 -> 222 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/pattern-grg-rrg-rgg.pngbin0 -> 231 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/pattern-rgr-grg-rgr.pngbin0 -> 223 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/pattern-tr.pngbin0 -> 137 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/ruler-h-50%.pngbin0 -> 691 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/ruler-h-50px.pngbin0 -> 671 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/ruler-v-100px.pngbin0 -> 760 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/ruler-v-50px.pngbin0 -> 757 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/scroll-behavior.js87
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/square-purple.pngbin0 -> 92 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/square-teal.pngbin0 -> 92 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/square-white.pngbin0 -> 78 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/support/README4
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/support/swatch-green.pngbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/support/swatch-red.pngbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/swatch-blue.pngbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/swatch-green.pngbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/swatch-lime.pngbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/swatch-orange.pngbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/swatch-red.pngbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/swatch-teal.pngbin0 -> 156 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/swatch-white.pngbin0 -> 85 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/swatch-yellow.pngbin0 -> 84 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/test-bl.pngbin0 -> 1368 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/test-br.pngbin0 -> 1045 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/test-inner-half-size.pngbin0 -> 180 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/test-outer.pngbin0 -> 2412 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/test-tl.pngbin0 -> 1025 bytes
-rw-r--r--testing/web-platform/tests/css/cssom-view/support/test-tr.pngbin0 -> 1235 bytes
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
new file mode 100644
index 0000000000..b98ca0ba0a
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/1x1-green.png
Binary files differ
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
new file mode 100644
index 0000000000..cb397fb090
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/1x1-lime.png
Binary files differ
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
new file mode 100644
index 0000000000..3f86b07219
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/1x1-maroon.png
Binary files differ
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
new file mode 100644
index 0000000000..9b9a03955b
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/1x1-navy.png
Binary files differ
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
new file mode 100644
index 0000000000..6bd73ac101
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/1x1-red.png
Binary files differ
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
new file mode 100644
index 0000000000..dd43faec54
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/1x1-white.png
Binary files differ
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
new file mode 100644
index 0000000000..84f5b2a4f1
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/60x60-gg-rr.png
Binary files differ
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
new file mode 100644
index 0000000000..b3c8cf3eb4
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/60x60-green.png
Binary files differ
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
new file mode 100644
index 0000000000..85dd732481
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/cat.png
Binary files differ
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
new file mode 100644
index 0000000000..9b88fbd811
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/pattern-grg-rgr-grg.png
Binary files differ
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
new file mode 100644
index 0000000000..fcf4f3fd7d
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/pattern-grg-rrg-rgg.png
Binary files differ
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
new file mode 100644
index 0000000000..d454e3a630
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/pattern-rgr-grg-rgr.png
Binary files differ
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
new file mode 100644
index 0000000000..8b4b25364e
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/pattern-tr.png
Binary files differ
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
new file mode 100644
index 0000000000..cf2eea6b43
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/ruler-h-50%.png
Binary files differ
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
new file mode 100644
index 0000000000..9f46583665
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/ruler-h-50px.png
Binary files differ
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
new file mode 100644
index 0000000000..a837eca222
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/ruler-v-100px.png
Binary files differ
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
new file mode 100644
index 0000000000..8414102802
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/ruler-v-50px.png
Binary files differ
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
new file mode 100644
index 0000000000..0f522d7872
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/square-purple.png
Binary files differ
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
new file mode 100644
index 0000000000..e567f51b91
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/square-teal.png
Binary files differ
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
new file mode 100644
index 0000000000..5853cbb238
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/square-white.png
Binary files differ
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
new file mode 100644
index 0000000000..1caf25c992
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/support/swatch-green.png
Binary files differ
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
new file mode 100644
index 0000000000..0aa79b0c86
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/support/swatch-red.png
Binary files differ
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
new file mode 100644
index 0000000000..bf2759634d
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/swatch-blue.png
Binary files differ
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
new file mode 100644
index 0000000000..0aa79b0c86
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/swatch-green.png
Binary files differ
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
new file mode 100644
index 0000000000..55fd7fdaed
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/swatch-lime.png
Binary files differ
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
new file mode 100644
index 0000000000..d3cd498b52
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/swatch-orange.png
Binary files differ
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
new file mode 100644
index 0000000000..1caf25c992
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/swatch-red.png
Binary files differ
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
new file mode 100644
index 0000000000..0293ce89de
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/swatch-teal.png
Binary files differ
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
new file mode 100644
index 0000000000..1a7d4323d7
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/swatch-white.png
Binary files differ
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
new file mode 100644
index 0000000000..1591aa0e2e
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/swatch-yellow.png
Binary files differ
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
new file mode 100644
index 0000000000..904e24e996
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/test-bl.png
Binary files differ
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
new file mode 100644
index 0000000000..f413ff5c1a
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/test-br.png
Binary files differ
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
new file mode 100644
index 0000000000..e473bf80ef
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/test-inner-half-size.png
Binary files differ
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
new file mode 100644
index 0000000000..82eeace7fc
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/test-outer.png
Binary files differ
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
new file mode 100644
index 0000000000..f6ac0ef7e8
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/test-tl.png
Binary files differ
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
new file mode 100644
index 0000000000..59843ae54b
--- /dev/null
+++ b/testing/web-platform/tests/css/cssom-view/support/test-tr.png
Binary files differ