responsive-iframe-request-resize-error.tentative.html (947B)
1 <!doctype HTML> 2 <title>Test that calling `window.requestResize()` throws DOM NotAllowedError.</title> 3 <link rel="author" href="mailto:kojii@chromium.org"> 4 <link rel="help" href="https://drafts.csswg.org/css-sizing/"> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 <body> 8 <script> 9 test(t => { 10 assert_throws_dom('NotAllowedError', () => window.requestResize()); 11 }, "`window.requestResize()` from the parent frame throws DOM NotAllowedError"); 12 13 async_test(t => { 14 window.addEventListener('message', t.step_func_done(e => { 15 assert_equals(e.data.name, 'NotAllowedError'); 16 }, {once: true})); 17 const iframe = document.createElement('iframe'); 18 iframe.src = 'resources/iframe-contents-request-resize-error.html'; 19 document.body.appendChild(iframe); 20 }, "`window.requestResize()` from iframe without `responsive-embedded-sizing` meta tag throws DOM NotAllowedError"); 21 </script> 22 </body>