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