chromium/third_party/blink/web_tests/http/tests/security/resources/cross-origin-iframe-for-shared-worker.html

<html>
<head>
<script>
try {
	var worker = new SharedWorker('shared-worker.js', 'SharedWorker');
	worker.port.onmessage = function(event) {
		document.write(event.data);
		document.close();
		window.parent.postMessage(event.data, '*');
	}
	worker.port.start();
	worker.port.postMessage('Connection test');
} catch (exception) {
	window.parent.postMessage(exception.name, '*');
	document.write(exception.name);
	document.close();
}
</script>
</head>
<body>
</body>
</html>