attr-security-if.html
Details
- Test
/css/css-values/attr-security-if.html- Harness
- OK
Subtests
| Status | Subtest |
|---|---|
| FAIL | '--x: image-set(if(style(--true): 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(if(style(--true): attr(data-foo);))' with data-foo="https://does-not-exist.test/404.png" |
| FAIL | 'background-image: image-set(
if(style(--true): url(https://does-not-exist-2.test/404.png);
else: attr(data-foo);))' with data-foo="https://does-not-exist-2.test/404.png" assert_equals: expected "image-set(url(\"https://does-not-exist-2.test/404.png\") 1dppx)" but got "none" |
| PASS | 'background-image: image-set( if(style(--some-string): url(https://does-not-exist.test/404.png);))' with data-foo="https://does-not-exist.test/404.png" |
| PASS | 'background-image: image-set( if(style(--condition-val: attr(data-foo type(*))): url(https://does-not-exist.test/404.png);))' with data-foo="3" |
| PASS | 'background-image: image-set( if(style(--condition-val: attr(data-foo type(*))): url(https://does-not-exist.test/404.png); style(--true): url(https://does-not-exist.test/404.png); else: url(https://does-not-exist.test/404.png);))' with data-foo="1" |
| FAIL | 'background-image: image-set(if(style(--true): url(https://does-not-exist.test/404.png);
style(--condition-val): url(https://does-not-exist.test/404.png);
else: url(https://does-not-exist.test/404.png);))' with data-foo="attr(data-foo type(*))" assert_equals: expected "image-set(url(\"https://does-not-exist.test/404.png\") 1dppx)" but got "none" |
| PASS | 'background-image: image-set( if(style(--condition-val: if(style(--true): attr(data-foo type(*));)): url(https://does-not-exist.test/404.png);))' with data-foo="3" |
| FAIL | '--x: image-set(if(style(--condition-val: if(style(--true): attr(data-foo type(*));)): url(https://does-not-exist.test/404.png);))' with data-foo="3" assert_equals: expected "image-set(url(https://does-not-exist.test/404.png))" but got "" |
| FAIL | '--x: image-set(if(style(--condition-val >= attr(data-foo type(*))): url(https://does-not-exist.test/404.png);))' with data-foo="3" assert_equals: expected "image-set(url(https://does-not-exist.test/404.png))" but got "" |
| PASS | 'background-image: image-set( if(style(--condition-val >= attr(data-foo type(*))): url(https://does-not-exist.test/404.png);))' with data-foo="3" |
| PASS | 'background-image: image-set( if(style(--condition-val < attr(data-foo type(*))): url(https://does-not-exist.test/404.png);))' with data-foo="3" |
| PASS | 'background-image: image-set( if(style(--str < attr(data-foo type(*))): url(https://does-not-exist.test/404.png);))' with data-foo="3" |
| PASS | 'background-image: image-set( if(style(--condition-val < attr(data-foo type(*))): url(https://does-not-exist.test/404.png);))' with data-foo="text" |