Chromium Code Reviews| Index: chrome/test/data/nacl/pnacl_url_loader/pnacl_url_loader.html |
| diff --git a/chrome/test/data/nacl/pnacl_url_loader/pnacl_url_loader.html b/chrome/test/data/nacl/pnacl_url_loader/pnacl_url_loader.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ef6347859b57668921237dbb02b167ae374b7f58 |
| --- /dev/null |
| +++ b/chrome/test/data/nacl/pnacl_url_loader/pnacl_url_loader.html |
| @@ -0,0 +1,19 @@ |
| +<script> |
| +window.addEventListener("load", function() { |
|
nhiroki
2016/02/09 04:48:42
nit: single-quotes (') are preferred to double-quo
horo
2016/02/10 06:09:22
Done.
|
| + init(); |
| + }, false); |
| + |
| +function init() { |
| + var embed = document.createElement("embed"); |
| + embed.addEventListener("message", function(message) { |
| + window.domAutomationController.setAutomationId(0); |
| + window.domAutomationController.send(message.data); |
| + }, false); |
| + embed.addEventListener("load", function() { |
| + embed.postMessage(location.hash.substr(1)); |
| + }, false); |
| + embed.src = "pnacl_url_loader.nmf"; |
| + embed.type = "application/x-pnacl"; |
| + document.body.appendChild(embed); |
| +} |
| +</script> |