Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE HTML>
<meta charset=utf-8>
<title>Container Timing: observe containertiming attribute with an image that is not its 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");
addContainerRoot(document.body, 'div_ct');
const img = addSquare100Image(document.body, {id: 'img_id'});
await img.decode();
const entries = await getContainerEntries(t, 0);
assert_equals(entries.length, 0,
'No entry is expected for an image outside the container root');
}, 'Containertiming observed without paintable contents and an image outside does not report observations.');
</script>
</body>