Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 2 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /css/css-sizing/responsive-iframe/responsive-iframe-request-resize-error.tentative.html - WPT Dashboard Interop Dashboard
<!doctype HTML>
<title>Test that calling `window.requestResize()` throws DOM NotAllowedError.</title>
<link rel="author" href="mailto:kojii@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
<script>
test(t => {
assert_throws_dom('NotAllowedError', () => window.requestResize());
}, "`window.requestResize()` from the parent frame throws DOM NotAllowedError");
async_test(t => {
window.addEventListener('message', t.step_func_done(e => {
assert_equals(e.data.name, 'NotAllowedError');
}, {once: true}));
const iframe = document.createElement('iframe');
iframe.src = 'resources/iframe-contents-request-resize-error.html';
document.body.appendChild(iframe);
}, "`window.requestResize()` from iframe without `responsive-embedded-sizing` meta tag throws DOM NotAllowedError");
</script>
</body>