browser_bug1736248-1.js (730B)
1 function test() { 2 var rootDir = "http://mochi.test:8888/browser/docshell/test/browser/"; 3 runCharsetTest( 4 rootDir + "file_bug1736248-1.html", 5 afterOpen, 6 afterChangeCharset 7 ); 8 } 9 10 function afterOpen() { 11 is( 12 content.document.documentElement.textContent.indexOf("\u00C3"), 13 1064, 14 "Doc should be windows-1252 initially" 15 ); 16 is( 17 content.document.characterSet, 18 "windows-1252", 19 "Doc should report windows-1252 initially" 20 ); 21 } 22 23 function afterChangeCharset() { 24 is( 25 content.document.documentElement.textContent.indexOf("\u00E4"), 26 1064, 27 "Doc should be UTF-8 subsequently" 28 ); 29 is( 30 content.document.characterSet, 31 "UTF-8", 32 "Doc should report UTF-8 subsequently" 33 ); 34 }