| Index: third_party/WebKit/LayoutTests/fast/css/variables/computed-image-url.html
|
| diff --git a/third_party/WebKit/LayoutTests/fast/css/variables/computed-image-url.html b/third_party/WebKit/LayoutTests/fast/css/variables/computed-image-url.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bd2257653cb19bb2e8ca67cb8fe26c765ba5facd
|
| --- /dev/null
|
| +++ b/third_party/WebKit/LayoutTests/fast/css/variables/computed-image-url.html
|
| @@ -0,0 +1,26 @@
|
| +<!DOCTYPE html>
|
| +<script src="../../../resources/testharness.js"></script>
|
| +<script src="../../../resources/testharnessreport.js"></script>
|
| +
|
| +<div id="target"></div>
|
| +
|
| +<script>
|
| +function testImageVar(property, value) {
|
| + test(() => {
|
| + target.style.setProperty('--test', value);
|
| + target.style[property] = 'var(--test)';
|
| + var actual = getComputedStyle(target)[property];
|
| +
|
| + target.style[property] = value;
|
| + assert_not_equals(target.style[property], '', value + ' must be valid for ' + property);
|
| + var expected = getComputedStyle(target)[property];
|
| +
|
| + assert_equals(actual, expected);
|
| + }, property + ' should resolve ' + value + ' the same whether via var() or not.');
|
| +}
|
| +
|
| +testImageVar('background-image', 'url("image.png")');
|
| +testImageVar('background-image', '-webkit-image-set(url("image.png") 1x)');
|
| +testImageVar('background', 'url("image.png")');
|
| +testImageVar('background', '-webkit-image-set(url("image.png") 1x)');
|
| +</script>
|
|
|