| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> | 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> | 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <style> |
| 5 #target { |
| 6 background-image: url("chrome://"); |
| 7 } |
| 8 #target:after { |
| 9 content: url("filesystem://"); |
| 10 } |
| 11 </style> |
| 4 <div id="target"></div> | 12 <div id="target"></div> |
| 5 <script> | 13 <script> |
| 6 test(() => { | 14 test(() => { |
| 7 target.style.backgroundImage = 'url(filesystem://invalid_url.png)'; | 15 // Force a second style recalc so that the image gets cached and reused. |
| 8 // Force multiple style recalcs so that the image gets cached and reused. | |
| 9 getComputedStyle(target).backgroundImage; | 16 getComputedStyle(target).backgroundImage; |
| 17 getComputedStyle(target, 'after').content; |
| 10 target.style.color = 'green'; | 18 target.style.color = 'green'; |
| 11 getComputedStyle(target).backgroundImage; | 19 getComputedStyle(target).backgroundImage; |
| 20 getComputedStyle(target, 'after').content; |
| 12 }, "Don't crash when using cached CSS images with invalid URLs"); | 21 }, "Don't crash when using cached CSS images with invalid URLs"); |
| 13 </script> | 22 </script> |
| OLD | NEW |