Bug 1852740: add tests for the `fetchpriority` attribute in Link headers. r=necko...
[gecko.git] / dom / base / test / test_bug707142.html
blob5326c1b96bbde24503ba300f1bc1f76ba60dd006
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=707142
5 -->
6 <head>
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"/>
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=707142">Mozilla Bug 707142</a>
13 <p id="display"></p>
14 <div id="content" style="display: none">
16 </div>
17 <pre id="test">
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");
34 SimpleTest.finish();
36 xhr.open("GET", "file_bug707142_utf-16.json");
37 xhr.responseType = "json";
38 xhr.send();
40 xhr.open("GET", "file_bug707142_bom.json");
41 xhr.responseType = "json";
42 xhr.send();
44 xhr.open("GET", "file_bug707142_baseline.json");
45 xhr.responseType = "json";
46 xhr.send();
48 </script>
49 </pre>
50 </body>
51 </html>