blob: 927aac50b3207586981460113b70d3b24b8f4927 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
<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>
|