content/base/test/test_bug707142.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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 type="application/javascript" 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();
    35     };
    36     xhr.open("GET", "file_bug707142_utf-16.json");
    37     xhr.responseType = "json";
    38     xhr.send();
    39   };
    40   xhr.open("GET", "file_bug707142_bom.json");
    41   xhr.responseType = "json";
    42   xhr.send();
    43 };
    44 xhr.open("GET", "file_bug707142_baseline.json");
    45 xhr.responseType = "json";
    46 xhr.send();
    48 </script>
    49 </pre>
    50 </body>
    51 </html>

mercurial