parse-from-string-sandboxed-iframe.https.html (797B)
1 <!DOCTYPE html> 2 <title>Test HTML parsing a fencedframe element in a sandboxed iframe</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <script src="/common/utils.js"></script> 6 <script src="/common/dispatcher/dispatcher.js"></script> 7 <script src="resources/utils.js"></script> 8 9 <body> 10 <script> 11 promise_test(async(t) => { 12 const iframe = document.createElement("iframe"); 13 iframe.sandbox = "allow-scripts allow-same-origin"; 14 document.body.appendChild(iframe); 15 const parser = new iframe.contentWindow.DOMParser(); 16 const parsed_value = 17 parser.parseFromString("<fencedframe></fencedframe>", 'text/html'); 18 }, 'Parsing HTML with a fencedframe element in a sandboxed iframe works ' + 19 'without crashing.'); 20 </script> 21 </body>