https://github.com/web-platform-tests/wpt
Raw File
Tip revision: d273149ec04b974e357473b2849ce6d916b2866c authored by Ms2ger on 21 September 2018, 14:10:07 UTC
Improve the handling of generic types in IdlInterfaceMember#toString.
Tip revision: d273149
subframe-painting.html
<!DOCTYPE html>
<body>
<div id="image"></div>
<script>
  const img = document.createElement('IMG');
  img.src = 'circles.png';
  img.onload = function() {
    function sendPaintEntries() {
      const paintEntries = performance.getEntriesByType('paint');
      if (paintEntries.length < 2) {
        setTimeout(sendPaintEntries, 20);
        return;
      }
      let entryContents = paintEntries.length + '';
      for (let i = 0; i < paintEntries.length; i++) {
        const entry = paintEntries[i];
        entryContents += ' ' + entry.entryType + ' '  + entry.name;
      }
      parent.postMessage(entryContents, '*');
    };
    sendPaintEntries();
  };
  document.getElementById('image').appendChild(img);
</script>
</body>
</html>
back to top