summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-rhythm/parsing
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /testing/web-platform/tests/css/css-rhythm/parsing
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-rhythm/parsing')
-rw-r--r--testing/web-platform/tests/css/css-rhythm/parsing/block-step-insert-computed.html25
-rw-r--r--testing/web-platform/tests/css/css-rhythm/parsing/block-step-insert-invalid.html33
-rw-r--r--testing/web-platform/tests/css/css-rhythm/parsing/block-step-insert-valid.html25
-rw-r--r--testing/web-platform/tests/css/css-rhythm/parsing/block-step-size-computed.html29
-rw-r--r--testing/web-platform/tests/css/css-rhythm/parsing/block-step-size-invalid.html28
-rw-r--r--testing/web-platform/tests/css/css-rhythm/parsing/block-step-size-valid.html29
6 files changed, 169 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-rhythm/parsing/block-step-insert-computed.html b/testing/web-platform/tests/css/css-rhythm/parsing/block-step-insert-computed.html
new file mode 100644
index 0000000000..cedbe3b9ec
--- /dev/null
+++ b/testing/web-platform/tests/css/css-rhythm/parsing/block-step-insert-computed.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS Rhythm: block-step-insert computed values</title>
+<link rel="author" title="Sammy Gill" href="sammy.gill@apple.com">
+<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-insert">
+<meta name="assert" content="Checking computed values for block-step-insert">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+<style>
+ #target {
+ font-size: 40px;
+ }
+</style>
+</head>
+<body>
+<div id="target"></div>
+<script>
+ test_computed_value("block-step-insert", "margin");
+ test_computed_value("block-step-insert", "padding");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-rhythm/parsing/block-step-insert-invalid.html b/testing/web-platform/tests/css/css-rhythm/parsing/block-step-insert-invalid.html
new file mode 100644
index 0000000000..a186b49e5d
--- /dev/null
+++ b/testing/web-platform/tests/css/css-rhythm/parsing/block-step-insert-invalid.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS Rhythm: block-step-insert invalid values</title>
+<link rel="author" title="Sammy Gill" href="sammy.gill@apple.com">
+<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-insert">
+<meta name="assert" content="Invalid values for block-step-insert should not be parsed">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+<style>
+ #target {
+ font-size: 40px;
+ }
+</style>
+</head>
+<body>
+<div id="target"></div>
+<script>
+ test_invalid_value("block-step-insert", "auto");
+ test_invalid_value("block-step-insert", "-1px");
+ test_invalid_value("block-step-insert", "min-content");
+ test_invalid_value("block-step-insert", "10%");
+ test_invalid_value("block-step-insert", "20");
+ test_invalid_value("block-step-insert", "none");
+ test_invalid_value("block-step-insert", "border-box");
+ test_invalid_value('block-step-insert', "margin-box");
+ test_invalid_value("block-step-insert", "margin padding");
+ test_invalid_value("block-step-insert", "padding margin");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-rhythm/parsing/block-step-insert-valid.html b/testing/web-platform/tests/css/css-rhythm/parsing/block-step-insert-valid.html
new file mode 100644
index 0000000000..f7b0b5a9e0
--- /dev/null
+++ b/testing/web-platform/tests/css/css-rhythm/parsing/block-step-insert-valid.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS Rhythm: block-step-insert valid values</title>
+<link rel="author" title="Sammy Gill" href="sammy.gill@apple.com">
+<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-insert">
+<meta name="assert" content="Parsing valid values for block-step-insert property">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+<style>
+ #target {
+ font-size: 40px;
+ }
+</style>
+</head>
+<body>
+<div id="target"></div>
+<script>
+ test_valid_value("block-step-insert", "margin");
+ test_valid_value("block-step-insert", "padding");
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/testing/web-platform/tests/css/css-rhythm/parsing/block-step-size-computed.html b/testing/web-platform/tests/css/css-rhythm/parsing/block-step-size-computed.html
new file mode 100644
index 0000000000..e90b608215
--- /dev/null
+++ b/testing/web-platform/tests/css/css-rhythm/parsing/block-step-size-computed.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS Rhythm: block-step-size computed values</title>
+<link rel="author" title="Sammy Gill" href="sammy.gill@apple.com">
+<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
+<meta name="assert" content="Checking computed values for block-step-size">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+<style>
+ #target {
+ font-size: 40px;
+ }
+</style>
+</head>
+<body>
+<div id="target"></div>
+<script>
+ test_computed_value("block-step-size", "0px");
+ test_computed_value("block-step-size", "none");
+ test_computed_value("block-step-size", "100px");
+ test_computed_value("block-step-size", "2em", "80px");
+ test_computed_value("block-step-size", "calc(10px + 0.5em)", "30px");
+ test_computed_value("block-step-size", "calc(10px - 0.5em)", "0px");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-rhythm/parsing/block-step-size-invalid.html b/testing/web-platform/tests/css/css-rhythm/parsing/block-step-size-invalid.html
new file mode 100644
index 0000000000..0787941aec
--- /dev/null
+++ b/testing/web-platform/tests/css/css-rhythm/parsing/block-step-size-invalid.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS Rhythm: block-step-size invalid values</title>
+<link rel="author" title="Sammy Gill" href="sammy.gill@apple.com">
+<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
+<meta name="assert" content="Invalid values for block-step-size should not be parsed">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+<style>
+ #target {
+ font-size: 40px;
+ }
+</style>
+</head>
+<body>
+<div id="target"></div>
+<script>
+ test_invalid_value("block-step-size", "auto");
+ test_invalid_value("block-step-size", "-1px");
+ test_invalid_value("block-step-size", "min-content");
+ test_invalid_value("block-step-size", "10%");
+ test_invalid_value("block-step-size", "20");
+</script>
+</body>
+</html>
diff --git a/testing/web-platform/tests/css/css-rhythm/parsing/block-step-size-valid.html b/testing/web-platform/tests/css/css-rhythm/parsing/block-step-size-valid.html
new file mode 100644
index 0000000000..391ee28667
--- /dev/null
+++ b/testing/web-platform/tests/css/css-rhythm/parsing/block-step-size-valid.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>CSS Rhythm: block-step-size valid values</title>
+<link rel="author" title="Sammy Gill" href="sammy.gill@apple.com">
+<link rel="help" href="https://drafts.csswg.org/css-rhythm/#block-step-size">
+<meta name="assert" content="Parsing valid values for block-step-size properties">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+<style>
+ #target {
+ font-size: 40px;
+ }
+</style>
+</head>
+<body>
+<div id="target"></div>
+<script>
+ test_valid_value("block-step-size", "1px");
+ test_valid_value("block-step-size", "2em");
+ test_valid_value("block-step-size", "0", "0px");
+ test_valid_value("block-step-size", "none");
+ test_valid_value("block-step-size", "calc(2em + 3ex)");
+ test_valid_value("block-step-size", "1.2em");
+</script>
+</body>
+</html>