1 <p>Test for
<a href=
"http://bugs.webkit.org/show_bug.cgi?id=15555">bug
15555</a>:
2 XMLHttpRequest does not support charset
"x-user-defined", which can facilitate loading of binary data.
</p>
5 testRunner
.dumpAsText();
8 req
= new XMLHttpRequest
;
9 req
.overrideMimeType("text/plain; charset=x-user-defined");
10 req
.open("GET", "resources/256.bin", false);
12 for (var i
= 0; i
< 128; i
++) {
13 var byt
= req
.responseText
.charCodeAt(i
);
15 throw "incorrect byte: " + byt
+ " (should be " + i
+ ")";
18 for (var i
= 128; i
< 256; i
++) {
19 var byt
= req
.responseText
.charCodeAt(i
);
20 if (byt
!= i
+ 0xf700)
21 throw "incorrect byte: " + byt
+ " (should be " + (i
+ 0xf700) + ")";
24 document
.write("<div>SUCCESS</div>");
27 document
.write("<div>" + ex
+ "</div>");