From ceb1c37ba3141ef227dcf6e7f3fb426427a87eec Mon Sep 17 00:00:00 2001 From: Callum Law Date: Wed, 9 Jul 2025 19:34:47 +1200 Subject: [PATCH] LibWeb: Import CSS logical border property parsing WPT tests --- .../parsing/border-block-color-computed.txt | 14 ++++ .../parsing/border-block-style-computed.txt | 18 +++++ .../parsing/border-block-valid.txt | 12 +++ .../parsing/border-block-width-computed.txt | 17 +++++ .../parsing/border-inline-color-computed.txt | 14 ++++ .../parsing/border-inline-style-computed.txt | 18 +++++ .../parsing/border-inline-valid.txt | 12 +++ .../parsing/border-inline-width-computed.txt | 17 +++++ .../parsing/border-block-color-computed.html | 31 ++++++++ .../parsing/border-block-style-computed.html | 30 ++++++++ .../parsing/border-block-valid.html | 25 ++++++ .../parsing/border-block-width-computed.html | 76 +++++++++++++++++++ .../parsing/border-inline-color-computed.html | 31 ++++++++ .../parsing/border-inline-style-computed.html | 30 ++++++++ .../parsing/border-inline-valid.html | 25 ++++++ .../parsing/border-inline-width-computed.html | 76 +++++++++++++++++++ 16 files changed, 446 insertions(+) create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-block-color-computed.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-block-style-computed.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-block-valid.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-block-width-computed.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-inline-color-computed.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-inline-style-computed.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-inline-valid.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-inline-width-computed.txt create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-block-color-computed.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-block-style-computed.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-block-valid.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-block-width-computed.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-inline-color-computed.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-inline-style-computed.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-inline-valid.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-inline-width-computed.html diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-block-color-computed.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-block-color-computed.txt new file mode 100644 index 00000000000..52f61aedb57 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-block-color-computed.txt @@ -0,0 +1,14 @@ +Harness status: OK + +Found 8 tests + +6 Pass +2 Fail +Pass Property border-block-start-color value 'currentcolor' +Pass Property border-block-start-color value 'rgb(2, 3, 4)' +Pass Property border-block-end-color value 'rgb(34, 51, 68)' +Pass Property border-block-end-color value 'transparent' +Fail Property border-block-color value 'rgb(34, 51, 68)' +Pass Property border-block-color value 'transparent rgb(2, 3, 4)' +Fail Property border-block-color value 'rgb(2, 3, 4) rgb(2, 3, 4)' +Pass Property border-block-color value 'currentcolor lime' \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-block-style-computed.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-block-style-computed.txt new file mode 100644 index 00000000000..550c6501902 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-block-style-computed.txt @@ -0,0 +1,18 @@ +Harness status: OK + +Found 13 tests + +13 Pass +Pass Property border-block-start-style value 'dotted' +Pass Property border-block-start-style value 'groove' +Pass Property border-block-start-style value 'inset' +Pass Property border-block-start-style value 'none' +Pass Property border-block-start-style value 'solid' +Pass Property border-block-end-style value 'dashed' +Pass Property border-block-end-style value 'double' +Pass Property border-block-end-style value 'hidden' +Pass Property border-block-end-style value 'outset' +Pass Property border-block-end-style value 'ridge' +Pass Property border-block-style value 'dotted' +Pass Property border-block-style value 'double groove' +Pass Property border-block-style value 'hidden hidden' \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-block-valid.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-block-valid.txt new file mode 100644 index 00000000000..d93ca08ee50 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-block-valid.txt @@ -0,0 +1,12 @@ +Harness status: OK + +Found 6 tests + +4 Pass +2 Fail +Fail e.style['border-block'] = "1px dotted red" should set the property value +Fail e.style['border-block'] = "double" should set the property value +Pass e.style['border-block-start'] = "green double thin" should set the property value +Pass e.style['border-block-start'] = "green" should set the property value +Pass e.style['border-block-end'] = "thin" should set the property value +Pass e.style['border-block-end'] = "calc(10px - 0.5em) dotted red" should set the property value \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-block-width-computed.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-block-width-computed.txt new file mode 100644 index 00000000000..3bcd165bea0 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-block-width-computed.txt @@ -0,0 +1,17 @@ +Harness status: OK + +Found 11 tests + +6 Pass +5 Fail +Pass Property border-block-start-width value 'calc(10px + 0.5em)' +Pass Property border-block-start-width value 'calc(10px - 0.5em)' +Pass Property border-block-start-width value 'thin' +Pass Property border-block-start-width value 'medium' +Fail Property border-block-end-width value 'calc(10px + 0.5em)' +Pass Property border-block-end-width value 'calc(10px - 0.5em)' +Fail Property border-block-end-width value 'thick' +Fail Property border-block-width value '10px' +Fail Property border-block-width value '10px 20px' +Fail Property border-block-width value '10px 10px' +Pass width is zero if the border block style is none or hidden \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-inline-color-computed.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-inline-color-computed.txt new file mode 100644 index 00000000000..0e2e0a836da --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-inline-color-computed.txt @@ -0,0 +1,14 @@ +Harness status: OK + +Found 8 tests + +6 Pass +2 Fail +Pass Property border-inline-start-color value 'currentcolor' +Pass Property border-inline-start-color value 'rgb(2, 3, 4)' +Pass Property border-inline-end-color value 'rgb(34, 51, 68)' +Pass Property border-inline-end-color value 'transparent' +Fail Property border-inline-color value 'rgb(34, 51, 68)' +Pass Property border-inline-color value 'transparent rgb(2, 3, 4)' +Fail Property border-inline-color value 'rgb(2, 3, 4) rgb(2, 3, 4)' +Pass Property border-inline-color value 'currentcolor lime' \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-inline-style-computed.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-inline-style-computed.txt new file mode 100644 index 00000000000..5ec93c84c1a --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-inline-style-computed.txt @@ -0,0 +1,18 @@ +Harness status: OK + +Found 13 tests + +13 Pass +Pass Property border-inline-start-style value 'dotted' +Pass Property border-inline-start-style value 'groove' +Pass Property border-inline-start-style value 'inset' +Pass Property border-inline-start-style value 'none' +Pass Property border-inline-start-style value 'solid' +Pass Property border-inline-end-style value 'dashed' +Pass Property border-inline-end-style value 'double' +Pass Property border-inline-end-style value 'hidden' +Pass Property border-inline-end-style value 'outset' +Pass Property border-inline-end-style value 'ridge' +Pass Property border-inline-style value 'dotted' +Pass Property border-inline-style value 'double groove' +Pass Property border-inline-style value 'hidden hidden' \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-inline-valid.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-inline-valid.txt new file mode 100644 index 00000000000..cd2af1d9a2c --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-inline-valid.txt @@ -0,0 +1,12 @@ +Harness status: OK + +Found 6 tests + +4 Pass +2 Fail +Fail e.style['border-inline'] = "1px dotted red" should set the property value +Fail e.style['border-inline'] = "double" should set the property value +Pass e.style['border-inline-start'] = "green double thin" should set the property value +Pass e.style['border-inline-start'] = "green" should set the property value +Pass e.style['border-inline-end'] = "thin" should set the property value +Pass e.style['border-inline-end'] = "calc(10px - 0.5em) dotted red" should set the property value \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-inline-width-computed.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-inline-width-computed.txt new file mode 100644 index 00000000000..1a605c02367 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-logical/parsing/border-inline-width-computed.txt @@ -0,0 +1,17 @@ +Harness status: OK + +Found 11 tests + +6 Pass +5 Fail +Pass Property border-inline-start-width value 'calc(10px + 0.5em)' +Pass Property border-inline-start-width value 'calc(10px - 0.5em)' +Pass Property border-inline-start-width value 'thin' +Pass Property border-inline-start-width value 'medium' +Fail Property border-inline-end-width value 'calc(10px + 0.5em)' +Pass Property border-inline-end-width value 'calc(10px - 0.5em)' +Fail Property border-inline-end-width value 'thick' +Fail Property border-inline-width value '10px' +Fail Property border-inline-width value '10px 20px' +Fail Property border-inline-width value '10px 10px' +Pass width is zero if the border block style is none or hidden \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-block-color-computed.html b/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-block-color-computed.html new file mode 100644 index 00000000000..96b38cb4f7e --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-block-color-computed.html @@ -0,0 +1,31 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().borderBlockColor + + + + + + + +
+
+ + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-block-style-computed.html b/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-block-style-computed.html new file mode 100644 index 00000000000..681fdcde6f9 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-block-style-computed.html @@ -0,0 +1,30 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().borderBlockStyle + + + + + + + +
+ + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-block-valid.html b/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-block-valid.html new file mode 100644 index 00000000000..13acf88f112 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-block-valid.html @@ -0,0 +1,25 @@ + + + + +CSS Logical Properties and Values: parsing border-block with valid values + + + + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-block-width-computed.html b/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-block-width-computed.html new file mode 100644 index 00000000000..fd9cd79fc43 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-block-width-computed.html @@ -0,0 +1,76 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().borderBlockWidth + + + + + + + +
+
+ + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-inline-color-computed.html b/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-inline-color-computed.html new file mode 100644 index 00000000000..26ab5730d23 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-inline-color-computed.html @@ -0,0 +1,31 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().borderInlineColor + + + + + + + +
+
+ + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-inline-style-computed.html b/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-inline-style-computed.html new file mode 100644 index 00000000000..59a1258b15d --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-inline-style-computed.html @@ -0,0 +1,30 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().borderInlineStyle + + + + + + + +
+ + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-inline-valid.html b/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-inline-valid.html new file mode 100644 index 00000000000..af13b5612cd --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-inline-valid.html @@ -0,0 +1,25 @@ + + + + +CSS Logical Properties and Values: parsing border-inline with valid values + + + + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-inline-width-computed.html b/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-inline-width-computed.html new file mode 100644 index 00000000000..5d2d393848f --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-logical/parsing/border-inline-width-computed.html @@ -0,0 +1,76 @@ + + + + +CSS Logical Properties and Values: getComputedStyle().borderInlineWidth + + + + + + + +
+
+ + + +