зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1558685 [wpt PR 17279] - [ES6 modules] Fix crash when dynamic import from an inactive browsing context, a=testonly
Automatic update from web-platform-tests [ES6 modules] Fix crash when dynamic import from an inactive browsing context Bug: 972960, 961674 Change-Id: Iff5c464dcc5227f211462f0e1b70c938fab452c2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1654370 Commit-Queue: Kouhei Ueno <kouhei@chromium.org> Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org> Reviewed-by: Yuki Shiino <yukishiino@chromium.org> Cr-Commit-Position: refs/heads/master@{#669989} -- wpt-commits: 61c3d0684043fa5e60a5b6cffc6426bd18405f4c wpt-pr: 17279
This commit is contained in:
Родитель
17b559c9a2
Коммит
75fbf734bf
|
@ -0,0 +1,20 @@
|
|||
<!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>
|
Загрузка…
Ссылка в новой задаче