From eed20ad95196ede1b415837caa0b848ee1f48a11 Mon Sep 17 00:00:00 2001 From: sideshowbarker Date: Wed, 6 Nov 2024 19:13:15 +0900 Subject: [PATCH] Tests: Import WPT accname/name/comp_name_from_content.html test --- .../accname/name/comp_name_from_content.txt | 70 +++++ .../accname/name/comp_name_from_content.html | 266 ++++++++++++++++++ 2 files changed, 336 insertions(+) create mode 100644 Tests/LibWeb/Text/expected/wpt-import/accname/name/comp_name_from_content.txt create mode 100644 Tests/LibWeb/Text/input/wpt-import/accname/name/comp_name_from_content.html diff --git a/Tests/LibWeb/Text/expected/wpt-import/accname/name/comp_name_from_content.txt b/Tests/LibWeb/Text/expected/wpt-import/accname/name/comp_name_from_content.txt new file mode 100644 index 00000000000..16655895363 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/accname/name/comp_name_from_content.txt @@ -0,0 +1,70 @@ +Summary + +Harness status: OK + +Rerun + +Found 60 tests + +60 Pass +Details +Result Test Name MessagePass aria button name from content, inline +Pass aria heading name from content, inline +Pass aria link name from content, inline +Pass aria button name from content, block +Pass aria heading name from content, block +Pass aria link name from content, block +Pass button name from content +Pass heading name from content +Pass link name from content +Pass button name from content with ::before +Pass heading name from content with ::before +Pass link name from content with ::before +Pass button name from content with ::after +Pass heading name from content with ::after +Pass link name from content with ::after +Pass button name from content with ::before and ::after +Pass heading name from content with ::before and ::after +Pass link name from content with ::before and ::after +Pass button name from content no space joiners ::before and ::after +Pass heading name from content no space joiners ::before and ::after +Pass link name from content no space joiners ::before and ::after +Pass button name from content with ::before and ::after in rtl +Pass heading name from content with ::before and ::after in rtl +Pass link name from content with ::before and ::after in rtl +Pass button name from fallback content with ::before and ::after +Pass heading name from fallback content with ::before and ::after +Pass link name from fallback content with ::before and ::after +Pass button name from fallback content mixing attr() and strings with ::before and ::after +Pass heading name from fallback content mixing attr() and strings with ::before and ::after +Pass link name from fallback content mixing attr() and strings with ::before and ::after +Pass primitive radio input with ::before containing empty alternative text +Pass primitive radio input with ::before containing empty alternative text for an image +Pass button name from content for each child +Pass heading name from content for each child +Pass link name from content for each child +Pass button name from content for each child including image +Pass heading name from content for each child including image +Pass link name from content for each child including image +Pass button name from content for each child including nested image +Pass heading name from content for each child including nested image +Pass link name from content for each child including nested image +Pass heading name from content for each child including nested button with nested image +Pass heading name from content for each child including nested link with nested image +Pass heading name from content for each child including nested link using aria-label with nested image +Pass heading name from content for each child including nested link using aria-labelledby with nested image +Pass heading name from content for each child including two nested links using aria-labelledby with nested image +Pass link name from content for each child including nested image (referenced elsewhere via labelledby) +Pass button name from content for each child (no space, inline) +Pass heading name from content for each child (no space, inline) +Pass link name from content for each child (no space, inline) +Pass button name from content for each child (no space, display:block) +Pass heading name from content for each child (no space, display:block) +Pass link name from content for each child (no space, display:block) +Pass button name from content for each child (no space, display:inline-block) +Pass heading name from content for each child (no space, display:inline-block) +Pass link name from content for each child (no space, display:inline-block) +Pass heading name from content with text-transform:none +Pass heading name from content with text-transform:uppercase +Pass heading name from content with text-transform:capitalize +Pass heading name from content with text-transform:lowercase \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/accname/name/comp_name_from_content.html b/Tests/LibWeb/Text/input/wpt-import/accname/name/comp_name_from_content.html new file mode 100644 index 00000000000..ba53b38a882 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/accname/name/comp_name_from_content.html @@ -0,0 +1,266 @@ + + + + Name Comp: Name From Content + + + + + + + + + + + +

Tests the #comp_name_from_content portions of the AccName Name Computation algorithm.

+ +

This series of tests exercises the button, heading, and link elements, because each have different characteristics worthy of testing in each of the name computation algorithm scenarios:

+ + +

ARIA roles, inline

+label
+label
+label
+
+ +

ARIA roles, block

+
label
+
label
+
label
+
+ +

simple

+
+

label

+label
+
+ +

simple with ::before

+
+

label

+label
+
+ +

simple with ::after

+
+

label

+label
+
+ +

simple with ::before and ::after

+
+

label

+label
+
+ +

no space joiners ::before and ::after

+
+

label

+label
+
+ +

Arabic right-to-left (RTL) with ::before and ::after

+
+
+

اسم

+ اسم
+
+
+ +

Alternative Text for CSS content (previously `alt:`) in pseudo-elements

+

rendered text should be "before label after"

+

accessibility label should be "alt-before label alt-after"

+
+

label

+label
+
+ +

Mixed Alternative Text (attr() and strings) for CSS content (previously `alt:`) in pseudo-elements

+

rendered text should be "before label after"

+

accessibility label should be "start alt-before end label start alt-after end"

+
+

label

+label
+
+ +

Empty alternative text for CSS content in pseudo-elements when applied to primitive appearance form controls

+

+

+ +

simple w/ for each child

+
+

one two three

+one two three
+
+ +

simple for each child with image

+
+

one two three

+one two three
+
+ + +

simple for each child with extra nesting containing image

+
+

one two three four

+one two three four
+
+ +

heading with nested button with nested image

+

+ heading + + heading +

+ +

heading with nested link with nested image

+

+ heading + + link + image + link + + heading +

+ +

heading with nested link with nested image using aria-label

+

+ heading + + ignored link text + ignored image alt + ignored link text + + heading +

+ +

heading with nested link with nested image using aria-labelledby

+

+ heading + + ignored link text + image + ignored link text + + heading +

+ +

heading with two nested links referencing image using aria-labelledby

+

+ + link1 + + + link2 + image + + + link3 + +

+ + + + + +

simple w/ for each child (w/o spaces and display:inline)

+
+

onetwothree

+onetwothree
+
+ +

simple w/ for each child (w/o spaces and display:block)

+
+

onetwothree

+onetwothree
+
+ +

simple w/ for each child (w/o spaces and display:inline block)

+
+

onetwothree

+onetwothree
+
+ +

Call us

+

Call us

+

Call us

+

Call us

+ + + +