Files
sousa-gecko/testing/web-platform/tests/css/css-sizing/responsive-iframe/responsive-iframe-dom-content-loaded.html
T
Koji Ishii 7360f8d654 Bug 2039498 [wpt PR 59872] - [iframe] Remove .tentative from tests, a=testonly
Automatic update from web-platform-tests
[iframe] Remove `.tentative` from tests

The CSS spec[1] has landed.

[1]: https://drafts.csswg.org/css-sizing-4/#responsive-iframes

Bug: 418397278
Change-Id: If60c3bf1c0a6af92f10eec4b630b532e70b0dac4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7843735
Commit-Queue: Kent Tamura <tkent@chromium.org>
Auto-Submit: Koji Ishii <kojii@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1630448}

--

wpt-commits: 27020cc7ede3b18041a5560e6a2feb54bd4e1913
wpt-pr: 59872
2026-05-19 08:26:13 +00:00

31 lines
1.0 KiB
HTML

<!doctype HTML>
<title>Test that `DOMContentLoaded` triggers resizing.</title>
<link rel="author" href="mailto:kojii@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-sizing/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/rendering-utils.js"></script>
<style>
iframe {
frame-sizing: content-height;
}
</style>
<iframe id="target" frameborder=0 src="resources/iframe-contents-dom-content-loaded.html"></iframe>
<script>
async_test(t => {
window.addEventListener('message', t.step_func(async (e) => {
const type = e.data.type;
if (type === 'DOMContentLoaded') {
// The resize may not be synchronous, so wait for an animation frame.
await waitForAtLeastOneFrame();
assert_equals(target.offsetHeight, 200);
} else if (type === 'load') {
await waitForAtLeastOneFrame();
assert_equals(target.offsetHeight, 400);
t.done();
}
}));
}, "`DOMContentLoaded` triggers resizing");
</script>
</body>