From 70cb8d23fb421ecee7da1ec7a8542d7bd36357c8 Mon Sep 17 00:00:00 2001 From: Callum Law Date: Mon, 4 Aug 2025 23:22:34 +1200 Subject: [PATCH] Tests: Import/create tests related to absolutization of StyleValues Done in a separate commit to show progress --- .../css/absolutized-background-size-value.txt | 1 + .../css/absolutized-cursor-style-value.txt | 1 + .../parsing/border-radius-computed.txt | 20 ++++++++++ .../absolutized-background-size-value.html | 13 +++++++ .../css/absolutized-cursor-style-value.html | 13 +++++++ .../parsing/border-radius-computed.html | 39 +++++++++++++++++++ 6 files changed, 87 insertions(+) create mode 100644 Tests/LibWeb/Text/expected/css/absolutized-background-size-value.txt create mode 100644 Tests/LibWeb/Text/expected/css/absolutized-cursor-style-value.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/css-backgrounds/parsing/border-radius-computed.txt create mode 100644 Tests/LibWeb/Text/input/css/absolutized-background-size-value.html create mode 100644 Tests/LibWeb/Text/input/css/absolutized-cursor-style-value.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/css-backgrounds/parsing/border-radius-computed.html diff --git a/Tests/LibWeb/Text/expected/css/absolutized-background-size-value.txt b/Tests/LibWeb/Text/expected/css/absolutized-background-size-value.txt new file mode 100644 index 00000000000..d61d2080de9 --- /dev/null +++ b/Tests/LibWeb/Text/expected/css/absolutized-background-size-value.txt @@ -0,0 +1 @@ +calc(1em - 1px) calc(1em - 1px) diff --git a/Tests/LibWeb/Text/expected/css/absolutized-cursor-style-value.txt b/Tests/LibWeb/Text/expected/css/absolutized-cursor-style-value.txt new file mode 100644 index 00000000000..f22d3263e28 --- /dev/null +++ b/Tests/LibWeb/Text/expected/css/absolutized-cursor-style-value.txt @@ -0,0 +1 @@ +url("foo.png") calc(1 * sign(1em - 1px)) calc(2 * sign(1em - 1px)), pointer diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-backgrounds/parsing/border-radius-computed.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-backgrounds/parsing/border-radius-computed.txt new file mode 100644 index 00000000000..e2dbd0f858e --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-backgrounds/parsing/border-radius-computed.txt @@ -0,0 +1,20 @@ +Harness status: OK + +Found 14 tests + +12 Pass +2 Fail +Pass Property border-radius value '1px' +Pass Property border-radius value '1px 2% 3px 4%' +Pass Property border-radius value '5em / 1px 2% 3px 4%' +Pass Property border-radius value '1px 2% 3px 4% / 5em' +Pass Property border-radius value '1px 1px 1px 2% / 1px 2% 1px 2%' +Pass Property border-radius value '1px 1px 1px 1px / 1px 1px 2% 1px' +Pass Property border-radius value '1px 1px 2% 2%' +Pass Property border-radius value '1px 2% 1px 1px' +Pass Property border-radius value '1px 2% 2% 2% / 1px 2% 3px 2%' +Fail Property border-top-left-radius value 'calc(-0.5em + 10px)' +Pass Property border-top-right-radius value '20%' +Fail Property border-bottom-right-radius value 'calc(0.5em + 10px) 40%' +Pass Property border-bottom-left-radius value '50% 60px' +Pass Property border-top-left-radius value '40px 0px' \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/css/absolutized-background-size-value.html b/Tests/LibWeb/Text/input/css/absolutized-background-size-value.html new file mode 100644 index 00000000000..5f28c4d244c --- /dev/null +++ b/Tests/LibWeb/Text/input/css/absolutized-background-size-value.html @@ -0,0 +1,13 @@ + + +
+ + diff --git a/Tests/LibWeb/Text/input/css/absolutized-cursor-style-value.html b/Tests/LibWeb/Text/input/css/absolutized-cursor-style-value.html new file mode 100644 index 00000000000..35ddf9dbb46 --- /dev/null +++ b/Tests/LibWeb/Text/input/css/absolutized-cursor-style-value.html @@ -0,0 +1,13 @@ + + +
+ + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-backgrounds/parsing/border-radius-computed.html b/Tests/LibWeb/Text/input/wpt-import/css/css-backgrounds/parsing/border-radius-computed.html new file mode 100644 index 00000000000..84dd462dcda --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-backgrounds/parsing/border-radius-computed.html @@ -0,0 +1,39 @@ + + + + +CSS Backgrounds and Borders Module Level 3: getComputedStyle().borderRadius + + + + + + + + +
+ + +