blob: 927aac50b3207586981460113b70d3b24b8f4927 [file] [log] [blame]
<script>
if (window.testRunner)
testRunner.dumpAsText();
</script>
<script for="body" event="onload()">
alert("This script should NOT be run because 'for=body' and 'event=onload()' should not be run.");
</script>
<script for="window" event="onload">
alert("This script SHOULD be run because it has both 'for=window' and 'event=onload'.");
</script>
<script for="window" event="onload()">
alert("This script SHOULD be run because it has both 'for=window' and 'event=onload()'.");
</script>
<script for="FOO">
alert("This script SHOULD be run because it only has a for attribute.");
</script>
<script event="BAR">
alert("This script SHOULD be run because it only has an event attribute.");
</script>
<script for=" window " event="onload()">
alert("This script SHOULD be run because it has both 'for= window ' and 'event=onload()' and the whitespace should be irrelevant.");
</script>
<script for="window" event=" onload() ">
alert("This script SHOULD be run because it has both 'for=window' and 'event= onload() ' and the whitespace should be irrelevant.");
</script>
<script for=" window " event=" onload() ">
alert("This script SHOULD be run because it has both 'for= window ' and 'event= onload() ' and the whitespace should be irrelevant.");
</script>
<script for=" window " event="onload">
alert("This script SHOULD be run because it has both 'for= window ' and 'event=onload' and the whitespace should be irrelevant.");
</script>
<script for="window" event=" onload ">
alert("This script SHOULD be run because it has both 'for=window' and 'event= onload ' and the whitespace should be irrelevant.");
</script>
<script for=" window " event=" onload ">
alert("This script SHOULD be run because it has both 'for= window ' and 'event= onload ' and the whitespace should be irrelevant.");
</script>