fcp-svg.html (932B)
1 <!DOCTYPE html> 2 <head> 3 <title>Performance Paint Timing Test: FCP with SVG</title> 4 <style> 5 #main { 6 width: 100px; 7 height: 100px; 8 left: 0px; 9 position: relative; 10 } 11 12 #circle { 13 display: none; 14 } 15 16 /* contentful class is defined in test_fcp script. */ 17 #main.contentful #circle { 18 display: block; 19 } 20 </style> 21 </head> 22 <body> 23 <script src="/resources/testharness.js"></script> 24 <script src="/resources/testharnessreport.js"></script> 25 <script src="../resources/utils.js"></script> 26 <div id="main"> 27 <svg viewBox="0 0 10 10" xmlns="http://www.w3.org/2000/svg" 28 xmlns:xlink="http://www.w3.org/1999/xlink"> 29 <defs> 30 <circle id="myCircle" cx="5" cy="5" r="4" stroke="blue"/> 31 </defs> 32 <use id="circle" href="#myCircle" fill="green" /> 33 </svg> 34 </div> 35 <script> 36 test_fcp("First contentful paint fires when SVG becomes contentful.") 37 </script> 38 </body> 39 40 </html>