1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/parser/htmlparser/tests/mochitest/html5lib_tree_construction/tricky01.dat Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,334 @@ 1.4 +#data 1.5 +<b><p>Bold </b> Not bold</p> 1.6 +Also not bold. 1.7 +#errors 1.8 +(1,3): expected-doctype-but-got-start-tag 1.9 +(1,15): adoption-agency-1.3 1.10 +#document 1.11 +| <html> 1.12 +| <head> 1.13 +| <body> 1.14 +| <b> 1.15 +| <p> 1.16 +| <b> 1.17 +| "Bold " 1.18 +| " Not bold" 1.19 +| " 1.20 +Also not bold." 1.21 + 1.22 +#data 1.23 +<html> 1.24 +<font color=red><i>Italic and Red<p>Italic and Red </font> Just italic.</p> Italic only.</i> Plain 1.25 +<p>I should not be red. <font color=red>Red. <i>Italic and red.</p> 1.26 +<p>Italic and red. </i> Red.</font> I should not be red.</p> 1.27 +<b>Bold <i>Bold and italic</b> Only Italic </i> Plain 1.28 +#errors 1.29 +(1,6): expected-doctype-but-got-start-tag 1.30 +(2,58): adoption-agency-1.3 1.31 +(3,67): unexpected-end-tag 1.32 +(4,23): adoption-agency-1.3 1.33 +(4,35): adoption-agency-1.3 1.34 +(5,30): adoption-agency-1.3 1.35 +#document 1.36 +| <html> 1.37 +| <head> 1.38 +| <body> 1.39 +| <font> 1.40 +| color="red" 1.41 +| <i> 1.42 +| "Italic and Red" 1.43 +| <i> 1.44 +| <p> 1.45 +| <font> 1.46 +| color="red" 1.47 +| "Italic and Red " 1.48 +| " Just italic." 1.49 +| " Italic only." 1.50 +| " Plain 1.51 +" 1.52 +| <p> 1.53 +| "I should not be red. " 1.54 +| <font> 1.55 +| color="red" 1.56 +| "Red. " 1.57 +| <i> 1.58 +| "Italic and red." 1.59 +| <font> 1.60 +| color="red" 1.61 +| <i> 1.62 +| " 1.63 +" 1.64 +| <p> 1.65 +| <font> 1.66 +| color="red" 1.67 +| <i> 1.68 +| "Italic and red. " 1.69 +| " Red." 1.70 +| " I should not be red." 1.71 +| " 1.72 +" 1.73 +| <b> 1.74 +| "Bold " 1.75 +| <i> 1.76 +| "Bold and italic" 1.77 +| <i> 1.78 +| " Only Italic " 1.79 +| " Plain" 1.80 + 1.81 +#data 1.82 +<html><body> 1.83 +<p><font size="7">First paragraph.</p> 1.84 +<p>Second paragraph.</p></font> 1.85 +<b><p><i>Bold and Italic</b> Italic</p> 1.86 +#errors 1.87 +(1,6): expected-doctype-but-got-start-tag 1.88 +(2,38): unexpected-end-tag 1.89 +(4,28): adoption-agency-1.3 1.90 +(4,28): adoption-agency-1.3 1.91 +(4,39): unexpected-end-tag 1.92 +#document 1.93 +| <html> 1.94 +| <head> 1.95 +| <body> 1.96 +| " 1.97 +" 1.98 +| <p> 1.99 +| <font> 1.100 +| size="7" 1.101 +| "First paragraph." 1.102 +| <font> 1.103 +| size="7" 1.104 +| " 1.105 +" 1.106 +| <p> 1.107 +| "Second paragraph." 1.108 +| " 1.109 +" 1.110 +| <b> 1.111 +| <p> 1.112 +| <b> 1.113 +| <i> 1.114 +| "Bold and Italic" 1.115 +| <i> 1.116 +| " Italic" 1.117 + 1.118 +#data 1.119 +<html> 1.120 +<dl> 1.121 +<dt><b>Boo 1.122 +<dd>Goo? 1.123 +</dl> 1.124 +</html> 1.125 +#errors 1.126 +(1,6): expected-doctype-but-got-start-tag 1.127 +(4,4): end-tag-too-early 1.128 +(5,5): end-tag-too-early 1.129 +(6,7): expected-one-end-tag-but-got-another 1.130 +#document 1.131 +| <html> 1.132 +| <head> 1.133 +| <body> 1.134 +| <dl> 1.135 +| " 1.136 +" 1.137 +| <dt> 1.138 +| <b> 1.139 +| "Boo 1.140 +" 1.141 +| <dd> 1.142 +| <b> 1.143 +| "Goo? 1.144 +" 1.145 +| <b> 1.146 +| " 1.147 +" 1.148 + 1.149 +#data 1.150 +<html><body> 1.151 +<label><a><div>Hello<div>World</div></a></label> 1.152 +</body></html> 1.153 +#errors 1.154 +(1,6): expected-doctype-but-got-start-tag 1.155 +(2,40): adoption-agency-1.3 1.156 +(2,48): unexpected-end-tag 1.157 +(3,7): expected-one-end-tag-but-got-another 1.158 +#document 1.159 +| <html> 1.160 +| <head> 1.161 +| <body> 1.162 +| " 1.163 +" 1.164 +| <label> 1.165 +| <a> 1.166 +| <div> 1.167 +| <a> 1.168 +| "Hello" 1.169 +| <div> 1.170 +| "World" 1.171 +| " 1.172 +" 1.173 + 1.174 +#data 1.175 +<table><center> <font>a</center> <img> <tr><td> </td> </tr> </table> 1.176 +#errors 1.177 +(1,7): expected-doctype-but-got-start-tag 1.178 +(1,15): foster-parenting-start-tag 1.179 +(1,16): foster-parenting-character 1.180 +(1,22): foster-parenting-start-tag 1.181 +(1,23): foster-parenting-character 1.182 +(1,32): foster-parenting-end-tag 1.183 +(1,32): end-tag-too-early 1.184 +(1,33): foster-parenting-character 1.185 +(1,38): foster-parenting-start-tag 1.186 +#document 1.187 +| <html> 1.188 +| <head> 1.189 +| <body> 1.190 +| <center> 1.191 +| " " 1.192 +| <font> 1.193 +| "a" 1.194 +| <font> 1.195 +| <img> 1.196 +| " " 1.197 +| <table> 1.198 +| " " 1.199 +| <tbody> 1.200 +| <tr> 1.201 +| <td> 1.202 +| " " 1.203 +| " " 1.204 +| " " 1.205 + 1.206 +#data 1.207 +<table><tr><p><a><p>You should see this text. 1.208 +#errors 1.209 +(1,7): expected-doctype-but-got-start-tag 1.210 +(1,14): unexpected-start-tag-implies-table-voodoo 1.211 +(1,17): unexpected-start-tag-implies-table-voodoo 1.212 +(1,20): unexpected-start-tag-implies-table-voodoo 1.213 +(1,20): closing-non-current-p-element 1.214 +(1,21): foster-parenting-character 1.215 +(1,22): foster-parenting-character 1.216 +(1,23): foster-parenting-character 1.217 +(1,24): foster-parenting-character 1.218 +(1,25): foster-parenting-character 1.219 +(1,26): foster-parenting-character 1.220 +(1,27): foster-parenting-character 1.221 +(1,28): foster-parenting-character 1.222 +(1,29): foster-parenting-character 1.223 +(1,30): foster-parenting-character 1.224 +(1,31): foster-parenting-character 1.225 +(1,32): foster-parenting-character 1.226 +(1,33): foster-parenting-character 1.227 +(1,34): foster-parenting-character 1.228 +(1,35): foster-parenting-character 1.229 +(1,36): foster-parenting-character 1.230 +(1,37): foster-parenting-character 1.231 +(1,38): foster-parenting-character 1.232 +(1,39): foster-parenting-character 1.233 +(1,40): foster-parenting-character 1.234 +(1,41): foster-parenting-character 1.235 +(1,42): foster-parenting-character 1.236 +(1,43): foster-parenting-character 1.237 +(1,44): foster-parenting-character 1.238 +(1,45): foster-parenting-character 1.239 +(1,45): eof-in-table 1.240 +#document 1.241 +| <html> 1.242 +| <head> 1.243 +| <body> 1.244 +| <p> 1.245 +| <a> 1.246 +| <p> 1.247 +| <a> 1.248 +| "You should see this text." 1.249 +| <table> 1.250 +| <tbody> 1.251 +| <tr> 1.252 + 1.253 +#data 1.254 +<TABLE> 1.255 +<TR> 1.256 +<CENTER><CENTER><TD></TD></TR><TR> 1.257 +<FONT> 1.258 +<TABLE><tr></tr></TABLE> 1.259 +</P> 1.260 +<a></font><font></a> 1.261 +This page contains an insanely badly-nested tag sequence. 1.262 +#errors 1.263 +(1,7): expected-doctype-but-got-start-tag 1.264 +(3,8): unexpected-start-tag-implies-table-voodoo 1.265 +(3,16): unexpected-start-tag-implies-table-voodoo 1.266 +(4,6): unexpected-start-tag-implies-table-voodoo 1.267 +(5,7): unexpected-start-tag-implies-end-tag 1.268 +(7,10): adoption-agency-1.3 1.269 +(7,20): adoption-agency-1.3 1.270 +(8,57): expected-closing-tag-but-got-eof 1.271 +#document 1.272 +| <html> 1.273 +| <head> 1.274 +| <body> 1.275 +| <center> 1.276 +| <center> 1.277 +| <font> 1.278 +| " 1.279 +" 1.280 +| <table> 1.281 +| " 1.282 +" 1.283 +| <tbody> 1.284 +| <tr> 1.285 +| " 1.286 +" 1.287 +| <td> 1.288 +| <tr> 1.289 +| " 1.290 +" 1.291 +| <table> 1.292 +| <tbody> 1.293 +| <tr> 1.294 +| <font> 1.295 +| " 1.296 +" 1.297 +| <p> 1.298 +| " 1.299 +" 1.300 +| <a> 1.301 +| <a> 1.302 +| <font> 1.303 +| <font> 1.304 +| " 1.305 +This page contains an insanely badly-nested tag sequence." 1.306 + 1.307 +#data 1.308 +<html> 1.309 +<body> 1.310 +<b><nobr><div>This text is in a div inside a nobr</nobr>More text that should not be in the nobr, i.e., the 1.311 +nobr should have closed the div inside it implicitly. </b><pre>A pre tag outside everything else.</pre> 1.312 +</body> 1.313 +</html> 1.314 +#errors 1.315 +(1,6): expected-doctype-but-got-start-tag 1.316 +(3,56): adoption-agency-1.3 1.317 +(4,58): adoption-agency-1.3 1.318 +(5,7): expected-one-end-tag-but-got-another 1.319 +#document 1.320 +| <html> 1.321 +| <head> 1.322 +| <body> 1.323 +| " 1.324 +" 1.325 +| <b> 1.326 +| <nobr> 1.327 +| <div> 1.328 +| <b> 1.329 +| <nobr> 1.330 +| "This text is in a div inside a nobr" 1.331 +| "More text that should not be in the nobr, i.e., the 1.332 +nobr should have closed the div inside it implicitly. " 1.333 +| <pre> 1.334 +| "A pre tag outside everything else." 1.335 +| " 1.336 + 1.337 +"