forked from mozilla/gecko-dev
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1518999 - Add a WPT test to make sure FCP works for iframes r=mst…
…ange Differential Revision: https://phabricator.services.mozilla.com/D86260
- Loading branch information
Showing
4 changed files
with
83 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
testing/web-platform/tests/paint-timing/fcp-only/fcp-iframe.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<head> | ||
<title> | ||
Performance Paint Timing Test: Not only the top level document, paints | ||
in the iframe should also generate the entry | ||
</title> | ||
</head> | ||
<body> | ||
<script src="../resources/utils.js"></script> | ||
<script src="/resources/testharness.js"></script> | ||
<script src="/resources/testharnessreport.js"></script> | ||
<script> | ||
setup({"hide_test_state": true}); | ||
async_test(function (t) { | ||
assert_implements(window.PerformancePaintTiming, "Paint Timing isn't supported."); | ||
window.addEventListener('message', t.step_func(e => { | ||
if (e.data.entryType == "paint" && e.data.name == "first-contentful-paint") { | ||
t.done(); | ||
} | ||
})); | ||
const iframe = document.createElement('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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters