Files
sousa-gecko/testing/web-platform/tests/css/css-sizing/responsive-iframe/responsive-iframe-icb.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

36 lines
1.3 KiB
HTML

<!doctype HTML>
<title>Test that IFRAME content uses the initial ICB to measure the natural size.</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 {
border: 1px solid black;
frame-sizing: content-height;
}
</style>
<iframe id="target" frameborder=0 src="resources/iframe-contents-icb.html"></iframe>
<script>
async_test(t => {
const target = document.getElementById('target');
window.addEventListener('load', t.step_func(e => {
// On load, the IFRAME is resized to the content size.
assert_equals(target.offsetHeight, 300 + 2);
// Change the `height` of the IFRAME content to `100%`.
target.contentWindow.postMessage({ name: 'height100p' }, '*');
}));
window.addEventListener('message', t.step_func(async (e) => {
if (e.data.name === 'height100pDone') {
// The `height: 100%` for the `requestResize()` should compute
// using the original ICB size.
await waitForAtLeastOneFrame();
assert_equals(target.offsetHeight, 150 + 2);
t.done();
}
}));
}, "IFRAME content should use the initial ICB to measure the natural size");
</script>