From bb035fbfe0ecd6b53028db7b6d912e98713f5273 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Mon, 19 May 2025 15:57:09 +0100 Subject: [PATCH] Tests: Import a whole bunch of WPT mediaqueries tests A lot of these are ref-tests, so I'm skipping the failing ones for now, and will make as many pass as possible in subsequent commits. --- ...prefers-color-scheme-svg-as-image-ref.html | 19 +++++ ...ers-color-scheme-svg-image-normal-ref.html | 23 ++++++ ...e-svg-image-normal-with-meta-dark-ref.html | 14 ++++ ...-svg-image-normal-with-meta-light-ref.html | 13 ++++ .../prefers-color-scheme-svg-image-ref.html | 17 +++++ .../mediaqueries/reference/ref-green-body.xht | 18 +++++ .../resources/prefers-color-scheme-dark.svg | 6 ++ .../resources/prefers-color-scheme-light.svg | 6 ++ .../scripting-print-noscript-ref.html | 4 + .../scripting-print-script-ref.html | 4 + .../viewport-script-dynamic-ref.html | 9 +++ .../css/mediaqueries/aspect-ratio-001.html | 26 +++++++ .../css/mediaqueries/aspect-ratio-002.html | 24 ++++++ .../css/mediaqueries/aspect-ratio-003.html | 26 +++++++ .../css/mediaqueries/aspect-ratio-004.html | 24 ++++++ .../css/mediaqueries/aspect-ratio-005.html | 25 ++++++ .../css/mediaqueries/aspect-ratio-006.html | 25 ++++++ .../mediaqueries/device-aspect-ratio-002.html | 25 ++++++ .../mediaqueries/device-aspect-ratio-003.html | 24 ++++++ .../mediaqueries/device-aspect-ratio-004.html | 24 ++++++ .../mediaqueries/device-aspect-ratio-006.html | 24 ++++++ .../css/mediaqueries/min-width-001.xht | 29 +++++++ .../mediaqueries/min-width-tables-001.html | 42 ++++++++++ .../mq-calc-sign-function-003.html | 25 ++++++ .../css/mediaqueries/mq-deprecated-001.html | 31 ++++++++ .../css/mediaqueries/mq-gamut-001.html | 23 ++++++ .../css/mediaqueries/mq-gamut-002.html | 24 ++++++ .../css/mediaqueries/mq-gamut-003.html | 25 ++++++ .../css/mediaqueries/mq-gamut-004.html | 24 ++++++ .../css/mediaqueries/mq-gamut-005.html | 24 ++++++ .../mq-invalid-media-type-002.html | 31 ++++++++ .../mq-invalid-media-type-003.html | 31 ++++++++ .../mq-invalid-media-type-004.html | 31 ++++++++ .../mq-invalid-media-type-layer-001.html | 31 ++++++++ .../mediaqueries/mq-negative-range-001.html | 37 +++++++++ .../mediaqueries/mq-negative-range-002.html | 37 +++++++++ .../css/mediaqueries/mq-range-001.html | 26 +++++++ .../css/mediaqueries/negation-001.html | 41 ++++++++++ .../css/mediaqueries/negation-002.html | 44 +++++++++++ .../prefers-color-scheme-svg-as-image.html | 8 ++ ...cheme-svg-image-normal-with-meta-dark.html | 17 +++++ ...heme-svg-image-normal-with-meta-light.html | 17 +++++ ...prefers-color-scheme-svg-image-normal.html | 16 ++++ .../prefers-color-scheme-svg-image.html | 23 ++++++ .../css/mediaqueries/relative-units-001.html | 36 +++++++++ .../css/mediaqueries/relative-units-002.html | 36 +++++++++ .../css/mediaqueries/relative-units-003.html | 36 +++++++++ .../css/mediaqueries/relative-units-004.html | 36 +++++++++ .../resources/prefers-color-scheme.svg | 9 +++ .../scripting-print-noscript.html | 13 ++++ .../mediaqueries/scripting-print-script.html | 17 +++++ .../mediaqueries/viewport-script-dynamic.html | 20 +++++ Tests/LibWeb/TestConfig.ini | 32 ++++++++ .../aspect-ratio-serialization.txt | 6 ++ .../css/mediaqueries/display-mode.txt | 23 ++++++ .../css/mediaqueries/dynamic-range.txt | 29 +++++++ .../css/mediaqueries/forced-colors.txt | 22 ++++++ .../css/mediaqueries/inverted-colors.txt | 21 +++++ .../mq-dynamic-empty-children.txt | 6 ++ .../mq-invalid-media-type-005.txt | 6 ++ .../mq-invalid-media-type-layer-002.txt | 6 ++ .../mq-unknown-feature-custom-property.txt | 6 ++ .../mediaqueries/overflow-media-features.txt | 34 +++++++++ .../css/mediaqueries/prefers-color-scheme.txt | 24 ++++++ .../css/mediaqueries/prefers-contrast.txt | 32 ++++++++ .../css/mediaqueries/prefers-reduced-data.txt | 23 ++++++ .../mediaqueries/prefers-reduced-motion.txt | 22 ++++++ .../prefers-reduced-transparency.txt | 23 ++++++ .../css/mediaqueries/relative-units-005.txt | 9 +++ .../wpt-import/css/mediaqueries/scripting.txt | 18 +++++ .../css/mediaqueries/update-media-feature.txt | 20 +++++ .../aspect-ratio-serialization.html | 13 ++++ .../css/mediaqueries/display-mode.html | 24 ++++++ .../css/mediaqueries/dynamic-range.html | 47 ++++++++++++ .../css/mediaqueries/forced-colors.html | 24 ++++++ .../css/mediaqueries/inverted-colors.html | 29 +++++++ .../mq-dynamic-empty-children.html | 40 ++++++++++ .../mq-invalid-media-type-005.html | 45 +++++++++++ .../mq-invalid-media-type-layer-002.html | 27 +++++++ .../mq-unknown-feature-custom-property.html | 13 ++++ .../mediaqueries/overflow-media-features.html | 53 +++++++++++++ .../mediaqueries/prefers-color-scheme.html | 24 ++++++ .../css/mediaqueries/prefers-contrast.html | 36 +++++++++ .../mediaqueries/prefers-reduced-data.html | 30 ++++++++ .../mediaqueries/prefers-reduced-motion.html | 27 +++++++ .../prefers-reduced-transparency.html | 30 ++++++++ .../css/mediaqueries/relative-units-005.html | 29 +++++++ .../resources/matchmedia-utils.js | 76 +++++++++++++++++++ .../css/mediaqueries/scripting.html | 26 +++++++ .../mediaqueries/update-media-feature.html | 38 ++++++++++ 90 files changed, 2213 insertions(+) create mode 100644 Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-as-image-ref.html create mode 100644 Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-ref.html create mode 100644 Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-dark-ref.html create mode 100644 Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-light-ref.html create mode 100644 Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-ref.html create mode 100644 Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/reference/ref-green-body.xht create mode 100644 Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/resources/prefers-color-scheme-dark.svg create mode 100644 Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/resources/prefers-color-scheme-light.svg create mode 100644 Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/scripting-print-noscript-ref.html create mode 100644 Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/scripting-print-script-ref.html create mode 100644 Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/viewport-script-dynamic-ref.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-001.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-002.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-003.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-004.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-005.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-006.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-002.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-003.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-004.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-006.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/min-width-001.xht create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/min-width-tables-001.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-calc-sign-function-003.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-deprecated-001.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-001.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-002.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-003.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-004.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-005.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-002.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-003.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-004.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-layer-001.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-negative-range-001.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-negative-range-002.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-range-001.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/negation-001.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/negation-002.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-as-image.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-dark.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-light.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/relative-units-001.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/relative-units-002.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/relative-units-003.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/relative-units-004.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/resources/prefers-color-scheme.svg create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/scripting-print-noscript.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/scripting-print-script.html create mode 100644 Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/viewport-script-dynamic.html create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/aspect-ratio-serialization.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/display-mode.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/dynamic-range.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/forced-colors.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/inverted-colors.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/mq-dynamic-empty-children.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/mq-invalid-media-type-005.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/mq-invalid-media-type-layer-002.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/mq-unknown-feature-custom-property.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/overflow-media-features.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-color-scheme.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-contrast.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-reduced-data.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-reduced-motion.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-reduced-transparency.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/relative-units-005.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/scripting.txt create mode 100644 Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/update-media-feature.txt create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/aspect-ratio-serialization.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/display-mode.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/dynamic-range.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/forced-colors.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/inverted-colors.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/mq-dynamic-empty-children.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/mq-invalid-media-type-005.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/mq-invalid-media-type-layer-002.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/mq-unknown-feature-custom-property.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/overflow-media-features.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-color-scheme.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-contrast.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-reduced-data.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-reduced-motion.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-reduced-transparency.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/relative-units-005.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/resources/matchmedia-utils.js create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/scripting.html create mode 100644 Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/update-media-feature.html diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-as-image-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-as-image-ref.html new file mode 100644 index 00000000000..012513ef9fa --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-as-image-ref.html @@ -0,0 +1,19 @@ + + + prefers-color-scheme inside an SVG image + + + +

There should be a purple square below when the preferred color-scheme is dark, and blue otherwise.

+
diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-ref.html new file mode 100644 index 00000000000..ef7fa1b366d --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-ref.html @@ -0,0 +1,23 @@ + + +CSS prefers-color-scheme affects SVG images - color-scheme 'normal', no <meta> (reference) + +
+ +
+
+
+ +
+
diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-dark-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-dark-ref.html new file mode 100644 index 00000000000..008c66e47d9 --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-dark-ref.html @@ -0,0 +1,14 @@ + + + +CSS prefers-color-scheme affects SVG images - color-scheme 'normal', <meta> 'dark only' (reference) + +
+ +
+
diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-light-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-light-ref.html new file mode 100644 index 00000000000..4b47a7fd6ed --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-light-ref.html @@ -0,0 +1,13 @@ + + +CSS prefers-color-scheme affects SVG images - color-scheme 'normal', <meta> 'light only' (reference) + +
+ +
+
diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-ref.html new file mode 100644 index 00000000000..7da496cf883 --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-ref.html @@ -0,0 +1,17 @@ + + +CSS Test Reference + +
+ +
+
+
+ +
+
diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/reference/ref-green-body.xht b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/reference/ref-green-body.xht new file mode 100644 index 00000000000..f79255de9cb --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/reference/ref-green-body.xht @@ -0,0 +1,18 @@ + + + +CSS Reftest Reference + + + + +

This should have a green background.

+ + diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/resources/prefers-color-scheme-dark.svg b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/resources/prefers-color-scheme-dark.svg new file mode 100644 index 00000000000..f65fce76ecb --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/resources/prefers-color-scheme-dark.svg @@ -0,0 +1,6 @@ + + + + diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/resources/prefers-color-scheme-light.svg b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/resources/prefers-color-scheme-light.svg new file mode 100644 index 00000000000..23ac2ad9496 --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/resources/prefers-color-scheme-light.svg @@ -0,0 +1,6 @@ + + + + diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/scripting-print-noscript-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/scripting-print-noscript-ref.html new file mode 100644 index 00000000000..2dd7aff8313 --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/scripting-print-noscript-ref.html @@ -0,0 +1,4 @@ + + diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/scripting-print-script-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/scripting-print-script-ref.html new file mode 100644 index 00000000000..d2da3f84058 --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/scripting-print-script-ref.html @@ -0,0 +1,4 @@ + +
+ Script is enabled +
diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/viewport-script-dynamic-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/viewport-script-dynamic-ref.html new file mode 100644 index 00000000000..e3f1c95d66f --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/mediaqueries/viewport-script-dynamic-ref.html @@ -0,0 +1,9 @@ + + +CSS Test Reference + + + +

Should be green

diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-001.html new file mode 100644 index 00000000000..9307b9a15fe --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-001.html @@ -0,0 +1,26 @@ + + +CSS Media Queries Test: min-aspect-ratio - 59/79 ('aspect-ratio' property with prefix 'min') + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-002.html new file mode 100644 index 00000000000..3b34de92250 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-002.html @@ -0,0 +1,24 @@ + + +CSS Media Queries Test: min-aspect-ratio - 0/0 ('aspect-ratio' property with prefix 'min') + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-003.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-003.html new file mode 100644 index 00000000000..4212e8197c5 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-003.html @@ -0,0 +1,26 @@ + + +CSS Media Queries Test: max-aspect-ratio - 1280/720 ('aspect-ratio' property with prefix 'max') + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-004.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-004.html new file mode 100644 index 00000000000..bf2d261725a --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-004.html @@ -0,0 +1,24 @@ + + +CSS Media Queries Test: max-aspect-ratio - 0/0 ('aspect-ratio' property with prefix 'max') + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-005.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-005.html new file mode 100644 index 00000000000..12c9a080e51 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-005.html @@ -0,0 +1,25 @@ + + +CSS Media Queries Test: max-aspect-ratio - 1280.1/720.01 ('aspect-ratio' property with prefix 'max') + + + + + + +

Test passes if there is a filled green square and no red.

+
+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-006.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-006.html new file mode 100644 index 00000000000..59901b1aadf --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/aspect-ratio-006.html @@ -0,0 +1,25 @@ + + +CSS Media Queries Test: min-aspect-ratio - 0.7 ('aspect-ratio' property with prefix 'min') + + + + + + +

Test passes if there is a filled green square and no red.

+
+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-002.html new file mode 100644 index 00000000000..dd0f0a1b49b --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-002.html @@ -0,0 +1,25 @@ + + +CSS Media Queries Test: max-device-aspect-ratio - 0/0 ('device-aspect-ratio' property with prefix 'max') + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ + diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-003.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-003.html new file mode 100644 index 00000000000..23014f5bfbb --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-003.html @@ -0,0 +1,24 @@ + + +CSS Media Queries Test: min-device-aspect-ratio - 1279/1024 ('device-aspect-ratio' property with prefix 'min') + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-004.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-004.html new file mode 100644 index 00000000000..42e3c069e11 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-004.html @@ -0,0 +1,24 @@ + + +CSS Media Queries Test: min-device-aspect-ratio - 0/0 ('device-aspect-ratio' property with prefix 'min') + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-006.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-006.html new file mode 100644 index 00000000000..681558349e5 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-006.html @@ -0,0 +1,24 @@ + + +CSS Media Queries Test: device-aspect-ratio - 0/0 (invalid) + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/min-width-001.xht b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/min-width-001.xht new file mode 100644 index 00000000000..9dc01c68d81 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/min-width-001.xht @@ -0,0 +1,29 @@ + + + + + CSS Media Queries Test: min-width length value approximation + + + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ + diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/min-width-tables-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/min-width-tables-001.html new file mode 100644 index 00000000000..dc430ccb185 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/min-width-tables-001.html @@ -0,0 +1,42 @@ + + + + + CSS Test: Table Layout and Viewport Resizing + + + + + + + + + + +

Test passes if there is a filled green square and no red.

+ + + + + + + diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-calc-sign-function-003.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-calc-sign-function-003.html new file mode 100644 index 00000000000..8d532b915ac --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-calc-sign-function-003.html @@ -0,0 +1,25 @@ + +Test: support for calc with sign() in Media Queries + + + + + +

Test passes if there is a filled green square and no red.

+
\ No newline at end of file diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-deprecated-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-deprecated-001.html new file mode 100644 index 00000000000..cb02c3f316a --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-deprecated-001.html @@ -0,0 +1,31 @@ + +Test: deprecated media types + + + + + + + +

Test passes if there is a filled green square and no red. + +

diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-001.html new file mode 100644 index 00000000000..9e98236f09c --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-001.html @@ -0,0 +1,23 @@ + +Test: srgb color gamut + + + + + + +

Test passes if there is a filled green square and no red. + +

diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-002.html new file mode 100644 index 00000000000..abc3ac48a48 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-002.html @@ -0,0 +1,24 @@ + +Test: p3 color gamut + + + + + + + +

Test passes if there is a filled green square and no red. + +

diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-003.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-003.html new file mode 100644 index 00000000000..c0980a93ca3 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-003.html @@ -0,0 +1,25 @@ + +Test: p3 color gamut (old name) + + + + + + + + +

Test passes if there is a filled green square and no red. + +

diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-004.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-004.html new file mode 100644 index 00000000000..3cc1c757bf1 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-004.html @@ -0,0 +1,24 @@ + +Test: rec2020 color gamut + + + + + + + +

Test passes if there is a filled green square and no red. + +

diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-005.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-005.html new file mode 100644 index 00000000000..aa5db52a774 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-gamut-005.html @@ -0,0 +1,24 @@ + +Test: rec2020 color gamut(old name) + + + + + + + +

Test passes if there is a filled green square and no red. + +

diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-002.html new file mode 100644 index 00000000000..763a7f29205 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-002.html @@ -0,0 +1,31 @@ + + + + Test: syntax error handling in Media Queries + + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ + + diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-003.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-003.html new file mode 100644 index 00000000000..acc524ca98a --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-003.html @@ -0,0 +1,31 @@ + + + + Test: syntax error handling in Media Queries + + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ + + diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-004.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-004.html new file mode 100644 index 00000000000..689c8d1a78d --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-004.html @@ -0,0 +1,31 @@ + + + + Test: syntax error handling in Media Queries + + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ + + diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-layer-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-layer-001.html new file mode 100644 index 00000000000..ef3fc48ca88 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-layer-001.html @@ -0,0 +1,31 @@ + + + + Test: syntax error handling in Media Queries + + + + + + + + +

Test passes if there is a filled green square and no red.

+
+ + + diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-negative-range-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-negative-range-001.html new file mode 100644 index 00000000000..761df3ac087 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-negative-range-001.html @@ -0,0 +1,37 @@ + +Test: false in the negative range + + + + + + + + +

Test passes if there is a filled green square and no red. + +

diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-negative-range-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-negative-range-002.html new file mode 100644 index 00000000000..e905b39231d --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-negative-range-002.html @@ -0,0 +1,37 @@ + +Test: false in the negative range + + + + + + + + +

Test passes if there is a filled green square and no red. + +

diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-range-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-range-001.html new file mode 100644 index 00000000000..0aacc17564f --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/mq-range-001.html @@ -0,0 +1,26 @@ + +Test: invalid range syntax + + + + + + + +

Test passes if there is a filled green square and no red. + +

diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/negation-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/negation-001.html new file mode 100644 index 00000000000..eccfaa4338b --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/negation-001.html @@ -0,0 +1,41 @@ + + + + Test: support for negated conditions in Media Queries + + + + + + + +

Test passes if there is a filled green square and no red.

+
+
+
+
+
+ + diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/negation-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/negation-002.html new file mode 100644 index 00000000000..ca5fb74dfbf --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/negation-002.html @@ -0,0 +1,44 @@ + + + + Test: It is invalid to mix "and" and "or" and "not" at the same level of a media query. + + + + + + + +

Test passes if there is a filled green square and no red.

+
+
+
+
+ + diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-as-image.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-as-image.html new file mode 100644 index 00000000000..7e70dc3d4ba --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-as-image.html @@ -0,0 +1,8 @@ + + + prefers-color-scheme inside an SVG image + + + +

There should be a purple square below when the preferred color-scheme is dark, and blue otherwise.

+ diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-dark.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-dark.html new file mode 100644 index 00000000000..bdc5079caf9 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-dark.html @@ -0,0 +1,17 @@ + + + +CSS prefers-color-scheme affects SVG images - color-scheme 'normal', <meta> 'dark only' + + + +
+ +
+
diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-light.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-light.html new file mode 100644 index 00000000000..001cd00a7f3 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal-with-meta-light.html @@ -0,0 +1,17 @@ + + + +CSS prefers-color-scheme affects SVG images - color-scheme 'normal', <meta> 'light only' + + + +
+ +
+
diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal.html new file mode 100644 index 00000000000..6e2f185ad10 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image-normal.html @@ -0,0 +1,16 @@ + + +CSS prefers-color-scheme affects SVG images - color-scheme 'normal', no <meta> + + + +
+ +
+
diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image.html new file mode 100644 index 00000000000..d6a27f227a9 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-image.html @@ -0,0 +1,23 @@ + + +CSS prefers-color-scheme affects SVG images + + + + + + +
+ +
+
+
+ +
+
diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/relative-units-001.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/relative-units-001.html new file mode 100644 index 00000000000..9214630953a --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/relative-units-001.html @@ -0,0 +1,36 @@ + + + + + CSS Test: Font-relative length units (rem) in width media queries + + + + + + + + +

This should have a green background.

+ + + + diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/relative-units-002.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/relative-units-002.html new file mode 100644 index 00000000000..29895857398 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/relative-units-002.html @@ -0,0 +1,36 @@ + + + + + CSS Test: Font-relative length units (em) in width media queries + + + + + + + + +

This should have a green background.

+ + + + diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/relative-units-003.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/relative-units-003.html new file mode 100644 index 00000000000..2fc10be66fd --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/relative-units-003.html @@ -0,0 +1,36 @@ + + + + + CSS Test: Font-relative length units (ex) in width media queries + + + + + + + + +

This should have a green background.

+ + + + diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/relative-units-004.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/relative-units-004.html new file mode 100644 index 00000000000..68991a7da3d --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/relative-units-004.html @@ -0,0 +1,36 @@ + + + + + CSS Test: Font-relative length units (ch) in width media queries + + + + + + + + +

This should have a green background.

+ + + + diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/resources/prefers-color-scheme.svg b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/resources/prefers-color-scheme.svg new file mode 100644 index 00000000000..5523ff39fa4 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/resources/prefers-color-scheme.svg @@ -0,0 +1,9 @@ + + + + diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/scripting-print-noscript.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/scripting-print-noscript.html new file mode 100644 index 00000000000..be17722b7c2 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/scripting-print-noscript.html @@ -0,0 +1,13 @@ + + + + +
+ Script is disabled +
diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/scripting-print-script.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/scripting-print-script.html new file mode 100644 index 00000000000..44e05803507 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/scripting-print-script.html @@ -0,0 +1,17 @@ + + + + +
+ Script is enabled +
diff --git a/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/viewport-script-dynamic.html b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/viewport-script-dynamic.html new file mode 100644 index 00000000000..57d06ecfcf3 --- /dev/null +++ b/Tests/LibWeb/Ref/input/wpt-import/css/mediaqueries/viewport-script-dynamic.html @@ -0,0 +1,20 @@ + + +CSS Test: Meta viewport after a script and stylesheets + + + + + + + + +

Should be green

diff --git a/Tests/LibWeb/TestConfig.ini b/Tests/LibWeb/TestConfig.ini index f108ecc40e9..9f52a2eb34b 100644 --- a/Tests/LibWeb/TestConfig.ini +++ b/Tests/LibWeb/TestConfig.ini @@ -99,6 +99,38 @@ Ref/input/wpt-import/css/CSS2/floats/floats-wrap-bfc-001-right-overflow.xht Ref/input/wpt-import/css/CSS2/floats/floats-placement-003.html Ref/input/wpt-import/css/CSS2/floats/floats-wrap-top-below-bfc-003l.xht +; WPT media queries ref-tests that currently fail +Ref/input/wpt-import/css/mediaqueries/aspect-ratio-001.html +Ref/input/wpt-import/css/mediaqueries/aspect-ratio-002.html +Ref/input/wpt-import/css/mediaqueries/aspect-ratio-003.html +Ref/input/wpt-import/css/mediaqueries/aspect-ratio-004.html +Ref/input/wpt-import/css/mediaqueries/aspect-ratio-005.html +Ref/input/wpt-import/css/mediaqueries/aspect-ratio-006.html +Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-002.html +Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-003.html +Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-004.html +Ref/input/wpt-import/css/mediaqueries/device-aspect-ratio-006.html +Ref/input/wpt-import/css/mediaqueries/min-width-001.xht +Ref/input/wpt-import/css/mediaqueries/min-width-tables-001.html +Ref/input/wpt-import/css/mediaqueries/mq-calc-sign-function-003.html +Ref/input/wpt-import/css/mediaqueries/mq-deprecated-001.html +Ref/input/wpt-import/css/mediaqueries/mq-gamut-001.html +Ref/input/wpt-import/css/mediaqueries/mq-gamut-002.html +Ref/input/wpt-import/css/mediaqueries/mq-gamut-003.html +Ref/input/wpt-import/css/mediaqueries/mq-gamut-004.html +Ref/input/wpt-import/css/mediaqueries/mq-gamut-005.html +Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-002.html +Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-003.html +Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-004.html +Ref/input/wpt-import/css/mediaqueries/mq-invalid-media-type-layer-001.html +Ref/input/wpt-import/css/mediaqueries/mq-negative-range-001.html +Ref/input/wpt-import/css/mediaqueries/mq-negative-range-002.html +Ref/input/wpt-import/css/mediaqueries/mq-range-001.html +Ref/input/wpt-import/css/mediaqueries/negation-001.html +Ref/input/wpt-import/css/mediaqueries/negation-002.html +Ref/input/wpt-import/css/mediaqueries/prefers-color-scheme-svg-as-image.html +Ref/input/wpt-import/css/mediaqueries/viewport-script-dynamic.html + ; WPT ref-tests that are flaky due to unknown reasons Ref/input/wpt-import/css/css-contain/contain-size-replaced-006.html diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/aspect-ratio-serialization.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/aspect-ratio-serialization.txt new file mode 100644 index 00000000000..e1a324894b9 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/aspect-ratio-serialization.txt @@ -0,0 +1,6 @@ +Harness status: OK + +Found 1 tests + +1 Pass +Pass serializes with spaces around the integer. \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/display-mode.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/display-mode.txt new file mode 100644 index 00000000000..c6d1c03e499 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/display-mode.txt @@ -0,0 +1,23 @@ +Harness status: OK + +Found 17 tests + +11 Pass +6 Fail +Pass Should be known: '(display-mode)' +Pass Should be known: '(display-mode: standalone)' +Pass Should be known: '(display-mode: browser)' +Pass Should be known: '(display-mode: minimal-ui)' +Pass Should be known: '(display-mode: fullscreen)' +Fail Should be known: '(display-mode: picture-in-picture)' +Fail Should be parseable: '(display-mode: 0)' +Pass Should be unknown: '(display-mode: 0)' +Fail Should be parseable: '(display-mode: none)' +Pass Should be unknown: '(display-mode: none)' +Fail Should be parseable: '(display-mode: random)' +Pass Should be unknown: '(display-mode: random)' +Fail Should be parseable: '(display-mode: 10px)' +Pass Should be unknown: '(display-mode: 10px)' +Fail Should be parseable: '(display-mode: 1%)' +Pass Should be unknown: '(display-mode: 1%)' +Pass Check that display-mode evaluates to true in the boolean context \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/dynamic-range.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/dynamic-range.txt new file mode 100644 index 00000000000..fc36c49cd02 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/dynamic-range.txt @@ -0,0 +1,29 @@ +Harness status: OK + +Found 23 tests + +15 Pass +8 Fail +Pass Should be known: '(dynamic-range: standard)' +Pass Should be known: '(dynamic-range: high)' +Pass Should be known: '(video-dynamic-range: standard)' +Pass Should be known: '(video-dynamic-range: high)' +Pass Should be known: '(dynamic-range)' +Pass Should be known: '(video-dynamic-range)' +Fail Should be parseable: '(dynamic-range: 0)' +Pass Should be unknown: '(dynamic-range: 0)' +Fail Should be parseable: '(dynamic-range: 10px)' +Pass Should be unknown: '(dynamic-range: 10px)' +Fail Should be parseable: '(dynamic-range: invalid)' +Pass Should be unknown: '(dynamic-range: invalid)' +Fail Should be parseable: '(video-dynamic-range: 0)' +Pass Should be unknown: '(video-dynamic-range: 0)' +Fail Should be parseable: '(video-dynamic-range: 10px)' +Pass Should be unknown: '(video-dynamic-range: 10px)' +Fail Should be parseable: '(video-dynamic-range: invalid)' +Pass Should be unknown: '(video-dynamic-range: invalid)' +Fail Check that dynamic-range evaluates to false in the boolean context +Fail Check that video-dynamic-range evaluates to false in the boolean context +Pass Check that dynamic-range always matches 'standard' +Pass Check that video-dynamic-range always matches 'standard' +Pass Check that video-dynamic-range is not 'invalid' \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/forced-colors.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/forced-colors.txt new file mode 100644 index 00000000000..b69202d4358 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/forced-colors.txt @@ -0,0 +1,22 @@ +Harness status: OK + +Found 16 tests + +10 Pass +6 Fail +Pass Should be known: '(forced-colors)' +Pass Should be known: '(forced-colors: none)' +Pass Should be known: '(forced-colors: active)' +Fail Should be parseable: '(forced-colors: 0)' +Pass Should be unknown: '(forced-colors: 0)' +Fail Should be parseable: '(forced-colors: no-preference)' +Pass Should be unknown: '(forced-colors: no-preference)' +Fail Should be parseable: '(forced-colors: 10px)' +Pass Should be unknown: '(forced-colors: 10px)' +Fail Should be parseable: '(forced-colors: active 0)' +Pass Should be unknown: '(forced-colors: active 0)' +Fail Should be parseable: '(forced-colors: none active)' +Pass Should be unknown: '(forced-colors: none active)' +Fail Should be parseable: '(forced-colors: active/none)' +Pass Should be unknown: '(forced-colors: active/none)' +Pass Check that none evaluates to false in the boolean context \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/inverted-colors.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/inverted-colors.txt new file mode 100644 index 00000000000..aa05b8dc624 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/inverted-colors.txt @@ -0,0 +1,21 @@ +Harness status: OK + +Found 15 tests + +10 Pass +5 Fail +Pass Should be known: '(inverted-colors)' +Pass Should be known: '(inverted-colors: none)' +Pass Should be known: '(inverted-colors: inverted)' +Fail Should be parseable: '(inverted-colors: 0)' +Pass Should be unknown: '(inverted-colors: 0)' +Fail Should be parseable: '(inverted-colors: no-preference)' +Pass Should be unknown: '(inverted-colors: no-preference)' +Fail Should be parseable: '(inverted-colors: 10px)' +Pass Should be unknown: '(inverted-colors: 10px)' +Fail Should be parseable: '(inverted-colors: none inverted)' +Pass Should be unknown: '(inverted-colors: none inverted)' +Fail Should be parseable: '(inverted-colors: none/inverted)' +Pass Should be unknown: '(inverted-colors: none/inverted)' +Pass Check that none evaluates to false in the boolean context +Pass Check that invalid evaluates to false \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/mq-dynamic-empty-children.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/mq-dynamic-empty-children.txt new file mode 100644 index 00000000000..84afd867d85 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/mq-dynamic-empty-children.txt @@ -0,0 +1,6 @@ +Harness status: OK + +Found 1 tests + +1 Fail +Fail Dynamic evaluation of media queries works fine in presence of empty media rule \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/mq-invalid-media-type-005.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/mq-invalid-media-type-005.txt new file mode 100644 index 00000000000..a96cd9d760f --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/mq-invalid-media-type-005.txt @@ -0,0 +1,6 @@ +Harness status: OK + +Found 1 tests + +1 Pass +Pass syntactical MQ keywords used as media types are a syntax error \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/mq-invalid-media-type-layer-002.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/mq-invalid-media-type-layer-002.txt new file mode 100644 index 00000000000..32e9a03b93c --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/mq-invalid-media-type-layer-002.txt @@ -0,0 +1,6 @@ +Harness status: OK + +Found 1 tests + +1 Pass +Pass 'layer' used as media types is a syntax error \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/mq-unknown-feature-custom-property.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/mq-unknown-feature-custom-property.txt new file mode 100644 index 00000000000..7aebb50e173 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/mq-unknown-feature-custom-property.txt @@ -0,0 +1,6 @@ +Harness status: OK + +Found 1 tests + +1 Fail +Fail Serialization of : with custom property feature name and ident value \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/overflow-media-features.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/overflow-media-features.txt new file mode 100644 index 00000000000..92f04bcb46d --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/overflow-media-features.txt @@ -0,0 +1,34 @@ +Harness status: OK + +Found 28 tests + +20 Pass +8 Fail +Pass Should be known: '(overflow-inline)' +Pass Should be known: '(overflow-inline: none)' +Pass Should be known: '(overflow-inline: scroll)' +Pass Should be parseable: 'overflow-inline' +Fail Should be unknown: 'overflow-inline' +Fail Should be parseable: '(overflow-inline: ?)' +Pass Should be unknown: '(overflow-inline: ?)' +Fail Should be parseable: '(overflow-inline: 10px)' +Pass Should be unknown: '(overflow-inline: 10px)' +Fail Should be parseable: '(overflow-inline: 0)' +Pass Should be unknown: '(overflow-inline: 0)' +Pass Should be known: '(overflow-block)' +Pass Should be known: '(overflow-block: none)' +Pass Should be known: '(overflow-block: scroll)' +Pass Should be known: '(overflow-block: paged)' +Pass Should be parseable: 'overflow-block' +Fail Should be unknown: 'overflow-block' +Fail Should be parseable: '(overflow-block: ?)' +Pass Should be unknown: '(overflow-block: ?)' +Fail Should be parseable: '(overflow-block: 10px)' +Pass Should be unknown: '(overflow-block: 10px)' +Fail Should be parseable: '(overflow-block: 0)' +Pass Should be unknown: '(overflow-block: 0)' +Pass Check that overflow-inline: scroll always matches non printing documents +Pass Check that overflow-block: scroll always matches non printing documents +Pass Check that overflow-inline: none doesn't match non printing documents +Pass Check that overflow-block: none doesn't match non printing documents +Pass Check that overflow-block: paged doesn't match non printing documents \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-color-scheme.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-color-scheme.txt new file mode 100644 index 00000000000..06811477c49 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-color-scheme.txt @@ -0,0 +1,24 @@ +Harness status: OK + +Found 18 tests + +11 Pass +7 Fail +Pass Should be known: '(prefers-color-scheme)' +Pass Should be known: '(prefers-color-scheme: light)' +Pass Should be known: '(prefers-color-scheme: dark)' +Fail Should be parseable: '(prefers-color-scheme: 0)' +Pass Should be unknown: '(prefers-color-scheme: 0)' +Fail Should be parseable: '(prefers-color-scheme: none)' +Pass Should be unknown: '(prefers-color-scheme: none)' +Fail Should be parseable: '(prefers-color-scheme: 10px)' +Pass Should be unknown: '(prefers-color-scheme: 10px)' +Fail Should be parseable: '(prefers-color-scheme: dark 0)' +Pass Should be unknown: '(prefers-color-scheme: dark 0)' +Fail Should be parseable: '(prefers-color-scheme: dark light)' +Pass Should be unknown: '(prefers-color-scheme: dark light)' +Fail Should be parseable: '(prefers-color-scheme: light/dark)' +Pass Should be unknown: '(prefers-color-scheme: light/dark)' +Fail Should be parseable: '(prefers-color-scheme: no-preference)' +Pass Should be unknown: '(prefers-color-scheme: no-preference)' +Pass Check that prefer-color-scheme evaluates to true in the boolean context \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-contrast.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-contrast.txt new file mode 100644 index 00000000000..294fe9f9a6d --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-contrast.txt @@ -0,0 +1,32 @@ +Harness status: OK + +Found 26 tests + +18 Pass +8 Fail +Pass Should be known: '(prefers-contrast)' +Pass Should be known: '(prefers-contrast: no-preference)' +Pass Should be known: '(prefers-contrast: more)' +Pass Should be known: '(prefers-contrast: less)' +Pass Should be known: '(prefers-contrast: custom)' +Fail Should be parseable: '(prefers-contrast: increase)' +Pass Should be unknown: '(prefers-contrast: increase)' +Fail Should be parseable: '(prefers-contrast: none)' +Pass Should be unknown: '(prefers-contrast: none)' +Fail Should be parseable: '(prefers-contrast: forced high)' +Pass Should be unknown: '(prefers-contrast: forced high)' +Fail Should be parseable: '(prefers-contrast: forced low)' +Pass Should be unknown: '(prefers-contrast: forced low)' +Fail Should be parseable: '(prefers-contrast > increase)' +Pass Should be unknown: '(prefers-contrast > increase)' +Pass Should be parseable: '(prefers-increased-contrast)' +Pass Should be unknown: '(prefers-increased-contrast)' +Pass Should be parseable: '(prefers-decreased-contrast)' +Pass Should be unknown: '(prefers-decreased-contrast)' +Fail Should be parseable: '(prefers-contrast: high)' +Pass Should be unknown: '(prefers-contrast: high)' +Fail Should be parseable: '(prefers-contrast: low)' +Pass Should be unknown: '(prefers-contrast: low)' +Fail Should be parseable: '(prefers-contrast: forced)' +Pass Should be unknown: '(prefers-contrast: forced)' +Pass Check boolean context evaluation. \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-reduced-data.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-reduced-data.txt new file mode 100644 index 00000000000..5ef984b6d25 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-reduced-data.txt @@ -0,0 +1,23 @@ +Harness status: OK + +Found 17 tests + +11 Pass +6 Fail +Pass Should be known: '(prefers-reduced-data)' +Pass Should be known: '(prefers-reduced-data: no-preference)' +Pass Should be known: '(prefers-reduced-data: reduce)' +Fail Should be parseable: '(prefers-reduced-data: 0)' +Pass Should be unknown: '(prefers-reduced-data: 0)' +Fail Should be parseable: '(prefers-reduced-data: none)' +Pass Should be unknown: '(prefers-reduced-data: none)' +Fail Should be parseable: '(prefers-reduced-data: 10px)' +Pass Should be unknown: '(prefers-reduced-data: 10px)' +Fail Should be parseable: '(prefers-reduced-data: no-preference reduce)' +Pass Should be unknown: '(prefers-reduced-data: no-preference reduce)' +Fail Should be parseable: '(prefers-reduced-data: reduced)' +Pass Should be unknown: '(prefers-reduced-data: reduced)' +Fail Should be parseable: '(prefers-reduced-data: no-preference/reduce)' +Pass Should be unknown: '(prefers-reduced-data: no-preference/reduce)' +Pass Check that no-preference evaluates to false in the boolean context +Pass Check that invalid evaluates to false \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-reduced-motion.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-reduced-motion.txt new file mode 100644 index 00000000000..48284135edf --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-reduced-motion.txt @@ -0,0 +1,22 @@ +Harness status: OK + +Found 16 tests + +10 Pass +6 Fail +Pass Should be known: '(prefers-reduced-motion)' +Pass Should be known: '(prefers-reduced-motion: no-preference)' +Pass Should be known: '(prefers-reduced-motion: reduce)' +Fail Should be parseable: '(prefers-reduced-motion: 0)' +Pass Should be unknown: '(prefers-reduced-motion: 0)' +Fail Should be parseable: '(prefers-reduced-motion: none)' +Pass Should be unknown: '(prefers-reduced-motion: none)' +Fail Should be parseable: '(prefers-reduced-motion: 10px)' +Pass Should be unknown: '(prefers-reduced-motion: 10px)' +Fail Should be parseable: '(prefers-reduced-motion: no-preference reduce)' +Pass Should be unknown: '(prefers-reduced-motion: no-preference reduce)' +Fail Should be parseable: '(prefers-reduced-motion: reduced)' +Pass Should be unknown: '(prefers-reduced-motion: reduced)' +Fail Should be parseable: '(prefers-reduced-motion: no-preference/reduce)' +Pass Should be unknown: '(prefers-reduced-motion: no-preference/reduce)' +Pass Check that no-preference evaluates to false in the boolean context \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-reduced-transparency.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-reduced-transparency.txt new file mode 100644 index 00000000000..889d1cc6a64 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/prefers-reduced-transparency.txt @@ -0,0 +1,23 @@ +Harness status: OK + +Found 17 tests + +11 Pass +6 Fail +Pass Should be known: '(prefers-reduced-transparency)' +Pass Should be known: '(prefers-reduced-transparency: no-preference)' +Pass Should be known: '(prefers-reduced-transparency: reduce)' +Fail Should be parseable: '(prefers-reduced-transparency: 0)' +Pass Should be unknown: '(prefers-reduced-transparency: 0)' +Fail Should be parseable: '(prefers-reduced-transparency: none)' +Pass Should be unknown: '(prefers-reduced-transparency: none)' +Fail Should be parseable: '(prefers-reduced-transparency: 10px)' +Pass Should be unknown: '(prefers-reduced-transparency: 10px)' +Fail Should be parseable: '(prefers-reduced-transparency: no-preference reduce)' +Pass Should be unknown: '(prefers-reduced-transparency: no-preference reduce)' +Fail Should be parseable: '(prefers-reduced-transparency: reduced)' +Pass Should be unknown: '(prefers-reduced-transparency: reduced)' +Fail Should be parseable: '(prefers-reduced-transparency: no-preference/reduce)' +Pass Should be unknown: '(prefers-reduced-transparency: no-preference/reduce)' +Pass Check that no-preference evaluates to false in the boolean context +Pass Check that invalid evaluates to false \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/relative-units-005.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/relative-units-005.txt new file mode 100644 index 00000000000..46a7ffad522 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/relative-units-005.txt @@ -0,0 +1,9 @@ +Harness status: OK + +Found 3 tests + +2 Pass +1 Fail +Pass ex unit in media queries should match initial font +Pass ch unit in media queries should match initial font +Fail ic unit in media queries should match initial font \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/scripting.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/scripting.txt new file mode 100644 index 00000000000..f9397db2df0 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/scripting.txt @@ -0,0 +1,18 @@ +Harness status: OK + +Found 12 tests + +9 Pass +3 Fail +Pass Should be known: '(scripting)' +Pass Should be known: '(scripting: enabled)' +Pass Should be known: '(scripting: initial-only)' +Pass Should be known: '(scripting: none)' +Fail Should be parseable: '(scripting: 0)' +Pass Should be unknown: '(scripting: 0)' +Fail Should be parseable: '(scripting: 10px)' +Pass Should be unknown: '(scripting: 10px)' +Fail Should be parseable: '(scripting: invalid)' +Pass Should be unknown: '(scripting: invalid)' +Pass Check that scripting currently matches 'enabled' +Pass Check that scripting currently evaluates to true in the boolean context \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/update-media-feature.txt b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/update-media-feature.txt new file mode 100644 index 00000000000..0dd1901c8dc --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/mediaqueries/update-media-feature.txt @@ -0,0 +1,20 @@ +Harness status: OK + +Found 14 tests + +11 Pass +3 Fail +Pass Should be known: '(update)' +Pass Should be known: '(update: none)' +Pass Should be known: '(update: slow)' +Pass Should be known: '(update: fast)' +Fail Should be parseable: '(update: ?)' +Pass Should be unknown: '(update: ?)' +Fail Should be parseable: '(update: 10px)' +Pass Should be unknown: '(update: 10px)' +Fail Should be parseable: '(update: 0)' +Pass Should be unknown: '(update: 0)' +Pass Check that update: fast always matches fast displays +Pass Check that update: slow doesn't match fast displays +Pass Check that update: none doesn't match fast displays +Pass Check that update always matches non printing documents \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/aspect-ratio-serialization.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/aspect-ratio-serialization.html new file mode 100644 index 00000000000..1cdefb6e3ab --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/aspect-ratio-serialization.html @@ -0,0 +1,13 @@ + + +CSS Media Queries Test: 'aspect-ratio' serializes with spaces around ' / '. + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/display-mode.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/display-mode.html new file mode 100644 index 00000000000..fcc03618d8f --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/display-mode.html @@ -0,0 +1,24 @@ + + + + + + \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/dynamic-range.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/dynamic-range.html new file mode 100644 index 00000000000..1d6ee19328e --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/dynamic-range.html @@ -0,0 +1,47 @@ + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/forced-colors.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/forced-colors.html new file mode 100644 index 00000000000..3e5f4238914 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/forced-colors.html @@ -0,0 +1,24 @@ + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/inverted-colors.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/inverted-colors.html new file mode 100644 index 00000000000..3233a526793 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/inverted-colors.html @@ -0,0 +1,29 @@ + + + + + + + \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/mq-dynamic-empty-children.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/mq-dynamic-empty-children.html new file mode 100644 index 00000000000..32aa055fc91 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/mq-dynamic-empty-children.html @@ -0,0 +1,40 @@ + +Dynamic evaluation of media queries works fine in presence of empty media rule + + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/mq-invalid-media-type-005.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/mq-invalid-media-type-005.html new file mode 100644 index 00000000000..dd614732230 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/mq-invalid-media-type-005.html @@ -0,0 +1,45 @@ + + + +Mediaqueries-3 test: parsing hanging-punctuation with invalid values + + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/mq-invalid-media-type-layer-002.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/mq-invalid-media-type-layer-002.html new file mode 100644 index 00000000000..9520ec95c42 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/mq-invalid-media-type-layer-002.html @@ -0,0 +1,27 @@ + + + +Mediaqueries-3 test: parsing hanging-punctuation with invalid values + + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/mq-unknown-feature-custom-property.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/mq-unknown-feature-custom-property.html new file mode 100644 index 00000000000..fca38bfb1d1 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/mq-unknown-feature-custom-property.html @@ -0,0 +1,13 @@ + +Media Queries Test: Custom property name as media feature name + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/overflow-media-features.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/overflow-media-features.html new file mode 100644 index 00000000000..25547b24c0f --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/overflow-media-features.html @@ -0,0 +1,53 @@ + +CSS Media Queries Test: overflow media features + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-color-scheme.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-color-scheme.html new file mode 100644 index 00000000000..2c7a6119414 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-color-scheme.html @@ -0,0 +1,24 @@ + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-contrast.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-contrast.html new file mode 100644 index 00000000000..8681c05151d --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-contrast.html @@ -0,0 +1,36 @@ + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-reduced-data.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-reduced-data.html new file mode 100644 index 00000000000..2bcdf85bf8b --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-reduced-data.html @@ -0,0 +1,30 @@ + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-reduced-motion.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-reduced-motion.html new file mode 100644 index 00000000000..821d7d58602 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-reduced-motion.html @@ -0,0 +1,27 @@ + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-reduced-transparency.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-reduced-transparency.html new file mode 100644 index 00000000000..6ce6f60385b --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/prefers-reduced-transparency.html @@ -0,0 +1,30 @@ + + + + + + + \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/relative-units-005.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/relative-units-005.html new file mode 100644 index 00000000000..46689824ad3 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/relative-units-005.html @@ -0,0 +1,29 @@ + +CSS Media Queries Test: ex, ch, and ic from initial font + + + +
+
+
+ diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/resources/matchmedia-utils.js b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/resources/matchmedia-utils.js new file mode 100644 index 00000000000..327e8f69fe2 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/resources/matchmedia-utils.js @@ -0,0 +1,76 @@ +'use strict'; + +function query_is_css_parseable(query) { + const style = document.createElement('style'); + style.type = 'text/css'; + document.head.appendChild(style); + + const sheet = style.sheet; + try { + sheet.insertRule("@media " + query + "{}", 0); + return sheet.cssRules.length == 1 && + sheet.cssRules[0].media.mediaText != "not all"; + } finally { + while (sheet.cssRules.length) + sheet.deleteRule(0); + style.remove(); + } +} + +function query_should_be_css_parseable(query) { + test(() => { + assert_true(query_is_css_parseable(query)); + }, "Should be parseable in a CSS stylesheet: '" + query + "'"); +} + +function query_should_not_be_css_parseable(query) { + test(() => { + assert_false(query_is_css_parseable(query)); + }, "Should not be parseable in a CSS stylesheet: '" + query + "'"); +} + +function query_is_js_parseable(query) { + // We cannot rely on whether a given feature is on or off, so only check the + // 'media' member of the result. + const match = window.matchMedia(query); + return match.media == query; +} + +function query_should_be_js_parseable(query) { + test(() => { + assert_true(query_is_js_parseable(query)); + }, "Should be parseable in JS: '" + query + "'"); +} + +function query_should_not_be_js_parseable(query) { + test(() => { + assert_false(query_is_js_parseable(query)); + }, "Should not be parseable in JS: '" + query + "'"); +} + +function query_is_known(query) { + return window.matchMedia(`${query}, not all and ${query}`).matches; +} + +function query_is_unknown(query) { + return !window.matchMedia(`${query}, not all and ${query}`).matches; +} + +function query_should_be_known(query) { + test(() => { + assert_true(query_is_js_parseable(query), "Can parse with JS"); + assert_true(query_is_css_parseable(query), "Can parse with CSS"); + assert_true(query_is_known(query)); + }, "Should be known: '" + query + "'"); +} + +function query_should_be_unknown(query) { + test(() => { + assert_true(query_is_js_parseable(query), "Can parse with JS"); + assert_true(query_is_css_parseable(query), "Can parse with CSS"); + }, "Should be parseable: '" + query + "'"); + + test(() => { + assert_true(query_is_unknown(query)); + }, "Should be unknown: '" + query + "'"); +} diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/scripting.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/scripting.html new file mode 100644 index 00000000000..d29497371c7 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/scripting.html @@ -0,0 +1,26 @@ + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/update-media-feature.html b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/update-media-feature.html new file mode 100644 index 00000000000..0f39519a8e2 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/mediaqueries/update-media-feature.html @@ -0,0 +1,38 @@ + +CSS Media Query Test: update media feature + + + + + + +