blob: 3fc5e7b859cb262039baa01a75eea261b1e54969 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<div id="target"></div>
<script>
target.style.backgroundImage = "-webkit-cross-fade(url(images1.jpg), url(images2.jpg), 0.5)";
test(function() {
var expected = '-webkit-cross-fade(url("' + location.href.replace('getComputedStyle-relativeURL.html', 'images1.jpg') + '"), url("' + location.href.replace('getComputedStyle-relativeURL.html', 'images2.jpg') + '"), 0.5)';
assert_equals(getComputedStyle(target).backgroundImage, expected);
assert_equals(target.style.backgroundImage, '-webkit-cross-fade(url("images1.jpg"), url("images2.jpg"), 0.5)');
}, 'Testing that getComputedStyle.backgroundImage returns absolute URLs and style.backgroundImage returns relative URLs');
</script>