blob: 67255d18ff54d5942a3c4e843363a0cc1bf9c634 [file] [log] [blame]
<!DOCTYPE html>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
<style>
#target {
background-image: url("chrome://");
}
#target:after {
content: url("filesystem://");
}
</style>
<div id="target"></div>
<script>
test(() => {
// Force a second style recalc so that the image gets cached and reused.
getComputedStyle(target).backgroundImage;
getComputedStyle(target, 'after').content;
target.style.color = 'green';
getComputedStyle(target).backgroundImage;
getComputedStyle(target, 'after').content;
}, "Don't crash when using cached CSS images with invalid URLs");
</script>