<div id="console"></div>
<script>
  if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.dumpResourceResponseMIMETypes();
  }

  function fail(str) {
    var element = document.createElement("p");
    element.innerHTML = str;
    document.getElementById("console").appendChild(element);
  }

  var bogus_script = document.createElement("script");
  bogus_script.type = "bogus";
  bogus_script.src = "shouldnotexecute.js";
  bogus_script.addEventListener("beforeload", function() { fail('beforeload called on dynamic script that won\'t be loaded'); }, false);
  document.getElementsByTagName("head")[0].appendChild(bogus_script);
</script>
<script type="fake" src="shouldnotexecute.js"></script>
<script type="dummy" src="shouldnotexecute.js" onbeforeload="fail('beforeload called on parser inserted script that won\'t be loaded');"></script>
Unknown script types should not be loaded nor executed. If this test fails, an extra line will appear in the output with the script's MIME type.
