diff --git a/Tests/LibWeb/Ref/expected/wpt-import/css/css-values/urls/url-image-ref.html b/Tests/LibWeb/Ref/expected/wpt-import/css/css-values/urls/url-image-ref.html new file mode 100644 index 00000000000..a56c789f147 --- /dev/null +++ b/Tests/LibWeb/Ref/expected/wpt-import/css/css-values/urls/url-image-ref.html @@ -0,0 +1,16 @@ + + + + + + +

Test passes if there is a green square.

+
+ + diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/empty.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/empty.txt new file mode 100644 index 00000000000..f37b0ba7990 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/empty.txt @@ -0,0 +1,9 @@ +Harness status: OK + +Found 4 tests + +4 Pass +Pass empty URL: inline-unquoted +Pass empty URL: inline-quoted +Pass empty URL: external-unquoted +Pass empty URL: external-quoted \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/fragment-only.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/fragment-only.txt new file mode 100644 index 00000000000..8b523808902 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/fragment-only.txt @@ -0,0 +1,10 @@ +Harness status: OK + +Found 5 tests + +5 Fail +Fail empty URL: inline-unquoted +Fail empty URL: inline-quoted +Fail empty URL: external-unquoted +Fail empty URL: external-quoted +Fail empty URL: external-variable \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/resolve-relative-to-base.sub.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/resolve-relative-to-base.sub.txt new file mode 100644 index 00000000000..a5813c16f8b --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/resolve-relative-to-base.sub.txt @@ -0,0 +1,7 @@ +Harness status: OK + +Found 2 tests + +2 Fail +Fail base-relative URL: relative-image-url +Fail base-relative URL: relative-image-variable-url \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/resolve-relative-to-stylesheet.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/resolve-relative-to-stylesheet.txt new file mode 100644 index 00000000000..3bd7e184d55 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/resolve-relative-to-stylesheet.txt @@ -0,0 +1,8 @@ +Harness status: OK + +Found 3 tests + +3 Fail +Fail stylesheet-relative URL: stylesheet-relative-image +Fail stylesheet-relative URL: stylesheet-relative-variable-image +Fail stylesheet-relative URL: stylesheet-relative-document-variable-image \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/url-request-modifiers-computed.sub.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/url-request-modifiers-computed.sub.txt new file mode 100644 index 00000000000..62d9f4a3842 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/url-request-modifiers-computed.sub.txt @@ -0,0 +1,29 @@ +Harness status: OK + +Found 23 tests + +1 Pass +22 Fail +Pass Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png")' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" crossorigin(anonymous))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" crossorigin(use-credentials))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" integrity("sha384-foobar"))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" integrity(""))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" referrerpolicy(no-referrer))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" referrerpolicy(no-referrer-when-downgrade))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" referrerpolicy(same-origin))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" referrerpolicy(origin))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" referrerpolicy(strict-origin))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" referrerpolicy(origin-when-cross-origin))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" referrerpolicy(strict-origin-when-cross-origin))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" referrerpolicy(unsafe-url))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar"))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" integrity("sha384-foobar") crossorigin(anonymous))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" integrity("sha384-foobar") referrerpolicy(no-referrer))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" referrerpolicy(no-referrer) integrity("sha384-foobar"))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" crossorigin(anonymous) referrerpolicy(no-referrer))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" referrerpolicy(no-referrer) crossorigin(anonymous))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" crossorigin(anonymous) integrity("sha384-foobar") referrerpolicy(no-referrer))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" integrity("sha384-foobar") referrerpolicy(no-referrer) crossorigin(anonymous))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" referrerpolicy(no-referrer) crossorigin(anonymous) integrity("sha384-foobar"))' +Fail Property background-image value 'url("http://wpt.live:80/css/support/1x1-green.png" referrerpolicy(no-referrer) integrity("sha384-foobar") crossorigin(anonymous))' \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/url-request-modifiers-invalid.sub.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/url-request-modifiers-invalid.sub.txt new file mode 100644 index 00000000000..65744a86bfa --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/url-request-modifiers-invalid.sub.txt @@ -0,0 +1,35 @@ +Harness status: OK + +Found 29 tests + +6 Pass +23 Fail +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" crossorigin())" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" crossorigin(,))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" crossorigin(anonymous,))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" crossorigin(,anonymous))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" crossorigin(anonymous foobar))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" crossorigin(anonymous) cross-origin(anonymous))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" crossorigin(anonymous) cross-origin(use-credentials))" should not set the property value +Pass e.style['background-image'] = "url(crossorigin(anonymous) \"http://wpt.live:80/css/support/1x1-green.png\")" should not set the property value +Pass e.style['background-image'] = "\"http://wpt.live:80/css/support/1x1-green.png\" crossorigin(anonymous)" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" integrity())" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" integrity(,))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" integrity(\"sha384-foobar\",))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" integrity(,\"sha384-foobar\"))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" integrity(\"sha384-foobar\" foobar))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" integrity(sha384-foobar))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" integrity(\"sha384-foobar\") integrity(\"sha384-foobar\"))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" integrity(\"sha384-foobar\") integrity(\"sha384-barbaz\"))" should not set the property value +Pass e.style['background-image'] = "url(integrity(\"sha384-foobar\") \"http://wpt.live:80/css/support/1x1-green.png\")" should not set the property value +Pass e.style['background-image'] = "\"http://wpt.live:80/css/support/1x1-green.png\" integrity(\"sha384-foobar\")" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy())" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(,))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(no-referrer,))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(,no-referrer))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(no-referrer foobar))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(no-referrer same-origin))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(no-referrer) referrerpolicy(no-referrer))" should not set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(no-referrer) referrerpolicy(same-origin))" should not set the property value +Pass e.style['background-image'] = "url(referrerpolicy(no-referrer) \"http://wpt.live:80/css/support/1x1-green.png\")" should not set the property value +Pass e.style['background-image'] = "\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(no-referrer)" should not set the property value \ No newline at end of file diff --git a/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/url-request-modifiers-serialize.sub.txt b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/url-request-modifiers-serialize.sub.txt new file mode 100644 index 00000000000..ce8f1040b47 --- /dev/null +++ b/Tests/LibWeb/Text/expected/wpt-import/css/css-values/urls/url-request-modifiers-serialize.sub.txt @@ -0,0 +1,29 @@ +Harness status: OK + +Found 23 tests + +1 Pass +22 Fail +Pass e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\")" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" crossorigin(anonymous))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" crossorigin(use-credentials))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" integrity(\"sha384-foobar\"))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" integrity(\"\"))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(no-referrer))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(no-referrer-when-downgrade))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(same-origin))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(origin))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(strict-origin))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(origin-when-cross-origin))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(strict-origin-when-cross-origin))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(unsafe-url))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" crossorigin(anonymous) integrity(\"sha384-foobar\"))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" integrity(\"sha384-foobar\") crossorigin(anonymous))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" integrity(\"sha384-foobar\") referrerpolicy(no-referrer))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(no-referrer) integrity(\"sha384-foobar\"))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" crossorigin(anonymous) referrerpolicy(no-referrer))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(no-referrer) crossorigin(anonymous))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" crossorigin(anonymous) integrity(\"sha384-foobar\") referrerpolicy(no-referrer))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" integrity(\"sha384-foobar\") referrerpolicy(no-referrer) crossorigin(anonymous))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(no-referrer) crossorigin(anonymous) integrity(\"sha384-foobar\"))" should set the property value +Fail e.style['background-image'] = "url(\"http://wpt.live:80/css/support/1x1-green.png\" referrerpolicy(no-referrer) integrity(\"sha384-foobar\") crossorigin(anonymous))" should set the property value \ No newline at end of file diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/empty.html b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/empty.html new file mode 100644 index 00000000000..b9435484038 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/empty.html @@ -0,0 +1,39 @@ + +Empty URLs behaviour + + + + + + +
+
+
+
+ diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/fragment-only.html b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/fragment-only.html new file mode 100644 index 00000000000..8f98161c946 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/fragment-only.html @@ -0,0 +1,40 @@ + +Fragment-on URLs behaviour + + + + + +
+
+
+
+
+ diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/resolve-relative-to-base.sub.html b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/resolve-relative-to-base.sub.html new file mode 100644 index 00000000000..95d5ad1899f --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/resolve-relative-to-base.sub.html @@ -0,0 +1,35 @@ + +URLs in embedded style sheets resolve relative to the document base URI + + + + + +
+
+ diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/resolve-relative-to-stylesheet.html b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/resolve-relative-to-stylesheet.html new file mode 100644 index 00000000000..d91acd0f0d4 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/resolve-relative-to-stylesheet.html @@ -0,0 +1,33 @@ + +URLs in a stylesheet resolve relative to the stylesheet + + + + +
+
+
+ + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/support/empty-urls.css b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/support/empty-urls.css new file mode 100644 index 00000000000..0559e3b2352 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/support/empty-urls.css @@ -0,0 +1,9 @@ +#external-unquoted { + background-image: url(); + cursor: url(), pointer; +} + +#external-quoted { + background-image: url(""); + cursor: url(""), pointer; +} diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/support/fragment-only-urls.css b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/support/fragment-only-urls.css new file mode 100644 index 00000000000..2c39a087e9e --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/support/fragment-only-urls.css @@ -0,0 +1,19 @@ +:root { + --fragment-image-url: url("#foo"); + --fragment-cursor-url: url("#foo"), pointer; +} + +#external-unquoted { + background-image: url(#foo); + cursor: url(#foo), pointer; +} + +#external-quoted { + background-image: url("#foo"); + cursor: url("#foo"), pointer; +} + +#external-variable { + background-image: var(--fragment-image-url); + cursor: var(--fragment-cursor-url); +} diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/support/relative-urls.css b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/support/relative-urls.css new file mode 100644 index 00000000000..1354c655e98 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/support/relative-urls.css @@ -0,0 +1,15 @@ +:root { + --image-path-stylesheet: url("images/test.png"); +} + +#stylesheet-relative-image { + background-image: url(images/test.png); +} + +#stylesheet-relative-variable-image { + background-image: var(--image-path-stylesheet); +} + +#stylesheet-relative-document-variable-image { + background-image: var(--image-path-document); +} diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/url-request-modifiers-computed.sub.html b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/url-request-modifiers-computed.sub.html new file mode 100644 index 00000000000..5d5a9e1017f --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/url-request-modifiers-computed.sub.html @@ -0,0 +1,45 @@ + + + + + + +
+
+
+ diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/url-request-modifiers-invalid.sub.html b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/url-request-modifiers-invalid.sub.html new file mode 100644 index 00000000000..a32c2b7159e --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/url-request-modifiers-invalid.sub.html @@ -0,0 +1,41 @@ + + + + + + + diff --git a/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/url-request-modifiers-serialize.sub.html b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/url-request-modifiers-serialize.sub.html new file mode 100644 index 00000000000..4ea2b46a9c8 --- /dev/null +++ b/Tests/LibWeb/Text/input/wpt-import/css/css-values/urls/url-request-modifiers-serialize.sub.html @@ -0,0 +1,43 @@ + + + + + + +
+