Skip to content

Commit 8db03d0

Browse files
gsnedderszcorpan
authored andcommitted
Add some tests for <noscript> in scripting disabled case (html5lib#76)
1 parent 88b8ee9 commit 8db03d0

File tree

1 file changed

+237
-0
lines changed

1 file changed

+237
-0
lines changed

tree-construction/noscript01.dat

+237
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
#data
2+
<head><noscript><!doctype html><!--foo--></noscript>
3+
#script-off
4+
#errors
5+
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
6+
Line: 1 Col: 31 Unexpected DOCTYPE. Ignored.
7+
#document
8+
| <html>
9+
| <head>
10+
| <noscript>
11+
| <!-- foo -->
12+
| <body>
13+
14+
#data
15+
<head><noscript><html class="foo"><!--foo--></noscript>
16+
#script-off
17+
#errors
18+
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
19+
Line: 1 Col: 34 html needs to be the first start tag.
20+
#document
21+
| <html>
22+
| class="foo"
23+
| <head>
24+
| <noscript>
25+
| <!-- foo -->
26+
| <body>
27+
28+
#data
29+
<head><noscript></noscript>
30+
#script-off
31+
#errors
32+
(1,6): expected-doctype-but-got-tag
33+
#document
34+
| <html>
35+
| <head>
36+
| <noscript>
37+
| <body>
38+
39+
#data
40+
<head><noscript> </noscript>
41+
#script-off
42+
#errors
43+
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
44+
#document
45+
| <html>
46+
| <head>
47+
| <noscript>
48+
| " "
49+
| <body>
50+
51+
#data
52+
<head><noscript><!--foo--></noscript>
53+
#script-off
54+
#errors
55+
(1,6): expected-doctype-but-got-tag
56+
#document
57+
| <html>
58+
| <head>
59+
| <noscript>
60+
| <!-- foo -->
61+
| <body>
62+
63+
#data
64+
<head><noscript><basefont><!--foo--></noscript>
65+
#script-off
66+
#errors
67+
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
68+
#document
69+
| <html>
70+
| <head>
71+
| <noscript>
72+
| <basefont>
73+
| <!-- foo -->
74+
| <body>
75+
76+
#data
77+
<head><noscript><bgsound><!--foo--></noscript>
78+
#script-off
79+
#errors
80+
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
81+
#document
82+
| <html>
83+
| <head>
84+
| <noscript>
85+
| <bgsound>
86+
| <!-- foo -->
87+
| <body>
88+
89+
#data
90+
<head><noscript><link><!--foo--></noscript>
91+
#script-off
92+
#errors
93+
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
94+
#document
95+
| <html>
96+
| <head>
97+
| <noscript>
98+
| <link>
99+
| <!-- foo -->
100+
| <body>
101+
102+
#data
103+
<head><noscript><meta><!--foo--></noscript>
104+
#script-off
105+
#errors
106+
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
107+
#document
108+
| <html>
109+
| <head>
110+
| <noscript>
111+
| <meta>
112+
| <!-- foo -->
113+
| <body>
114+
115+
#data
116+
<head><noscript><noframes>XXX</noscript></noframes></noscript>
117+
#script-off
118+
#errors
119+
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
120+
#document
121+
| <html>
122+
| <head>
123+
| <noscript>
124+
| <noframes>
125+
| "XXX</noscript>"
126+
| <body>
127+
128+
#data
129+
<head><noscript><style>XXX</style></noscript>
130+
#script-off
131+
#errors
132+
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
133+
#document
134+
| <html>
135+
| <head>
136+
| <noscript>
137+
| <style>
138+
| "XXX"
139+
| <body>
140+
141+
#data
142+
<head><noscript></br><!--foo--></noscript>
143+
#script-off
144+
#errors
145+
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
146+
Line: 1 Col: 21 Element br not allowed in a inhead-noscript context
147+
Line: 1 Col: 21 Unexpected end tag (br). Treated as br element.
148+
Line: 1 Col: 42 Unexpected end tag (noscript). Ignored.
149+
#document
150+
| <html>
151+
| <head>
152+
| <noscript>
153+
| <body>
154+
| <br>
155+
| <!-- foo -->
156+
157+
#data
158+
<head><noscript><head class="foo"><!--foo--></noscript>
159+
#script-off
160+
#errors
161+
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
162+
Line: 1 Col: 34 Unexpected start tag (head).
163+
#document
164+
| <html>
165+
| <head>
166+
| <noscript>
167+
| <!-- foo -->
168+
| <body>
169+
170+
#data
171+
<head><noscript><noscript class="foo"><!--foo--></noscript>
172+
#script-off
173+
#errors
174+
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
175+
Line: 1 Col: 34 Unexpected start tag (noscript).
176+
#document
177+
| <html>
178+
| <head>
179+
| <noscript>
180+
| <!-- foo -->
181+
| <body>
182+
183+
#data
184+
<head><noscript></p><!--foo--></noscript>
185+
#script-off
186+
#errors
187+
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
188+
Line: 1 Col: 20 Unexpected end tag (p). Ignored.
189+
#document
190+
| <html>
191+
| <head>
192+
| <noscript>
193+
| <!-- foo -->
194+
| <body>
195+
196+
#data
197+
<head><noscript><p><!--foo--></noscript>
198+
#script-off
199+
#errors
200+
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
201+
Line: 1 Col: 19 Element p not allowed in a inhead-noscript context
202+
Line: 1 Col: 40 Unexpected end tag (noscript). Ignored.
203+
#document
204+
| <html>
205+
| <head>
206+
| <noscript>
207+
| <body>
208+
| <p>
209+
| <!-- foo -->
210+
211+
#data
212+
<head><noscript>XXX<!--foo--></noscript></head>
213+
#script-off
214+
#errors
215+
Line: 1 Col: 6 Unexpected start tag (head). Expected DOCTYPE.
216+
Line: 1 Col: 19 Unexpected non-space character. Expected inhead-noscript content
217+
Line: 1 Col: 30 Unexpected end tag (noscript). Ignored.
218+
Line: 1 Col: 37 Unexpected end tag (head). Ignored.
219+
#document
220+
| <html>
221+
| <head>
222+
| <noscript>
223+
| <body>
224+
| "XXX"
225+
| <!-- foo -->
226+
227+
#data
228+
<head><noscript>
229+
#script-off
230+
#errors
231+
(1,6): expected-doctype-but-got-tag
232+
(1,6): eof-in-head-noscript
233+
#document
234+
| <html>
235+
| <head>
236+
| <noscript>
237+
| <body>

0 commit comments

Comments
 (0)