Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /container-timing/tentative/containertiming-with-child-text.html - WPT Dashboard Interop Dashboard
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>Container Timing: observe with a node with containertiming and a text child</title>
<body>
<style>
body {
margin: 0;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/container-timing/resources/container-timing-helpers.js"></script>
<script>
promise_test(async t => {
assert_implements(window.PerformanceContainerTiming, "PerformanceContainerTiming is not implemented");
const div = addContainerRoot(document.body, 'div_ct');
addText(div, {id: 'p_id'});
const beforeRender = performance.now();
const entries = await getContainerEntries(t);
assert_equals(entries.length, 1);
const entry = entries[0];
checkContainerEntry(entry, 'div_ct', 'p_id', beforeRender)
}, 'Paint of the text child of container timing is reported.');
</script>
</body>