sandboxed-iframe.html (1010B)
1 <!doctype html> 2 <meta charset="utf-8"> 3 <title>FileAPI Test: Verify behavior of Blob URL in unique origins</title> 4 <meta name="timeout" content="long"> 5 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharnessreport.js"></script> 7 8 <iframe id="sandboxed-iframe" sandbox="allow-scripts"></iframe> 9 10 <script> 11 12 const iframe_scripts = [ 13 'resources/fetch-tests.js', 14 'url-format.any.js', 15 'url-in-tags.window.js', 16 'url-with-xhr.any.js', 17 'url-with-fetch.any.js', 18 ]; 19 20 let html = '<!doctype html>\n<meta charset="utf-8">\n<body>\n'; 21 html = html + '<script src="/resources/testharness.js"></' + 'script>\n'; 22 html = html + '<script>setup({"explicit_timeout": true});</' + 'script>\n'; 23 for (const script of iframe_scripts) 24 html = html + '<script src="' + script + '"></' + 'script>\n'; 25 26 const frame = document.querySelector('#sandboxed-iframe'); 27 frame.setAttribute('srcdoc', html); 28 frame.setAttribute('style', 'display:none;'); 29 30 fetch_tests_from_window(frame.contentWindow); 31 32 </script>