test_bug737966.js (488B)
1 /* Any copyright is dedicated to the Public Domain. 2 * http://creativecommons.org/publicdomain/zero/1.0/ 3 */ 4 5 /* If charset parameter is invalid, the encoding should be detected as UTF-8 */ 6 7 function run_test() { 8 let body = '<?xml version="1.0"><html>%c3%80</html>'; 9 let result = '<?xml version="1.0"><html>\u00c0</html>'; 10 11 let xhr = new XMLHttpRequest(); 12 xhr.open("GET", "data:text/xml;charset=abc," + body, false); 13 xhr.send(null); 14 15 Assert.equal(xhr.responseText, result); 16 }