| testRunner.waitUntilDone(); |
| testRunner.setCanOpenWindows(); |
| if (event.data !== "null") { |
| document.body.innerHTML = "FAIL, got " + event.data + " with count " + count; |
| window.clearTimeout(timer); |
| document.body.innerHTML = "PASS"; |
| window.clearTimeout(timer); |
| const timer = setTimeout(() => { |
| document.body.innerHTML = "TIMEOUT"; |
| <iframe src="data:text/html,<script>console.log('data URL frame loaded'); const blob = new Blob(['<'+ 'script>console.log(\'blob popup loaded\' + location.origin); onload = () => window.opener.postMessage(location.origin, \'*\'); console.log(\'blob popup message posted\'); onmessage = () => window.opener.postMessage(location.origin, \'*\'); <' + '/script>'], {type: 'text/html'}); const blobURL = URL.createObjectURL(blob); const popup = window.open(blobURL); onmessage = (event) => { popup.postMessage('check', '*'); parent.postMessage(event.data, '*'); URL.revokeObjectURL(blobURL); onmessage = (event) => { parent.postMessage(event.data, '*'); popup.close(); }; }; console.log('blob popup opened'); </script>"></iframe> |