if (responseType !== undefined) {
client.responseType = responseType
}
- client.open("GET", "resources/status.php?content=" + input + "&type=" + encodeURIComponent(type), false)
+ client.open("GET", "resources/status.php?content=" + input + "&type=" + encodeURIComponent(type), true)
+ client.onload = test.step_func_done(() => {
+ assert_equals(client.responseText, output)
+ })
client.send(null)
assert_equals(client.responseText, output)
}, document.title + " (" + type + " " + input + ")")
}
request("application/xml", encodeURIComponent("<?xml version='1.0' encoding='windows-1252'?><x>")+'%FF'+encodeURIComponent("<\/x>"), "<?xml version='1.0' encoding='windows-1252'?><x>\u00FF<\/x>")
- request("text/html", encodeURIComponent("<!doctype html><meta charset=windows-1252>")+"%FF", "<!doctype html><meta charset=windows-1252>\u00FF")
+ request("text/html", encodeURIComponent("<!doctype html><meta charset=windows-1252>")+"%FF", "<!doctype html><meta charset=windows-1252>\uFFFD")
request("text/plain;charset=windows-1252", "%FF", "\u00FF")
request("text/plain", "%FF", "\uFFFD")
request("text/plain", "%FE%FF", "")
client.onreadystatechange = function () {
if (client.readyState == this.LOADING) {
test.step( function () {
- assert_equals(client.getResponseHeader("Content-Type"), 'text/xml;charset=GBK', 'overrideMimeType not affect Content-Type header for the response');
+ assert_equals(client.getResponseHeader("Content-Type"), 'text/xml', 'overrideMimeType not affect Content-Type header for the response');
});
test.done();
}