summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/intersection-observer
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/intersection-observer')
-rw-r--r--testing/web-platform/tests/intersection-observer/WEB_FEATURES.yml3
-rw-r--r--testing/web-platform/tests/intersection-observer/svg-container-element.html5
-rw-r--r--testing/web-platform/tests/intersection-observer/v2/WEB_FEATURES.yml3
3 files changed, 9 insertions, 2 deletions
diff --git a/testing/web-platform/tests/intersection-observer/WEB_FEATURES.yml b/testing/web-platform/tests/intersection-observer/WEB_FEATURES.yml
new file mode 100644
index 0000000000..1b6a42746f
--- /dev/null
+++ b/testing/web-platform/tests/intersection-observer/WEB_FEATURES.yml
@@ -0,0 +1,3 @@
+features:
+- name: intersection-observer
+ files: "**"
diff --git a/testing/web-platform/tests/intersection-observer/svg-container-element.html b/testing/web-platform/tests/intersection-observer/svg-container-element.html
index e2b6ab5cb0..1c27acee51 100644
--- a/testing/web-platform/tests/intersection-observer/svg-container-element.html
+++ b/testing/web-platform/tests/intersection-observer/svg-container-element.html
@@ -14,6 +14,7 @@
<script>
const viewportWidth = document.documentElement.clientWidth;
const viewportHeight = document.documentElement.clientHeight;
+const kEpsilon = 1; // clientHeight and clientWidth are rounded if the viewport is fractional.
setup(() => {
window.entries = [];
window.target = document.getElementById("target");
@@ -40,7 +41,7 @@ function step0() {
0, 0, 0, 0,
0, viewportWidth, 0, viewportHeight,
false,
- ]);
+ ], kEpsilon);
}
function step1() {
checkLastEntry(entries, 1, [
@@ -48,6 +49,6 @@ function step1() {
8, 8 + targetRect.width, 8, 8 + targetRect.height,
0, viewportWidth, 0, viewportHeight,
true,
- ]);
+ ], kEpsilon);
}
</script>
diff --git a/testing/web-platform/tests/intersection-observer/v2/WEB_FEATURES.yml b/testing/web-platform/tests/intersection-observer/v2/WEB_FEATURES.yml
new file mode 100644
index 0000000000..e57d67f641
--- /dev/null
+++ b/testing/web-platform/tests/intersection-observer/v2/WEB_FEATURES.yml
@@ -0,0 +1,3 @@
+features:
+- name: intersection-observer-v2
+ files: "**"