border-image.html (813B)
1 <!DOCTYPE html> 2 <body> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script src="../resources/utils.js"></script> 6 <style> 7 #bordered { 8 width: 100px; 9 height: 100px; 10 border: 30px solid transparent; 11 border-image-source: url(../resources/circle.svg); 12 border-image-width: 0px; 13 } 14 </style> 15 <div id='bordered'></div> 16 <script> 17 setup({"hide_test_state": true}); 18 promise_test(async t => { 19 const onload = new Promise(r => window.addEventListener('load', r)); 20 await onload; 21 return assertNoFirstContentfulPaint(t).then(() => { 22 document.getElementById('bordered').style.borderImageWidth = '30px'; 23 }).then(() => { 24 return assertFirstContentfulPaint(t); 25 }); 26 }, 'Border image triggers First Contentful Paint.'); 27 </script> 28 </body>