1 <html> 2 <head> 3 </head> 4 <body> 5 <meta charset=ISO-2022-JP> 6 <pre id="log"></pre> 7 <script> 8 function log(message) 9 { 10 document.getElementById("log").innerText += message + "\n"; 11 } 12 13 if (window.layoutTestController) 14 layoutTestController.dumpAsText(); 15 16 if (document.inputEncoding == "ISO-2022-JP") 17 log("PASS: " + document.inputEncoding); 18 else 19 log("FAIL: " + document.inputEncoding); 20 </script> 21 <p> 22 This test checks that the charset sniffer scans at least 1024 bytes of data to find a meta tag, even if it is not in the head section. 23 </body> 24 </html> 25