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/css-toggle/parsing | |
parent | Initial commit. (diff) | |
download | firefox-upstream.tar.xz firefox-upstream.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-toggle/parsing')
16 files changed, 464 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-toggle/parsing/support/toggle-root-values.js b/testing/web-platform/tests/css/css-toggle/parsing/support/toggle-root-values.js new file mode 100644 index 0000000000..de2061107a --- /dev/null +++ b/testing/web-platform/tests/css/css-toggle/parsing/support/toggle-root-values.js @@ -0,0 +1,107 @@ + +function test_toggle_root_computed_values(property) { + test_computed_value(property, 'none'); + test_computed_value(property, 'sticky sticky'); + test_computed_value(property, 'group group'); + test_computed_value(property, 'self self'); + test_computed_value(property, 'mytoggle'); + test_computed_value(property, 'mytoggle, yourtoggle'); + test_computed_value(property, 'mytoggle, mytoggle'); + test_computed_value(property, 'mytoggle 3 at 0 sticky self, yourtoggle 1 group self', 'mytoggle 3 sticky self, yourtoggle group self'); + test_computed_value(property, 'mytoggle 3 at 1 sticky self, yourtoggle 2 group self'); + test_computed_value(property, 'mytoggle 1 at 0', 'mytoggle'); + test_computed_value(property, 'mytoggle 1 at +0', 'mytoggle'); + test_computed_value(property, 'mytoggle +1 at 0', 'mytoggle'); + test_computed_value(property, 'mytoggle 1 at -0', 'mytoggle'); + test_computed_value(property, 'mytoggle +1 at 2', 'mytoggle 1 at 2'); + test_computed_value(property, 'mytoggle 1 at calc(-3)', 'mytoggle'); + test_computed_value(property, 'mytoggle calc(-3) at 0', 'mytoggle'); + test_computed_value(property, 'mytoggle 7 at calc(-3)', 'mytoggle 7'); + test_computed_value(property, 'mytoggle calc(-3) at 7', 'mytoggle 1 at 7'); + test_computed_value(property, 'mytoggle calc(9) at calc(6)', 'mytoggle 9 at 6'); + test_computed_value(property, 'mytoggle calc(9.6) at calc(6.4)', 'mytoggle 10 at 6'); + test_computed_value(property, 'mytoggle calc(-9.5) at calc(6.5)', 'mytoggle 1 at 7'); + test_computed_value(property, 'mytoggle group sticky self, yourtoggle self sticky', 'mytoggle sticky group self, yourtoggle sticky self'); + test_computed_value(property, 'mytoggle group 2 at 1', 'mytoggle 2 at 1 group'); + test_computed_value(property, 'mytoggle [one two]'); + test_computed_value(property, 'mytoggle [one two three]'); + test_computed_value(property, 'mytoggle [one two three] at 0', 'mytoggle [one two three]'); + test_computed_value(property, 'mytoggle [ one two three ] at 0', 'mytoggle [one two three]'); + test_computed_value(property, 'mytoggle[one two three]at 0', 'mytoggle [one two three]'); + test_computed_value(property, 'mytoggle [one two three] at 1'); + test_computed_value(property, 'mytoggle [ one two three ] at 1', 'mytoggle [one two three] at 1'); + test_computed_value(property, 'mytoggle[one two three]at 1', 'mytoggle [one two three] at 1'); + test_computed_value(property, 'mytoggle [ one two three ] at two', 'mytoggle [one two three] at two'); + test_computed_value(property, 'mytoggle 3 at two'); +} + +function test_toggle_root_valid_values(property) { + test_valid_value(property, 'none'); + test_valid_value(property, 'sticky sticky'); + test_valid_value(property, 'group group'); + test_valid_value(property, 'self self'); + test_valid_value(property, 'mytoggle'); + test_valid_value(property, 'mytoggle, yourtoggle'); + test_valid_value(property, 'mytoggle, mytoggle'); + test_valid_value(property, 'mytoggle 3 at 0 sticky self, yourtoggle 1 group self'); + test_valid_value(property, 'mytoggle 1 at 0'); + test_valid_value(property, 'mytoggle 1 at +0', 'mytoggle 1 at 0'); + test_valid_value(property, 'mytoggle +1 at 0', 'mytoggle 1 at 0'); + test_valid_value(property, 'mytoggle 1 at -0', 'mytoggle 1 at 0'); + test_valid_value(property, 'mytoggle 1 at calc(-3)'); + test_valid_value(property, 'mytoggle calc(-3) at 0'); + test_valid_value(property, 'mytoggle 7 at calc(-3)'); + test_valid_value(property, 'mytoggle calc(-3) at 7'); + test_valid_value(property, 'mytoggle calc(9) at calc(6)'); + test_valid_value(property, 'mytoggle calc(9.6) at calc(6.4)'); + test_valid_value(property, 'mytoggle calc(-9.5) at calc(6.5)'); + test_valid_value(property, 'mytoggle group sticky self, yourtoggle self sticky', 'mytoggle sticky group self, yourtoggle sticky self'); + test_valid_value(property, 'mytoggle group 2 at 1', 'mytoggle 2 at 1 group'); + test_valid_value(property, 'mytoggle [one two]'); + test_valid_value(property, 'mytoggle [one two three]'); + test_valid_value(property, 'mytoggle [one two three] at 0'); + test_valid_value(property, 'mytoggle [ one two three ] at 0', 'mytoggle [one two three] at 0'); + test_valid_value(property, 'mytoggle[one two three]at 0', 'mytoggle [one two three] at 0'); + test_valid_value(property, 'mytoggle [ one two three ] at two', 'mytoggle [one two three] at two'); + test_valid_value(property, 'mytoggle 3 at two'); +} + +function test_toggle_root_invalid_values(property) { + test_invalid_value(property, 'none 1'); + test_invalid_value(property, 'none sticky'); + test_invalid_value(property, 'none cycle'); + test_invalid_value(property, 'none cycle-on'); + test_invalid_value(property, 'none group'); + test_invalid_value(property, 'none self'); + test_invalid_value(property, 'None self'); + test_invalid_value(property, 'NONE self'); + test_invalid_value(property, 'mytoggle sticky sticky'); + test_invalid_value(property, 'mytoggle group group'); + test_invalid_value(property, 'mytoggle self self'); + test_invalid_value(property, 'none sticky sticky'); + test_invalid_value(property, 'none group group'); + test_invalid_value(property, 'none self self'); + test_invalid_value(property, 'none, mytoggle'); + test_invalid_value(property, 'mytoggle, none'); + test_invalid_value(property, 'mytoggle 1 at'); + test_invalid_value(property, 'mytoggle []'); + test_invalid_value(property, 'mytoggle [one]'); + test_invalid_value(property, 'mytoggle [one two] at'); + test_invalid_value(property, 'mytoggle [one two two three]'); + test_invalid_value(property, 'mytoggle [one two one three]'); + test_invalid_value(property, 'mytoggle 0 sticky self'); + test_invalid_value(property, 'mytoggle 0 at 0 sticky self'); + test_invalid_value(property, 'mytoggle -1 at 1 sticky self'); + test_invalid_value(property, 'mytoggle 1 at -1 sticky self'); + test_invalid_value(property, 'mytoggle -1 at -1 sticky self'); + test_invalid_value(property, 'mytoggle -1 at 0'); + test_invalid_value(property, 'mytoggle 0 at 0'); + test_invalid_value(property, 'mytoggle -0 at 0'); + test_invalid_value(property, 'mytoggle +0 at 0'); + test_invalid_value(property, 'mytoggle sticky 3 at 1 group self sticky'); + test_invalid_value(property, 'mytoggle sticky 3 at 1 group self group'); + test_invalid_value(property, 'mytoggle sticky 3 at 1 group self self'); + test_invalid_value(property, 'mytoggle sticky 3 at 1 group self 1'); + test_invalid_value(property, 'mytoggle sticky group at 1'); + test_invalid_value(property, 'mytoggle sticky group at 1 1'); +} diff --git a/testing/web-platform/tests/css/css-toggle/parsing/toggle-computed.tentative.html b/testing/web-platform/tests/css/css-toggle/parsing/toggle-computed.tentative.html new file mode 100644 index 0000000000..36445d312a --- /dev/null +++ b/testing/web-platform/tests/css/css-toggle/parsing/toggle-computed.tentative.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<meta charset="UTF-8"> +<title>CSS Toggles: getComputedStyle() for toggle property</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://tabatkins.github.io/css-toggle/#toggle-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/computed-testcommon.js"></script> +<script src="support/toggle-root-values.js"></script> + +<body> +<div id="target"></div> +<script> + +test_toggle_root_computed_values('toggle'); + +</script> diff --git a/testing/web-platform/tests/css/css-toggle/parsing/toggle-group-computed.tentative.html b/testing/web-platform/tests/css/css-toggle/parsing/toggle-group-computed.tentative.html new file mode 100644 index 0000000000..39548ecaa8 --- /dev/null +++ b/testing/web-platform/tests/css/css-toggle/parsing/toggle-group-computed.tentative.html @@ -0,0 +1,24 @@ +<!DOCTYPE HTML> +<meta charset="UTF-8"> +<title>CSS Toggles: getComputedStyle() for toggle-group property</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://tabatkins.github.io/css-toggle/#toggle-group-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/computed-testcommon.js"></script> + +<body> +<div id="target"></div> +<script> + +test_computed_value('toggle-group', 'none'); +test_computed_value('toggle-group', 'self self'); +test_computed_value('toggle-group', 'mytoggle'); +test_computed_value('toggle-group', 'mytoggle, yourtoggle'); +test_computed_value('toggle-group', 'mytoggle, mytoggle'); +test_computed_value('toggle-group', 'mytoggle self, yourtoggle'); +test_computed_value('toggle-group', 'mytoggle self , yourtoggle self', 'mytoggle self, yourtoggle self'); +test_computed_value('toggle-group', 'mytoggle,yourtoggle self', 'mytoggle, yourtoggle self'); + +</script> diff --git a/testing/web-platform/tests/css/css-toggle/parsing/toggle-group-invalid.tentative.html b/testing/web-platform/tests/css/css-toggle/parsing/toggle-group-invalid.tentative.html new file mode 100644 index 0000000000..faff3483f1 --- /dev/null +++ b/testing/web-platform/tests/css/css-toggle/parsing/toggle-group-invalid.tentative.html @@ -0,0 +1,26 @@ +<!DOCTYPE HTML> +<meta charset="UTF-8"> +<title>CSS Toggles: parsing toggle-group with invalid values</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://tabatkins.github.io/css-toggle/#toggle-group-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> + +<body> +<script> + +test_invalid_value('toggle-group', 'none, none'); +test_invalid_value('toggle-group', 'none self'); +test_invalid_value('toggle-group', 'None self'); +test_invalid_value('toggle-group', 'NONE self'); +test_invalid_value('toggle-group', 'mytoggle self self'); +test_invalid_value('toggle-group', 'none, mytoggle'); +test_invalid_value('toggle-group', 'mytoggle, none'); +test_invalid_value('toggle-group', 'mytoggle 1 self'); +test_invalid_value('toggle-group', 'mytoggle self 1'); +test_invalid_value('toggle-group', 'mytoggle sticky self'); +test_invalid_value('toggle-group', 'mytoggle self sticky'); + +</script> diff --git a/testing/web-platform/tests/css/css-toggle/parsing/toggle-group-valid.tentative.html b/testing/web-platform/tests/css/css-toggle/parsing/toggle-group-valid.tentative.html new file mode 100644 index 0000000000..53587d3b09 --- /dev/null +++ b/testing/web-platform/tests/css/css-toggle/parsing/toggle-group-valid.tentative.html @@ -0,0 +1,23 @@ +<!DOCTYPE HTML> +<meta charset="UTF-8"> +<title>CSS Toggles: parsing toggle-group with valid values</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://tabatkins.github.io/css-toggle/#toggle-group-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> + +<body> +<script> + +test_valid_value('toggle-group', 'none'); +test_valid_value('toggle-group', 'self self'); +test_valid_value('toggle-group', 'mytoggle'); +test_valid_value('toggle-group', 'mytoggle, yourtoggle'); +test_valid_value('toggle-group', 'mytoggle, mytoggle'); +test_valid_value('toggle-group', 'mytoggle self, yourtoggle'); +test_valid_value('toggle-group', 'mytoggle self , yourtoggle self', 'mytoggle self, yourtoggle self'); +test_valid_value('toggle-group', 'mytoggle,yourtoggle self', 'mytoggle, yourtoggle self'); + +</script> diff --git a/testing/web-platform/tests/css/css-toggle/parsing/toggle-invalid.tentative.html b/testing/web-platform/tests/css/css-toggle/parsing/toggle-invalid.tentative.html new file mode 100644 index 0000000000..8f460ff144 --- /dev/null +++ b/testing/web-platform/tests/css/css-toggle/parsing/toggle-invalid.tentative.html @@ -0,0 +1,17 @@ +<!DOCTYPE HTML> +<meta charset="UTF-8"> +<title>CSS Toggles: parsing toggle with invalid values</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://tabatkins.github.io/css-toggle/#toggle-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +<script src="support/toggle-root-values.js"></script> + +<body> +<script> + +test_toggle_root_invalid_values('toggle'); + +</script> diff --git a/testing/web-platform/tests/css/css-toggle/parsing/toggle-root-computed.tentative.html b/testing/web-platform/tests/css/css-toggle/parsing/toggle-root-computed.tentative.html new file mode 100644 index 0000000000..fa7fd7ad51 --- /dev/null +++ b/testing/web-platform/tests/css/css-toggle/parsing/toggle-root-computed.tentative.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<meta charset="UTF-8"> +<title>CSS Toggles: getComputedStyle() for toggle-root property</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://tabatkins.github.io/css-toggle/#toggle-root-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/computed-testcommon.js"></script> +<script src="support/toggle-root-values.js"></script> + +<body> +<div id="target"></div> +<script> + +test_toggle_root_computed_values('toggle-root'); + +</script> diff --git a/testing/web-platform/tests/css/css-toggle/parsing/toggle-root-invalid.tentative.html b/testing/web-platform/tests/css/css-toggle/parsing/toggle-root-invalid.tentative.html new file mode 100644 index 0000000000..76e208a3e5 --- /dev/null +++ b/testing/web-platform/tests/css/css-toggle/parsing/toggle-root-invalid.tentative.html @@ -0,0 +1,17 @@ +<!DOCTYPE HTML> +<meta charset="UTF-8"> +<title>CSS Toggles: parsing toggle-root with invalid values</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://tabatkins.github.io/css-toggle/#toggle-root-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +<script src="support/toggle-root-values.js"></script> + +<body> +<script> + +test_toggle_root_invalid_values('toggle-root'); + +</script> diff --git a/testing/web-platform/tests/css/css-toggle/parsing/toggle-root-valid.tentative.html b/testing/web-platform/tests/css/css-toggle/parsing/toggle-root-valid.tentative.html new file mode 100644 index 0000000000..8f943f1cb9 --- /dev/null +++ b/testing/web-platform/tests/css/css-toggle/parsing/toggle-root-valid.tentative.html @@ -0,0 +1,17 @@ +<!DOCTYPE HTML> +<meta charset="UTF-8"> +<title>CSS Toggles: parsing toggle-root with valid values</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://tabatkins.github.io/css-toggle/#toggle-root-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +<script src="support/toggle-root-values.js"></script> + +<body> +<script> + +test_toggle_root_valid_values('toggle-root'); + +</script> diff --git a/testing/web-platform/tests/css/css-toggle/parsing/toggle-trigger-computed.tentative.html b/testing/web-platform/tests/css/css-toggle/parsing/toggle-trigger-computed.tentative.html new file mode 100644 index 0000000000..4dab2b6045 --- /dev/null +++ b/testing/web-platform/tests/css/css-toggle/parsing/toggle-trigger-computed.tentative.html @@ -0,0 +1,46 @@ +<!DOCTYPE HTML> +<meta charset="UTF-8"> +<title>CSS Toggles: getComputedStyle() for toggle-trigger property</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://tabatkins.github.io/css-toggle/#toggle-trigger-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/computed-testcommon.js"></script> + +<body> +<div id="target"></div> +<script> + +test_computed_value('toggle-trigger', 'none'); +test_computed_value('toggle-trigger', 'self set 1'); +test_computed_value('toggle-trigger', 'sticky set 1'); +test_computed_value('toggle-trigger', 'group set 1'); +test_computed_value('toggle-trigger', 'mytoggle'); +test_computed_value('toggle-trigger', 'mytoggle set 0'); +test_computed_value('toggle-trigger', 'mytoggle set +0', 'mytoggle set 0'); +test_computed_value('toggle-trigger', 'mytoggle set -0', 'mytoggle set 0'); +test_computed_value('toggle-trigger', 'mytoggle set +5', 'mytoggle set 5'); +test_computed_value('toggle-trigger', 'mytoggle, yourtoggle'); +test_computed_value('toggle-trigger', 'mytoggle, mytoggle'); +test_computed_value('toggle-trigger', 'mytoggle set 1, yourtoggle'); +test_computed_value('toggle-trigger', 'mytoggle set 1 , yourtoggle set 1', 'mytoggle set 1, yourtoggle set 1'); +test_computed_value('toggle-trigger', 'mytoggle,yourtoggle set 1', 'mytoggle, yourtoggle set 1'); +test_computed_value('toggle-trigger', 'mytoggle set calc(-3)', 'mytoggle set 0'); +test_computed_value('toggle-trigger', 'mytoggle set calc(6)', 'mytoggle set 6'); +test_computed_value('toggle-trigger', 'mytoggle set calc(6.4)', 'mytoggle set 6'); +test_computed_value('toggle-trigger', 'mytoggle set calc(6.5)', 'mytoggle set 7'); +test_computed_value('toggle-trigger', 'mytoggle set calc(6.6)', 'mytoggle set 7'); +test_computed_value('toggle-trigger', 'mytoggle set two'); +test_computed_value('toggle-trigger', 'mytoggle next 1', 'mytoggle'); +test_computed_value('toggle-trigger', 'mytoggle next 2'); +test_computed_value('toggle-trigger', 'mytoggle prev 1', 'mytoggle prev'); +test_computed_value('toggle-trigger', 'mytoggle prev 2'); +test_computed_value('toggle-trigger', 'mytoggle next calc(-3)', 'mytoggle'); +test_computed_value('toggle-trigger', 'mytoggle prev calc(-3)', 'mytoggle prev'); +test_computed_value('toggle-trigger', 'mytoggle next calc(6.4)', 'mytoggle next 6'); +test_computed_value('toggle-trigger', 'mytoggle next calc(6.5)', 'mytoggle next 7'); +test_computed_value('toggle-trigger', 'mytoggle prev calc(6.4)', 'mytoggle prev 6'); +test_computed_value('toggle-trigger', 'mytoggle prev calc(6.5)', 'mytoggle prev 7'); + +</script> diff --git a/testing/web-platform/tests/css/css-toggle/parsing/toggle-trigger-invalid.tentative.html b/testing/web-platform/tests/css/css-toggle/parsing/toggle-trigger-invalid.tentative.html new file mode 100644 index 0000000000..584c4986f7 --- /dev/null +++ b/testing/web-platform/tests/css/css-toggle/parsing/toggle-trigger-invalid.tentative.html @@ -0,0 +1,31 @@ +<!DOCTYPE HTML> +<meta charset="UTF-8"> +<title>CSS Toggles: parsing toggle-trigger with invalid values</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://tabatkins.github.io/css-toggle/#toggle-trigger-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> + +<body> +<script> + +test_invalid_value('toggle-trigger', 'none, none'); +test_invalid_value('toggle-trigger', 'none set 1'); +test_invalid_value('toggle-trigger', 'None set 1'); +test_invalid_value('toggle-trigger', 'NONE set 1'); +test_invalid_value('toggle-trigger', 'mytoggle set 1 1'); +test_invalid_value('toggle-trigger', 'mytoggle set -1'); +test_invalid_value('toggle-trigger', 'none, mytoggle'); +test_invalid_value('toggle-trigger', 'mytoggle, none'); +test_invalid_value('toggle-trigger', 'mytoggle self 1'); +test_invalid_value('toggle-trigger', 'mytoggle 1 self'); +test_invalid_value('toggle-trigger', 'mytoggle sticky 1'); +test_invalid_value('toggle-trigger', 'mytoggle 1 sticky'); +test_invalid_value('toggle-trigger', 'mytoggle self set 1'); +test_invalid_value('toggle-trigger', 'mytoggle set 1 self'); +test_invalid_value('toggle-trigger', 'mytoggle sticky set 1'); +test_invalid_value('toggle-trigger', 'mytoggle set 1 sticky'); + +</script> diff --git a/testing/web-platform/tests/css/css-toggle/parsing/toggle-trigger-valid.tentative.html b/testing/web-platform/tests/css/css-toggle/parsing/toggle-trigger-valid.tentative.html new file mode 100644 index 0000000000..1b4a896f20 --- /dev/null +++ b/testing/web-platform/tests/css/css-toggle/parsing/toggle-trigger-valid.tentative.html @@ -0,0 +1,45 @@ +<!DOCTYPE HTML> +<meta charset="UTF-8"> +<title>CSS Toggles: parsing toggle-trigger with valid values</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://tabatkins.github.io/css-toggle/#toggle-trigger-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> + +<body> +<script> + +test_valid_value('toggle-trigger', 'none'); +test_valid_value('toggle-trigger', 'self set 1'); +test_valid_value('toggle-trigger', 'sticky set 1'); +test_valid_value('toggle-trigger', 'group set 1'); +test_valid_value('toggle-trigger', 'mytoggle'); +test_valid_value('toggle-trigger', 'mytoggle set 0'); +test_valid_value('toggle-trigger', 'mytoggle set +0', 'mytoggle set 0'); +test_valid_value('toggle-trigger', 'mytoggle set -0', 'mytoggle set 0'); +test_valid_value('toggle-trigger', 'mytoggle set +5', 'mytoggle set 5'); +test_valid_value('toggle-trigger', 'mytoggle, yourtoggle'); +test_valid_value('toggle-trigger', 'mytoggle, mytoggle'); +test_valid_value('toggle-trigger', 'mytoggle set 1, yourtoggle'); +test_valid_value('toggle-trigger', 'mytoggle set 1 , yourtoggle set 1', 'mytoggle set 1, yourtoggle set 1'); +test_valid_value('toggle-trigger', 'mytoggle,yourtoggle set 1', 'mytoggle, yourtoggle set 1'); +test_valid_value('toggle-trigger', 'mytoggle set calc(-3)'); +test_valid_value('toggle-trigger', 'mytoggle set calc(6)'); +test_valid_value('toggle-trigger', 'mytoggle set calc(6.4)'); +test_valid_value('toggle-trigger', 'mytoggle set calc(6.5)'); +test_valid_value('toggle-trigger', 'mytoggle set calc(6.6)'); +test_valid_value('toggle-trigger', 'mytoggle set two'); +test_valid_value('toggle-trigger', 'mytoggle next 1'); +test_valid_value('toggle-trigger', 'mytoggle next 2'); +test_valid_value('toggle-trigger', 'mytoggle prev 1'); +test_valid_value('toggle-trigger', 'mytoggle prev 2'); +test_valid_value('toggle-trigger', 'mytoggle next calc(-3)'); +test_valid_value('toggle-trigger', 'mytoggle prev calc(-3)'); +test_valid_value('toggle-trigger', 'mytoggle next calc(6.4)'); +test_valid_value('toggle-trigger', 'mytoggle next calc(6.5)'); +test_valid_value('toggle-trigger', 'mytoggle prev calc(6.4)'); +test_valid_value('toggle-trigger', 'mytoggle prev calc(6.5)'); + +</script> diff --git a/testing/web-platform/tests/css/css-toggle/parsing/toggle-valid.tentative.html b/testing/web-platform/tests/css/css-toggle/parsing/toggle-valid.tentative.html new file mode 100644 index 0000000000..a02099c996 --- /dev/null +++ b/testing/web-platform/tests/css/css-toggle/parsing/toggle-valid.tentative.html @@ -0,0 +1,17 @@ +<!DOCTYPE HTML> +<meta charset="UTF-8"> +<title>CSS Toggles: parsing toggle with valid values</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://tabatkins.github.io/css-toggle/#toggle-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> +<script src="support/toggle-root-values.js"></script> + +<body> +<script> + +test_toggle_root_valid_values('toggle'); + +</script> diff --git a/testing/web-platform/tests/css/css-toggle/parsing/toggle-visibility-computed.tentative.html b/testing/web-platform/tests/css/css-toggle/parsing/toggle-visibility-computed.tentative.html new file mode 100644 index 0000000000..89cc80aa70 --- /dev/null +++ b/testing/web-platform/tests/css/css-toggle/parsing/toggle-visibility-computed.tentative.html @@ -0,0 +1,19 @@ +<!DOCTYPE HTML> +<meta charset="UTF-8"> +<title>CSS Toggles: getComputedStyle() for toggle-visibility property</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://tabatkins.github.io/css-toggle/#toggle-visibility-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/computed-testcommon.js"></script> + +<body> +<div id="target"></div> +<script> + +test_computed_value('toggle-visibility', 'normal'); +test_computed_value('toggle-visibility', 'toggle t'); +test_computed_value('toggle-visibility', 'toggle toggle'); + +</script> diff --git a/testing/web-platform/tests/css/css-toggle/parsing/toggle-visibility-invalid.tentative.html b/testing/web-platform/tests/css/css-toggle/parsing/toggle-visibility-invalid.tentative.html new file mode 100644 index 0000000000..c238834901 --- /dev/null +++ b/testing/web-platform/tests/css/css-toggle/parsing/toggle-visibility-invalid.tentative.html @@ -0,0 +1,21 @@ +<!DOCTYPE HTML> +<meta charset="UTF-8"> +<title>CSS Toggles: parsing toggle-visibility with invalid values</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://tabatkins.github.io/css-toggle/#toggle-visibility-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> + +<body> +<script> + +test_invalid_value('toggle-visibility', 'none'); +test_invalid_value('toggle-visibility', 'toggle'); +test_invalid_value('toggle-visibility', 't'); +test_invalid_value('toggle-visibility', 'normal, toggle t'); +test_invalid_value('toggle-visibility', 'toggle t, normal'); +test_invalid_value('toggle-visibility', 'toggle a, toggle t'); + +</script> diff --git a/testing/web-platform/tests/css/css-toggle/parsing/toggle-visibility-valid.tentative.html b/testing/web-platform/tests/css/css-toggle/parsing/toggle-visibility-valid.tentative.html new file mode 100644 index 0000000000..3541a6f137 --- /dev/null +++ b/testing/web-platform/tests/css/css-toggle/parsing/toggle-visibility-valid.tentative.html @@ -0,0 +1,18 @@ +<!DOCTYPE HTML> +<meta charset="UTF-8"> +<title>CSS Toggles: parsing toggle-visibility with valid values</title> +<link rel="author" title="L. David Baron" href="https://dbaron.org/"> +<link rel="author" title="Google" href="http://www.google.com/"> +<link rel="help" href="https://tabatkins.github.io/css-toggle/#toggle-visibility-property"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<script src="/css/support/parsing-testcommon.js"></script> + +<body> +<script> + +test_valid_value('toggle-visibility', 'normal'); +test_valid_value('toggle-visibility', 'toggle t'); +test_valid_value('toggle-visibility', 'toggle toggle'); + +</script> |