https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 50873c90ca7681d02c9994de53b213a5b035d193 authored by rohilla21 on 16 March 2018, 19:04:14 UTC
armenian/css3-counter-styles-008.html: Removes range
Tip revision: 50873c9
child-painting-first-image.html
<!DOCTYPE html>
<body>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<script>
async_test(function (t) {
    window.addEventListener('message', t.step_func(e => {
        assert_equals(e.data, '2 paint first-paint paint first-contentful-paint');
        // When only child frame paints, expect only first-paint.
        t.step_timeout( function() {
            const bufferedEntries = performance.getEntriesByType('paint');
            assert_equals(bufferedEntries.length, 1);
            assert_equals(bufferedEntries[0].entryType, 'paint');
            assert_equals(bufferedEntries[0].name, 'first-paint');
            t.done();
        }, 50);
    }));
    const iframe = document.createElement('iframe');
    iframe.id = 'child-iframe';
    iframe.src = 'resources/subframe-painting.html';
    document.body.appendChild(iframe);
}, 'Parent frame ignores paint-timing events fired from child image rendering.');
</script>
</body>
</html>
back to top