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
49
50
51
52
53
54 package org.w3c.tidy;
55
56 /**
57 * Testcase for Tidy resolved bugs (Tidy warning and errors).
58 * <p>
59 * see <code>http://sourceforge.net/support/tracker.php?aid=(item number)</code>
60 * </p>
61 * @author fgiust
62 * @version $Revision: 779 $ ($Author: fgiust $)
63 */
64 public class TidyWarningBugsTest extends TidyTestCase
65 {
66
67 /**
68 * Instantiate a new Test case.
69 * @param name test name
70 */
71 public TidyWarningBugsTest(String name)
72 {
73 super(name);
74 }
75
76 /**
77 * test for Tidy [427810] : Proprietary elements not reported as err.
78 * @throws Exception any exception generated during the test
79 */
80 public void test427810() throws Exception
81 {
82
83
84
85
86
87
88
89 executeTidyTest("427810.html");
90 assertWarnings(4);
91 }
92
93 /**
94 * test for Tidy [431874] : Nested anchors not detected.
95 * @throws Exception any exception generated during the test
96 */
97 public void test431874() throws Exception
98 {
99 executeTidyTest("431874.html");
100 assertWarnings(2);
101 }
102
103 /**
104 * test for Tidy [427827] : Nested anchor elements allowed.
105 * @throws Exception any exception generated during the test
106 */
107 public void test427827() throws Exception
108 {
109
110
111
112
113 executeTidyTest("427827.html");
114 assertWarnings(2);
115 }
116
117 /**
118 * test for Tidy [427834] : Warning given for newline in DOCTYPE.
119 * @throws Exception any exception generated during the test
120 */
121 public void test427834() throws Exception
122 {
123
124 executeTidyTest("427834.html");
125 assertNoWarnings();
126 }
127
128 /**
129 * test for Tidy [427844] : End tags containing whitespace warning.
130 * @throws Exception any exception generated during the test
131 */
132 public void test427844() throws Exception
133 {
134 executeTidyTest("427844.html");
135
136 assertNoWarnings();
137 }
138
139 /**
140 * test for Tidy [431719] : Spec want "HTML 3.2 Final", but everyone in the world, including Tidy, uses "HTML 3.2".
141 * So the software has to recognize both FPI's as equivalent.
142 * @throws Exception any exception generated during the test
143 */
144 public void test431719() throws Exception
145 {
146
147
148
149
150
151
152
153 executeTidyTest("431719.html");
154 assertNoWarnings();
155 }
156
157 /**
158 * test for Tidy [431883] : Given doctype reported incorrectly.
159 * @throws Exception any exception generated during the test
160 */
161 public void test431883() throws Exception
162 {
163 executeTidyTest("431883.html");
164
165 assertLogContains("Doctype given is \"-//W3C//DTD HTML 4.0");
166 }
167
168 /**
169 * test for Tidy [431956] : Well formed XSL xsl:text gives error.
170 * @throws Exception any exception generated during the test
171 */
172 public void test431956() throws Exception
173 {
174
175
176 executeTidyTest("431956.xml");
177 assertNoWarnings();
178 }
179
180 /**
181 * test for Tidy [431964] : table height="" not flagged as error.
182 * @throws Exception any exception generated during the test
183 */
184 public void test431964() throws Exception
185 {
186
187
188
189
190
191
192 executeTidyTest("431964.html");
193 assertWarnings(2);
194 }
195
196 /**
197 * test for Tidy [433021] : Identify attribute whose value is bad.
198 * @throws Exception any exception generated during the test
199 */
200 public void test433021() throws Exception
201 {
202 executeTidyTest("433021.html");
203 assertLogContains("align");
204 assertLogContains("valign");
205 assertWarnings(5);
206 }
207
208 /**
209 * test for Tidy [433607] : No warning for omitted end tag with -xml.
210 * @throws Exception any exception generated during the test
211 */
212 public void test433607() throws Exception
213 {
214
215
216
217 executeTidyTest("433607.xml");
218
219 assertWarnings(1);
220 }
221
222 /**
223 * test for Tidy [433670] : &apos not recognized as valid XML entity.
224 * @throws Exception any exception generated during the test
225 */
226 public void test433670() throws Exception
227 {
228
229 executeTidyTest("433670.xml");
230 assertNoWarnings();
231 }
232
233 /**
234 * test for Tidy [434047] : Mixed content in 4.01 Strict not allowed.
235 * @throws Exception any exception generated during the test
236 */
237 public void test434047() throws Exception
238 {
239
240
241
242
243 executeTidyTest("434047.html");
244
245 assertLogContains("HTML 4.01 Strict");
246
247 }
248
249 /**
250 * test for Tidy [434100] : Error actually reported as a warning (-xml).
251 * @throws Exception any exception generated during the test
252 */
253 public void test434100() throws Exception
254 {
255
256
257
258
259 executeTidyTest("434100.html");
260 assertErrors(1);
261 assertNoWarnings();
262 }
263
264 /**
265 * test for Tidy [435917] : <input onfocus=""> reported unknown attr.
266 * @throws Exception any exception generated during the test
267 */
268 public void test435917() throws Exception
269 {
270
271
272 executeTidyTest("435917.html");
273 assertWarnings(1);
274 }
275
276 /**
277 * test for Tidy [435917] : missing "=" in attribute confuses tidy.
278 * @throws Exception any exception generated during the test
279 */
280 public void test435917b() throws Exception
281 {
282
283
284
285
286
287 executeTidyTest("435917.html");
288 assertLogDoesntContains("null");
289 }
290
291 /**
292 * test for Tidy [435922] : Missing <form> around <input> no warning.
293 * @throws Exception any exception generated during the test
294 */
295 public void test435922() throws Exception
296 {
297
298
299
300
301
302
303
304
305 executeTidyTest("435922.html");
306 assertWarnings(4);
307 }
308
309 /**
310 * test for Tidy [438956] : Bad head-endtag reported incorrectly.
311 * @throws Exception any exception generated during the test
312 */
313 public void test438956() throws Exception
314 {
315
316
317
318
319
320
321 executeTidyTest("438956.html");
322
323 assertWarnings(2);
324 }
325
326 /**
327 * test for Tidy [446019] : <img name="foo"> allowed in XTHML-Strict.
328 * @throws Exception any exception generated during the test
329 */
330 public void test446019() throws Exception
331 {
332
333
334
335
336 executeTidyTest("446019.xhtml");
337
338 assertLogContains("XHTML 1.0 Transitional");
339 }
340
341 /**
342 * test for Tidy [450389] : Color attval check allows only black/#.
343 * @throws Exception any exception generated during the test
344 */
345 public void test450389() throws Exception
346 {
347
348
349
350
351
352
353
354
355 executeTidyTest("450389.html");
356 assertWarnings(6);
357 }
358
359 /**
360 * test for Tidy [501230] : "0" (Zero) has to be lower case.
361 * @throws Exception any exception generated during the test
362 */
363 public void test501230() throws Exception
364 {
365 executeTidyTest("501230.xhtml");
366 assertLogDoesntContains("lower case");
367 }
368
369 /**
370 * test for Tidy [501669] : width="n*" marked invalid on <COL>.
371 * @throws Exception any exception generated during the test
372 */
373 public void test501669() throws Exception
374 {
375
376
377
378
379 executeTidyTest("501669.html");
380
381 assertNoWarnings();
382 }
383
384 /**
385 * test for Tidy [516370] : Invalid ID value.
386 * @throws Exception any exception generated during the test
387 */
388 public void test516370() throws Exception
389 {
390
391
392
393
394
395
396 executeTidyTest("516370.xhtml");
397 assertWarnings(5);
398 assertLogContains("XML ID syntax");
399 }
400
401 /**
402 * test for Tidy [517528] : Parser complains about xml:lang.
403 * @throws Exception any exception generated during the test
404 */
405 public void test517528() throws Exception
406 {
407 executeTidyTest("517528.html");
408
409 assertNoWarnings();
410 }
411
412 /**
413 * test for Tidy [525081] : frameset rows attr. not recognized.
414 * @throws Exception any exception generated during the test
415 */
416 public void test525081() throws Exception
417 {
418
419
420
421
422 executeTidyTest("525081.html");
423 assertNoWarnings();
424 }
425
426 /**
427 * test for Tidy [538536] : Extra endtags not detected.
428 * @throws Exception any exception generated during the test
429 */
430 public void test538536() throws Exception
431 {
432
433
434
435
436
437
438 executeTidyTest("538536.html");
439 assertNoErrors();
440 assertWarnings(2);
441 }
442
443 /**
444 * test for Tidy [545067] : Implicit closing of head broken.
445 * @throws Exception any exception generated during the test
446 */
447 public void test545067() throws Exception
448 {
449
450
451
452
453
454
455 executeTidyTest("545067.html");
456 assertLogDoesntContains("<head>");
457 }
458
459 /**
460 * test for Tidy [552861] : <td with=""> not recognized.
461 * @throws Exception any exception generated during the test
462 */
463 public void test552861() throws Exception
464 {
465 executeTidyTest("552861.html");
466
467 assertWarnings(1);
468 }
469
470 /**
471 * test for Tidy [553414] : XHTML strict accept '_target' attribute.
472 * @throws Exception any exception generated during the test
473 */
474 public void test553414() throws Exception
475 {
476 executeTidyTest("553414.html");
477 assertLogContains("given is \"-//W3C//DTD XHTML 1.0 Strict//EN\"");
478 assertLogContains("looks like XHTML 1.0 Transitional");
479 assertWarnings(1);
480 }
481
482 /**
483 * test for Tidy [553468] : Doesn't warn about <u> in XHTML strict.
484 * @throws Exception any exception generated during the test
485 */
486 public void test553468() throws Exception
487 {
488
489
490
491
492
493 executeTidyTest("553468.xhtml");
494
495 assertLogContains("XHTML 1.0 Transitional");
496 }
497
498 /**
499 * test for Tidy [559774] : tidy version rejects all id values.
500 * @throws Exception any exception generated during the test
501 */
502 public void test559774() throws Exception
503 {
504 executeTidyTest("559774.html");
505 assertNoWarnings();
506 }
507
508 /**
509 * test for Tidy [706260] : size not accepted for input.
510 * @throws Exception any exception generated during the test
511 */
512 public void test706260() throws Exception
513 {
514
515
516
517
518 executeTidyTest("706260.html");
519 assertNoWarnings();
520 }
521
522 }