parser-tests.html revision f05b935882198ccf7d81675736e3aeb089c5113a
1<!DOCTYPE HTML> 2<html> 3 <head> 4 <title>Harness</title> 5 </head> 6 <body onload="runtests()"> 7 <p>This test suite was converted from http://www.hixie.ch/tests/adhoc/html/parsing/encoding/all.html</p> 8 <ul>Expected failures: 9 <li>56, 57, 58, 59 - we do not run scripts during encoding detection phase and parser treats meta inside a script as text, not a tag.</li> 10 <li>60 - parser treats meta inside style as text, not a tag.</li> 11 <li>97, 99, 102 - we do not run scripts during encoding detection.</li> 12 </ul> 13 <p>Status: <span id="status">Tests did not run.</span></p> 14 <p>Serious failures:</p> 15 <ol id="failures"> 16 </ol> 17 <p>(Tests are considered to pass even if they treat Win1254 and ISO-8859-4 as separate.)</p> 18 <p><iframe id="test"></iframe></p> 19 <script> 20 if (window.layoutTestController) { 21 layoutTestController.dumpAsText(); 22 layoutTestController.waitUntilDone(); 23 } 24 25 var frame = document.getElementById('test'); 26 var current = 1; 27 var max = 123; 28 function dotest() { 29 var s = current + ''; 30 while (s.length < 3) s = '0' + s; 31 frame.src = 'resources/' + s + '.html'; 32 window.receivedResults = function () { 33 var want = frame.contentWindow.document.getElementById('expected').firstChild.data; 34 var have = frame.contentWindow.document.getElementById('encoding').firstChild.data; 35 if (have == 'ISO-8859-9') 36 have = 'Windows-1254'; 37 if (want != have) { 38 var li = document.createElement('li'); 39 var a = document.createElement('a'); 40 a.appendChild(document.createTextNode('test ' + s)); 41 a.href = s + '.html'; 42 li.appendChild(a); 43 li.appendChild(document.createTextNode(': expected ' + want + '; used ' + have)); 44 var pre = document.createElement('pre'); 45 pre.appendChild(document.createTextNode(frame.contentWindow.document.getElementsByTagName('pre')[0].firstChild.data)); 46 li.appendChild(pre); 47 li.value = current; 48 document.getElementById('failures').appendChild(li); 49 } 50 current += 1; 51 if (current <= max) 52 dotest(); 53 else { 54 frame.parentNode.removeChild(frame); 55 document.getElementById('status').innerText = "Tests ran."; 56 if (window.layoutTestController) 57 layoutTestController.notifyDone(); 58 } 59 }; 60 } 61 function runtests() { 62 dotest(); 63 } 64 function alert() { } 65 </script> 66 </body> 67</html> 68