summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-overscroll-behavior/parsing
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:22:09 +0000
commit43a97878ce14b72f0981164f87f2e35e14151312 (patch)
tree620249daf56c0258faa40cbdcf9cfba06de2a846 /testing/web-platform/tests/css/css-overscroll-behavior/parsing
parentInitial commit. (diff)
downloadfirefox-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/css-overscroll-behavior/parsing')
-rw-r--r--testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed.html26
-rw-r--r--testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-invalid.html28
-rw-r--r--testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid.html36
3 files changed, 90 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed.html b/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed.html
new file mode 100644
index 0000000000..e7b40d95c5
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-computed.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Overscroll Behavior: getComputedStyle().overscrollBehavior*</title>
+<link rel="help" href="https://drafts.csswg.org/css-overscroll-behavior/#overscroll-behavior-properties">
+<meta name="assert" content="overscroll-behavior-x computed value is as specified.">
+<meta name="assert" content="overscroll-behavior-y computed value is as specified.">
+<meta name="assert" content="overscroll-behavior-inline computed value is as specified.">
+<meta name="assert" content="overscroll-behavior-block computed value is as specified.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+</head>
+<body>
+<div id="target"></div>
+<script>
+'use strict';
+for (let property of ["overscroll-behavior-x", "overscroll-behavior-y", "overscroll-behavior-inline", "overscroll-behavior-block"]) {
+ test_computed_value(property, "contain");
+ test_computed_value(property, "none");
+ test_computed_value(property, "auto");
+}
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-invalid.html b/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-invalid.html
new file mode 100644
index 0000000000..02ada4576c
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-invalid.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Overscroll Behavior: parsing overscroll-behavior with invalid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-overscroll-behavior/#propdef-overscroll-behavior">
+<meta name="assert" content="overscroll-behavior supports only the grammar '[ contain | none | auto ]{1,2}'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+'use strict';
+test_invalid_value("overscroll-behavior", "normal");
+test_invalid_value("overscroll-behavior", "0");
+test_invalid_value("overscroll-behavior", "contain contain contain");
+
+
+for (let property of ["overscroll-behavior-x", "overscroll-behavior-y", "overscroll-behavior-inline", "overscroll-behavior-block"]) {
+ test_invalid_value(property, "normal");
+ test_invalid_value(property, "0");
+ test_invalid_value(property, "contain contain");
+}
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid.html b/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid.html
new file mode 100644
index 0000000000..45d90d485f
--- /dev/null
+++ b/testing/web-platform/tests/css/css-overscroll-behavior/parsing/overscroll-behavior-valid.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<title>CSS Overscroll Behavior: parsing overscroll-behavior with valid values</title>
+<link rel="author" title="Eric Willigers" href="mailto:ericwilligers@chromium.org">
+<link rel="help" href="https://drafts.csswg.org/css-overscroll-behavior/#propdef-overscroll-behavior">
+<meta name="assert" content="overscroll-behavior supports the full grammar '[ contain | none | auto ]{1,2}'.">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+</head>
+<body>
+<script>
+'use strict';
+test_valid_value("overscroll-behavior", "contain");
+test_valid_value("overscroll-behavior", "none");
+test_valid_value("overscroll-behavior", "auto");
+
+test_valid_value("overscroll-behavior", "contain none");
+test_valid_value("overscroll-behavior", "none auto");
+test_valid_value("overscroll-behavior", "auto contain");
+
+test_valid_value("overscroll-behavior", "contain contain", "contain");
+test_valid_value("overscroll-behavior", "none none", "none");
+test_valid_value("overscroll-behavior", "auto auto", "auto");
+
+
+for (let property of ["overscroll-behavior-x", "overscroll-behavior-y", "overscroll-behavior-inline", "overscroll-behavior-block"]) {
+ test_valid_value(property, "contain");
+ test_valid_value(property, "none");
+ test_valid_value(property, "auto");
+}
+</script>
+</body>
+</html>