5fd32caed2598a77bb62232586f5b08f974abd0e
[WebKit-https.git] / LayoutTests / fast / tokenizer / 004.html
1 <html>
2 <body>
3 <h3>Variations on type attribute of script tag</h3>
4 <h4>These scripts should execute</h4>
5 <ol>
6         <li>no type attribute <script>document.write("***");</script></li>
7         <li>empty string <script type="">document.write("***");</script></li>
8         <li>text/javascript <script type="text/javascript">document.write("***");</script></li>
9         <li>text/JAVASCRIPT <script type="text/JAVASCRIPT">document.write("***");</script></li>
10         <li>TEXT/JAVASCRIPT <script type="TEXT/JAVASCRIPT">document.write("***");</script></li>
11         <li>'text/javascript ' <script type="text/javascript ">document.write("***");</script></li>
12         <li>' text/javascript ' <script type=" text/javascript ">document.write("***");</script></li>
13         <li>text/jscript <script type="text/jscript">document.write("***");</script></li>
14         <li>text/ecmascript <script type="text/ecmascript">document.write("***");</script></li>
15         <li>text/livescript <script type="text/livescript">document.write("***");</script></li>
16         <li>text/javascript1.0 <script type="text/javascript1.0">document.write("***");</script></li>
17         <li>text/javascript1.1 <script type="text/javascript1.1">document.write("***");</script></li>
18         <li>text/javascript1.2 <script type="text/javascript1.2">document.write("***");</script></li>
19         <li>text/javascript1.3 <script type="text/javascript1.3">document.write("***");</script></li>
20         <li>text/javascript1.4 <script type="text/javascript1.4">document.write("***");</script></li>
21         <li>text/javascript1.5 <script type="text/javascript1.5">document.write("***");</script></li>
22 </ol>
23 <h4>These scripts should not execute</h4>
24 <ol>
25         <li>one space <script type=" ">document.write("***");</script></li>
26         <li>text/ <script type="text/">document.write("***");</script></li>
27         <li>text/vbscript <script type="text/vbscript">document.write("***");</script></li>
28         <li>text/vbs <script type="text/vbs">document.write("***");</script></li>
29         <li>text/xml <script type="text/xml">document.write("***");</script></li>
30         <li>text/javascript1 <script type="text/javascript1">document.write("***");</script></li>
31         <li>text/javascript1.6 <script type="text/javascript1.6">document.write("***");</script></li>
32         <li>javascript <script type="javascript">document.write("***");</script></li>
33         <li>jscript <script type="jscript">document.write("***");</script></li>
34         <li>ecmascript <script type="ecmascript">document.write("***");</script></li>
35         <li>livescript <script type="livescript">document.write("***");</script></li>
36         <li>livescript1.1 <script type="livescript1.1">document.write("***");</script></li>
37         <li>JAVASCRIPT <script type="JAVASCRIPT">document.write("***");</script></li>
38         <li>JavaScript <script type="JavaScript">document.write("***");</script></li>
39         <li>JavaScript 1 <script type="JavaScript 1">document.write("***");</script></li>
40         <li>JavaScript 1.0 <script type="JavaScript 1.0">document.write("***");</script></li>
41         <li>JavaScript 1.1 <script type="JavaScript 1.1">document.write("***");</script></li>
42         <li>JavaScript 1.1.1 <script type="JavaScript 1.1.1">document.write("***");</script></li>
43         <li>JavaScript 1.2 <script type="JavaScript 1.2">document.write("***");</script></li>
44         <li>JavaScript 1.3 <script type="JavaScript 1.3">document.write("***");</script></li>
45         <li>JavaScript 1.4 <script type="JavaScript 1.4">document.write("***");</script></li>
46         <li>JavaScript 1.5 <script type="JavaScript 1.5">document.write("***");</script></li>
47         <li>JavaScript 1.6 <script type="JavaScript 1.6">document.write("***");</script></li>
48         <li>JavaScript 1.7 <script type="JavaScript 1.7">document.write("***");</script></li>
49         <li>JavaScript 1.8 <script type="JavaScript 1.8">document.write("***");</script></li>
50         <li>JavaScript 1.9 <script type="JavaScript 1.9">document.write("***");</script></li>
51         <li>JavaScript 2 <script type="JavaScript 2">document.write("***");</script></li>
52         <li>JavaScript 2.1 <script type="JavaScript 2.1">document.write("***");</script></li>
53         <li>JavaScript 10 <script type="JavaScript 10">document.write("***");</script></li>
54         <li>JavaScript 10.0 <script type="JavaScript 10.0">document.write("***");</script></li>
55         <li>_javascript <script type="_javascript">document.write("***");</script></li>
56         <li>javascript_ <script type="javascript_">document.write("***");</script></li>
57         <li>javascript_1.0 <script type="javascript_1.0">document.write("***");</script></li>
58         <li>javascript 1.0 x <script type="javascript 1.0 x">document.write("***");</script></li>
59         <li>JavaScript1 <script type="JavaScript1">document.write("***");</script></li>
60         <li>JavaScript1.0 <script type="JavaScript1.0">document.write("***");</script></li>
61         <li>JavaScript1.1 <script type="JavaScript1.1">document.write("***");</script></li>
62         <li>JavaScript1.2 <script type="JavaScript1.2">document.write("***");</script></li>
63         <li>JavaScript1.3 <script type="JavaScript1.3">document.write("***");</script></li>
64         <li>JavaScript1.4 <script type="JavaScript1.4">document.write("***");</script></li>
65         <li>JavaScript1.4.1 <script type="JavaScript1.4.1">document.write("***");</script></li>
66         <li>JavaScript1.5 <script type="JavaScript1.5">document.write("***");</script></li>
67         <li>JavaScript1.6 <script type="JavaScript1.6">document.write("***");</script></li>
68         <li>JavaScript1.7 <script type="JavaScript1.7">document.write("***");</script></li>
69         <li>1.0 javascript <script type="1.0 javascript">document.write("***");</script></li>
70         <li>' javascript ' <script type=" javascript ">document.write("***");</script></li>
71         <li>' javascript1.1 ' <script type=" javascript1.1 ">document.write("***");</script></li>
72         <li>'&nbsp;&nbsp;&nbsp;javascript&nbsp;&nbsp;&nbsp;' <script type="   javascript   ">document.write("***");</script></li>
73         <li>' javascript 1.0 ' <script type=" javascript 1.0 ">document.write("***");</script></li>
74         <li>' javascript&nbsp;&nbsp;1.0 ' <script type=" javascript  1.0 ">document.write("***");</script></li>
75         <li>jscript 1 <script type="jscript 1">document.write("***");</script></li>
76         <li>jscript 1.0 <script type="jscript 1.0">document.write("***");</script></li>
77         <li>ecmascript 1 <script type="ecmascript 1">document.write("***");</script></li>
78         <li>ecmascript 1.0 <script type="ecmascript 1.0">document.write("***");</script></li>
79         <li>livescript 1 <script type="livescript 1">document.write("***");</script></li>
80         <li>livescript 1.0 <script type="livescript 1.0">document.write("***");</script></li>
81         <li>' jscript&nbsp;&nbsp;1.0 ' <script type=" jscript  1.0 ">document.write("***");</script></li>
82         <li>disabled_javascript <script type="disabled_javascript">document.write("***");</script></li>
83         <li>xxxjavascriptxxx <script type="xxxjavascriptxxx">document.write("***");</script></li>
84         <li>bogus <script type="bogus">document.write("***");</script></li>
85 </ol>
86
87 <h3>Variations on language attribute of script tag</h3>
88 <h4>These scripts should execute</h4>
89 <ol>
90         <li>no language attribute <script>document.write("***");</script></li>
91         <li>empty string <script language="">document.write("***");</script></li>
92         <li>jscript <script language="jscript">document.write("***");</script></li>
93         <li>ecmascript <script language="ecmascript">document.write("***");</script></li>
94         <li>livescript <script language="livescript">document.write("***");</script></li>
95         <li>javascript <script language="javascript">document.write("***");</script></li>
96         <li>JAVASCRIPT <script language="JAVASCRIPT">document.write("***");</script></li>
97         <li>JavaScript <script language="JavaScript">document.write("***");</script></li>
98         <li>JavaScript1.0 <script language="JavaScript1.0">document.write("***");</script></li>
99         <li>JavaScript1.1 <script language="JavaScript1.1">document.write("***");</script></li>
100         <li>JavaScript1.2 <script language="JavaScript1.2">document.write("***");</script></li>
101         <li>JavaScript1.3 <script language="JavaScript1.3">document.write("***");</script></li>
102         <li>JavaScript1.4 <script language="JavaScript1.4">document.write("***");</script></li>
103         <li>JavaScript1.5 <script language="JavaScript1.5">document.write("***");</script></li>
104 </ol>
105 <h4>These scripts should not execute</h4>
106 <ol>
107         <li>one space <script language=" ">document.write("***");</script></li>
108         <li>vbscript <script language="vbscript">document.write("***");</script></li>
109         <li>livescript1.1 <script language="livescript1.1">document.write("***");</script></li>
110         <li>JavaScript 1 <script language="JavaScript 1">document.write("***");</script></li>
111         <li>JavaScript 1.0 <script language="JavaScript 1.0">document.write("***");</script></li>
112         <li>JavaScript 1.1 <script language="JavaScript 1.1">document.write("***");</script></li>
113         <li>JavaScript 1.1.1 <script language="JavaScript 1.1.1">document.write("***");</script></li>
114         <li>JavaScript 1.2 <script language="JavaScript 1.2">document.write("***");</script></li>
115         <li>JavaScript 1.3 <script language="JavaScript 1.3">document.write("***");</script></li>
116         <li>JavaScript 1.4 <script language="JavaScript 1.4">document.write("***");</script></li>
117         <li>JavaScript 1.5 <script language="JavaScript 1.5">document.write("***");</script></li>
118         <li>JavaScript 1.6 <script language="JavaScript 1.6">document.write("***");</script></li>
119         <li>JavaScript 1.7 <script language="JavaScript 1.7">document.write("***");</script></li>
120         <li>JavaScript 1.8 <script language="JavaScript 1.8">document.write("***");</script></li>
121         <li>JavaScript 1.9 <script language="JavaScript 1.9">document.write("***");</script></li>
122         <li>JavaScript 2 <script language="JavaScript 2">document.write("***");</script></li>
123         <li>JavaScript 2.1 <script language="JavaScript 2.1">document.write("***");</script></li>
124         <li>JavaScript 10 <script language="JavaScript 10">document.write("***");</script></li>
125         <li>JavaScript 10.0 <script language="JavaScript 10.0">document.write("***");</script></li>
126         <li>_javascript <script language="_javascript">document.write("***");</script></li>
127         <li>javascript_ <script language="javascript_">document.write("***");</script></li>
128         <li>javascript_1.0 <script language="javascript_1.0">document.write("***");</script></li>
129         <li>javascript 1.0 x <script language="javascript 1.0 x">document.write("***");</script></li>
130         <li>JavaScript1 <script language="JavaScript1">document.write("***");</script></li>
131         <li>JavaScript1.6 <script language="JavaScript1.6">document.write("***");</script></li>
132         <li>JavaScript1.7 <script language="JavaScript1.7">document.write("***");</script></li>
133         <li>JavaScript1.4.1 <script language="JavaScript1.4.1">document.write("***");</script></li>
134         <li>1.0 javascript <script language="1.0 javascript">document.write("***");</script></li>
135         <li>' javascript ' <script language=" javascript ">document.write("***");</script></li>
136         <li>' javascript1.1 ' <script language=" javascript1.1 ">document.write("***");</script></li>
137         <li>'&nbsp;&nbsp;&nbsp;javascript&nbsp;&nbsp;&nbsp;' <script language="   javascript   ">document.write("***");</script></li>
138         <li>' javascript 1.0 ' <script language=" javascript 1.0 ">document.write("***");</script></li>
139         <li>' javascript&nbsp;&nbsp;1.0 ' <script language=" javascript  1.0 ">document.write("***");</script></li>
140         <li>jscript 1 <script language="jscript 1">document.write("***");</script></li>
141         <li>jscript 1.0 <script language="jscript 1.0">document.write("***");</script></li>
142         <li>ecmascript 1 <script language="ecmascript 1">document.write("***");</script></li>
143         <li>ecmascript 1.0 <script language="ecmascript 1.0">document.write("***");</script></li>
144         <li>livescript 1 <script language="livescript 1">document.write("***");</script></li>
145         <li>livescript 1.0 <script language="livescript 1.0">document.write("***");</script></li>
146         <li>' jscript&nbsp;&nbsp;1.0 ' <script language=" jscript  1.0 ">document.write("***");</script></li>
147         <li>disabled_javascript <script language="disabled_javascript">document.write("***");</script></li>
148         <li>xxxjavascriptxxx <script language="xxxjavascriptxxx">document.write("***");</script></li>
149         <li>bogus <script language="bogus">document.write("***");</script></li>
150 </ol>
151
152 <h3>Variations on combined type and language attributes of script tag</h3>
153 <h4>These scripts should execute</h4>
154 <ol>
155         <li>empty string type, "javascript" language <script type="" language="javascript">document.write("***");</script></li>
156         <li>empty string language, "text/javascript" type <script type="text/javascript" language="">document.write("***");</script></li>
157         <li>"javascript" language, "text/javascript" type <script type="text/javascript" language="javascript">document.write("***");</script></li>
158         <li>"bogus" language, "text/javascript" type <script type="text/javascript" language="bogus">document.write("***");</script></li>
159         <li>"livescript" language, "text/javascript" type <script type="text/javascript" language="livescript">document.write("***");</script></li>
160         <li>"javascript1.2" language, "text/javascript" type <script type="text/javascript" language="javascript1.2">document.write("***");</script></li>
161 </ol>
162 <h4>These scripts should not execute</h4>
163 <ol>
164         <li>"javascript" language, "bogus" type <script type="bogus" language="javascript">document.write("***");</script></li>
165         <li>empty string type, "bogus" language <script type="" language="bogus">document.write("***");</script></li>
166         <li>empty string language, "bogus" type <script type="bogus" language="">document.write("***");</script></li>
167 </ol>
168 </body>
169 </html>