4 https://bugzilla.mozilla.org/show_bug.cgi?id=707142
7 <title>Test for Bug
707142</title>
8 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
12 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=707142">Mozilla Bug
707142</a>
14 <div id=
"content" style=
"display: none">
18 <script type=
"application/javascript">
20 /** Test for Bug
707142 **/
22 SimpleTest.waitForExplicitFinish();
24 var xhr = new XMLHttpRequest();
25 xhr.onload = function() {
26 is(xhr.response.foo,
"bar",
"Should have gotten bar on baseline");
28 xhr.onload = function() {
29 is(xhr.response.foo,
"bar",
"Should have gotten bar with BOM");
31 xhr.onload = function() {
32 is(xhr.response, null,
"Should have gotten null response with UTF-16 JSON");
36 xhr.open(
"GET",
"file_bug707142_utf-16.json");
37 xhr.responseType =
"json";
40 xhr.open(
"GET",
"file_bug707142_bom.json");
41 xhr.responseType =
"json";
44 xhr.open(
"GET",
"file_bug707142_baseline.json");
45 xhr.responseType =
"json";