From 61755b29c9acbbb642aa772023f59c1aebf174e8 Mon Sep 17 00:00:00 2001 From: Lucas CHOLLET Date: Sun, 15 Dec 2024 16:04:32 -0500 Subject: [PATCH] Tests: Import a bunch of css-color tests from WPT --- .../css/css-color/blacktext-ref.html | 9 +++++ .../css/css-color/greentext-ref.html | 9 +++++ .../wpt-import/css/css-color/hex-003-ref.html | 10 +++++ .../wpt-import/css/css-color/color-001.html | 13 +++++++ .../wpt-import/css/css-color/color-002.html | 13 +++++++ .../wpt-import/css/css-color/color-003.html | 14 +++++++ .../wpt-import/css/css-color/hex-001.html | 17 +++++++++ .../wpt-import/css/css-color/hex-002.html | 17 +++++++++ .../wpt-import/css/css-color/hex-003.html | 17 +++++++++ .../wpt-import/css/css-color/hex-004.html | 17 +++++++++ .../wpt-import/css/css-color/hsl-001.html | 18 +++++++++ .../wpt-import/css/css-color/hsl-002.html | 17 +++++++++ .../wpt-import/css/css-color/hsl-003.html | 18 +++++++++ .../wpt-import/css/css-color/hsl-004.html | 18 +++++++++ .../wpt-import/css/css-color/hsl-005.html | 18 +++++++++ .../wpt-import/css/css-color/hsl-006.html | 18 +++++++++ .../wpt-import/css/css-color/hsl-007.html | 18 +++++++++ .../wpt-import/css/css-color/hsl-008.html | 18 +++++++++ .../parsing/color-computed-hex-color.txt | 11 ++++++ .../parsing/color-computed-hex-color.html | 38 +++++++++++++++++++ 20 files changed, 328 insertions(+) create mode 100644 Tests/LibWeb/Ref/expected/wpt-import/css/css-color/blacktext-ref.html create mode 100644 Tests/LibWeb/Ref/expected/wpt-import/css/css-color/greentext-ref.html create mode 100644 Tests/LibWeb/Ref/expected/wpt-import/css/css-color/hex-003-ref.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/css-color/color-001.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/css-color/color-002.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/css-color/color-003.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/css-color/hex-001.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/css-color/hex-002.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/css-color/hex-003.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/css-color/hex-004.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-001.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-002.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-003.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-004.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-005.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-006.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-007.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-008.html create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/css-color/parsing/color-computed-hex-color.txt create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/css-color/parsing/color-computed-hex-color.html diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-color/blacktext-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-color/blacktext-ref.html new file mode 100644 index 00000000000..ddfa9100cbe --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-color/blacktext-ref.html @@ -0,0 +1,9 @@ + + +Black text reference + + +

Test passes if this text is black

+ diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-color/greentext-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-color/greentext-ref.html new file mode 100644 index 00000000000..1f6d079700c --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-color/greentext-ref.html @@ -0,0 +1,9 @@ + + +Green text reference + + +

Test passes if this text is green

+ diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-color/hex-003-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-color/hex-003-ref.html new file mode 100644 index 00000000000..dc7e324e0ed --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-color/hex-003-ref.html @@ -0,0 +1,10 @@ + + +Green text reference for hex shorthand tests + + +

Test passes if you see a green square, and no red.

+
+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-color/color-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/color-001.html new file mode 100644 index 00000000000..42a04745b86 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/color-001.html @@ -0,0 +1,13 @@ + + +CSS Color 4: color property + + + + + + +

Test passes if this text is green

+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-color/color-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/color-002.html new file mode 100644 index 00000000000..a1e8a4586b5 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/color-002.html @@ -0,0 +1,13 @@ + + +CSS Color 4: color property, initial value + + + + + + +

Test passes if this text is black

+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-color/color-003.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/color-003.html new file mode 100644 index 00000000000..fbcb195e7bf --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/color-003.html @@ -0,0 +1,14 @@ + + +CSS Color 4: color property, initial value + + + + + + +

Test passes if this text is green

+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hex-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hex-001.html new file mode 100644 index 00000000000..7b5a0094cd3 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hex-001.html @@ -0,0 +1,17 @@ + + +CSS Color 4: The RGB hexadecimal notations: #RRGGBB + + + + + + +

Test passes if you see a green square, and no red.

+

+

+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hex-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hex-002.html new file mode 100644 index 00000000000..8dbfff26337 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hex-002.html @@ -0,0 +1,17 @@ + + +CSS Color 4: The RGB hexadecimal notations: #RRGGBB + + + + + + +

Test passes if you see a green square, and no red.

+

+

+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hex-003.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hex-003.html new file mode 100644 index 00000000000..407d51cf662 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hex-003.html @@ -0,0 +1,17 @@ + + +CSS Color 4: The RGB hexadecimal notations: #RRGGBB + + + + + + +

Test passes if you see a green square, and no red.

+

+

+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hex-004.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hex-004.html new file mode 100644 index 00000000000..3fe1a6811ea --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hex-004.html @@ -0,0 +1,17 @@ + + +CSS Color 4: The RGB hexadecimal notations: #RRGGBB + + + + + + +

Test passes if you see a green square, and no red.

+

+

+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-001.html new file mode 100644 index 00000000000..147e69a6168 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-001.html @@ -0,0 +1,18 @@ + + +CSS Color 4: HSL functions hsl() and hsla() + + + + + + + +

Test passes if you see a green square, and no red.

+

+

+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-002.html new file mode 100644 index 00000000000..43d3b424e4a --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-002.html @@ -0,0 +1,17 @@ + + +CSS Color 4: HSL functions hsl() and hsla() + + + + + + +

Test passes if you see a green square, and no red.

+

+

+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-003.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-003.html new file mode 100644 index 00000000000..37ad311798d --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-003.html @@ -0,0 +1,18 @@ + + +CSS Color 4: HSL functions hsl() and hsla() + + + + + + + +

Test passes if you see a green square, and no red.

+

+

+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-004.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-004.html new file mode 100644 index 00000000000..f5212c36ecb --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-004.html @@ -0,0 +1,18 @@ + + +CSS Color 4: HSL functions hsl() and hsla() + + + + + + + +

Test passes if you see a green square, and no red.

+

+

+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-005.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-005.html new file mode 100644 index 00000000000..bb6af99aaed --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-005.html @@ -0,0 +1,18 @@ + + +CSS Color 4: HSL functions hsl() and hsla() + + + + + + + +

Test passes if you see a green square, and no red.

+

+

+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-006.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-006.html new file mode 100644 index 00000000000..80a71b7b6f5 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-006.html @@ -0,0 +1,18 @@ + + +CSS Color 4: HSL functions hsl() and hsla() + + + + + + + +

Test passes if you see a green square, and no red.

+

+

+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-007.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-007.html new file mode 100644 index 00000000000..240a99999ce --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-007.html @@ -0,0 +1,18 @@ + + +CSS Color 4: HSL functions hsl() and hsla() + + + + + + + +

Test passes if you see a green square, and no red.

+

+

+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-008.html b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-008.html new file mode 100644 index 00000000000..174142446bf --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/css-color/hsl-008.html @@ -0,0 +1,18 @@ + + +CSS Color 4: HSL functions hsl() and hsla() + + + + + + + +

Test passes if you see a green square, and no red.

+

+

+ diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-color/parsing/color-computed-hex-color.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-color/parsing/color-computed-hex-color.txt new file mode 100644 index 00000000000..11acf52f930 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-color/parsing/color-computed-hex-color.txt @@ -0,0 +1,11 @@ +Harness status: OK + +Found 6 tests + +6 Pass +Pass Property color value '#fff' [Valid 3-digit hex] +Pass Property color value '#ffff' [Valid 4-digit hex] +Pass Property color value '#ffffff' [Valid 6-digit hex] +Pass Property color value '#ffffffff' [Valid 8-digit hex] +Pass Property color value '#FFCc99' [Valid 6-digit hex] +Pass Property color value '#369' [Valid 3-digit hex] \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-color/parsing/color-computed-hex-color.html b/Tests/LibWeb/Text/input/wpt-import/css/css-color/parsing/color-computed-hex-color.html new file mode 100644 index 00000000000..2b35df20937 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-color/parsing/color-computed-hex-color.html @@ -0,0 +1,38 @@ + + + + +CSS Color Level 4: Computation of colors using hex color notation + + + + + + + + + +
+
+
+ + + +