mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-24 19:37:15 +00:00
Bug 1529203 - Add tests to check that the module map is cleared when using document.open r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D21719
This commit is contained in:
parent
97875bccdd
commit
ab181a2867
17
dom/base/crashtests/1529203-1.html
Normal file
17
dom/base/crashtests/1529203-1.html
Normal file
@ -0,0 +1,17 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<iframe></iframe>
|
||||
<script>
|
||||
function doIt() {
|
||||
var doc = document.querySelector("iframe").contentDocument;
|
||||
doc.open();
|
||||
doc.write('<script>import("data:text/javascript,")</' + 'script>');
|
||||
doc.close();
|
||||
}
|
||||
doIt();
|
||||
setTimeout(() => {
|
||||
doIt();
|
||||
document.documentElement.removeAttribute("class");
|
||||
}, 100);
|
||||
</script>
|
||||
</html>
|
21
dom/base/crashtests/1529203-2.html
Normal file
21
dom/base/crashtests/1529203-2.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<script>
|
||||
var win = null;
|
||||
function doIt() {
|
||||
if (win === null) {
|
||||
win = window.open();
|
||||
}
|
||||
var doc = win.document;
|
||||
doc.open();
|
||||
doc.write('<script>import("data:text/javascript,")</' + 'script>');
|
||||
doc.close();
|
||||
}
|
||||
doIt();
|
||||
setTimeout(() => {
|
||||
doIt();
|
||||
win.close();
|
||||
document.documentElement.removeAttribute("class");
|
||||
}, 100);
|
||||
</script>
|
||||
</html>
|
21
dom/base/crashtests/1529203-3.html
Normal file
21
dom/base/crashtests/1529203-3.html
Normal file
@ -0,0 +1,21 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html class="reftest-wait">
|
||||
<script>
|
||||
var win;
|
||||
function doIt() {
|
||||
if (!win) {
|
||||
win = window.open();
|
||||
}
|
||||
var doc = win.document;
|
||||
doc.open();
|
||||
doc.write('<script type="module" src="./module-with-syntax-error.js"></' + 'script>');
|
||||
doc.close();
|
||||
}
|
||||
doIt()
|
||||
setTimeout(() => {
|
||||
doIt();
|
||||
win.close();
|
||||
document.documentElement.removeAttribute("class");
|
||||
}, 100);
|
||||
</script>
|
||||
</html>
|
@ -239,6 +239,9 @@ load 1505875.html
|
||||
load 1508845.html
|
||||
load 1516289.html
|
||||
load 1516560.html
|
||||
pref(javascript.options.dynamicImport,true) load 1529203-1.html
|
||||
skip-if(Android) pref(javascript.options.dynamicImport,true) pref(dom.disable_open_during_load,false) pref(browser.link.open_newwindow,2) load 1529203-2.html
|
||||
skip-if(Android) pref(dom.disable_open_during_load,false) pref(browser.link.open_newwindow,2) load 1529203-3.html
|
||||
load 1528675.html
|
||||
load 1566310.html
|
||||
skip-if(Android) pref(dom.disable_open_during_load,false) pref(browser.link.open_newwindow,2) load 1588259.html
|
||||
|
1
dom/base/crashtests/module-with-syntax-error.js
Normal file
1
dom/base/crashtests/module-with-syntax-error.js
Normal file
@ -0,0 +1 @@
|
||||
,
|
Loading…
x
Reference in New Issue
Block a user