attr-security.html
Details
- Test
/css/css-values/attr-security.html- Harness
- OK
Subtests
| Status | Subtest |
|---|---|
| FAIL | '--x: image-set(attr(data-foo))' with data-foo="https://does-not-exist.test/404.png" assert_equals: expected "image-set(\"https://does-not-exist.test/404.png\")" but got "" |
| PASS | 'background-image: image-set(attr(data-foo))' with data-foo="https://does-not-exist.test/404.png" |
| PASS | 'background: image-set(attr(data-foo))' with data-foo="https://does-not-exist.test/404.png" |
| PASS | 'background-image: image-set("https://does-not-exist.test/404.png")' with data-foo="https://does-not-exist.test/404.png" |
| FAIL | '--x: src(attr(data-foo))' with data-foo="https://does-not-exist.test/404.png" assert_equals: expected "src(\"https://does-not-exist.test/404.png\")" but got "" |
| PASS | 'background-image: src(attr(data-foo))' with data-foo="https://does-not-exist.test/404.png" |
| FAIL | 'background-image: src("https://does-not-exist.test/404.png")' with data-foo="https://does-not-exist.test/404.png" assert_equals: expected "src(url(\"https://does-not-exist.test/404.png\"))" but got "none" |
| FAIL | '--x: src(string("https://does-not-exist.test" attr(data-foo)))' with data-foo="/404.png" assert_equals: expected "src(string(\"https://does-not-exist.test\" \"/404.png\"))" but got "" |
| PASS | 'background-image: src(string("https://does-not-exist.test" attr(data-foo)))' with data-foo="/404.png" |
| FAIL | 'background-image: src(string("https://does-not-exist.test/""404.png"))' with data-foo="/404.png" assert_equals: expected "src(url(\"https://does-not-exist.test/404.png\"))" but got "none" |
| PASS | '--x: attr(data-foo type(<url>))' with data-foo="url(https://does-not-exist.test/404.png)" |
| PASS | 'background-image: attr(data-foo type(<url>))' with data-foo="url(https://does-not-exist.test/404.png)" |
| PASS | 'background-image: url("https://does-not-exist.test/404.png")' with data-foo="url(https://does-not-exist.test/404.png)" |
| FAIL | '--x: image(attr(data-foo))' with data-foo="https://does-not-exist.test/404.png" assert_equals: expected "image(\"https://does-not-exist.test/404.png\")" but got "" |
| PASS | 'background-image: image(attr(data-foo))' with data-foo="https://does-not-exist.test/404.png" |
| FAIL | 'background-image: image("https://does-not-exist.test/404.png")' with data-foo="https://does-not-exist.test/404.png" assert_equals: expected "image(url(\"https://does-not-exist.test/404.png\"))" but got "none" |
| FAIL | 'background-image: url(https://does-not-exist.test/404.png), attr(data-foo type(<image>))' with data-foo="linear-gradient(#000000, #ffffff)" assert_equals: expected "url(\"https://does-not-exist.test/404.png\"), linear-gradient(rgb(0, 0, 0), rgb(255, 255, 255))" but got "none" |
| FAIL | '--x: image-set(var(--y, attr(data-foo)))' with data-foo="https://does-not-exist.test/404.png" assert_equals: expected "image-set(\"https://does-not-exist.test/404.png\")" but got "" |
| PASS | 'background-image: image-set(var(--y, attr(data-foo)))' with data-foo="https://does-not-exist.test/404.png" |
| FAIL | '--x: image-set(var(--some-string))' with data-foo="https://does-not-exist.test/404.png" assert_equals: expected "image-set(\"https://does-not-exist.test/404.png\")" but got "" |
| FAIL | 'background-image: image-set(var(--some-string))' with data-foo="https://does-not-exist.test/404.png" assert_equals: expected "none" but got "image-set(url(\"http://web-platform.test:8000/css/css-values/empty\") 1dppx)" |
| FAIL | '--x: image-set(var(--some-string-list))' with data-foo="https://does-not-exist.test/404.png" assert_equals: expected "image-set(\"https://does-not-exist-2.test/404.png\" \"https://does-not-exist.test/404.png\")" but got "" |
| FAIL | 'background-image: image-set(var(--some-string-list))' with data-foo="https://does-not-exist.test/404.png" assert_equals: expected "none" but got "image-set(url(\"http://web-platform.test:8000/css/css-values/empty\") 1dppx)" |
| FAIL | '--registered-url: attr(data-foo type(<url>))' with data-foo="${url}" assert_equals: expected "url(\"https://does-not-exist-2.test/404.png\")" but got "" |
| FAIL | '--registered-color: attr(data-foo type(<color>))' with data-foo="blue" assert_equals: expected "rgb(0, 0, 255)" but got "" |
| FAIL | '--x: image-set(var(--some-other-url))' with data-foo="https://does-not-exist.test/404.png" assert_equals: expected "image-set(\"https://does-not-exist.test/404.png\")" but got "" |
| PASS | 'background-image: image-set(var(--some-other-url))' with data-foo="https://does-not-exist.test/404.png" |
| PASS | 'background-image: attr(data-foo type(*))' with data-foo="url(https://does-not-exist.test/404.png), linear-gradient(black, white)" |
| PASS | 'background-image: image-set(var(--image-set-valid))' with data-foo="image/jpeg" |
| PASS | 'background-image: image-set(var(--image-set-invalid))' with data-foo="https://does-not-exist.test/404.png" |
| PASS | 'background-image: attr(data-foo type(*))' with data-foo="linear-gradient(black, white), url(https://does-not-exist.test/404.png)" |
| PASS | 'background-image: var(--url-after-gradients)' with data-foo="https://does-not-exist.test/404.png" |
| PASS | 'background-image: var(--undefined, var(--url-after-gradients))' with data-foo="https://does-not-exist.test/404.png" |