| <!DOCTYPE html> |
| <meta charset="utf-8"> |
| <title>Dynamic import triggered from inactive context should not crash</title> |
| <script src="/resources/testharness.js"></script> |
| <script src="/resources/testharnessreport.js"></script> |
| |
| <div id="container"> |
| <iframe></iframe> |
| </div> |
| |
| <script> |
| test(() => { |
| const iframe = document.querySelector('iframe'); |
| const otherWindow = iframe.contentWindow; |
| iframe.remove(); |
| |
| // Below should not crash |
| otherWindow.eval(`import('foobar');`); |
| }, 'dynamic import from inactive context should not crash'); |
| </script> |