js/xpconnect/tests/mochitest/test_bug393269.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=393269
     5 -->
     6 <head>
     7   <title>Test for Bug 393269</title>
     8   <script type="text/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=393269">Mozilla Bug 393269</a>
    13 <iframe id="ifr"></iframe>
    14 <pre id="test">
    15 <script class="testbody" type="text/javascript">
    17 SimpleTest.expectAssertions(1, 2);
    19 (function () {
    20     /** Test for Bug 393269 **/
    21     var doc = $("ifr").contentDocument;
    22     is("UTF-8", doc.characterSet, "control, getting a property");
    23     doc.open();
    24     try {
    25         is("UTF-8", doc.characterSet,
    26            "can get a property after 1 document.open")
    27     } catch (e) {
    28         fail("Shouldn't have thrown: " + e);
    29         return;
    30     } finally {
    31         doc.close();
    32     }
    34     doc.open();
    35     try {
    36         is("UTF-8", doc.characterSet,
    37            "can get a property after 2 document.opens")
    38     } catch (e) {
    39         fail("Shouldn't have thrown: " + e);
    40     } finally {
    41         doc.close();
    42     }
    43 })();
    44 </script>
    45 </pre>
    46 </body>
    47 </html>

mercurial