docshell/test/test_bug713825.html

Wed, 31 Dec 2014 13:27:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 13:27:57 +0100
branch
TOR_BUG_3246
changeset 6
8bccb770b82d
permissions
-rw-r--r--

Ignore runtime configuration files generated during quality assurance.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=713825
     5 -->
     6 <head>
     7   <meta charset="utf-8">
     8   <title>Test for Bug 713825</title>
     9   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    10   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    11 </head>
    12 <body>
    13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=713825">Mozilla Bug 713825</a>
    14 <p id="display"></p>
    15 <div id="content" style="display: none">
    17 </div>
    18 <pre id="test">
    19 <script type="application/javascript">
    21 /** 
    22  * Test for Bug 713825 
    23  *  test that nsIDocCharset still works backward compatibly
    24  */
    25 var Ci = SpecialPowers.Ci;
    26 var docShell = SpecialPowers.wrap(window).QueryInterface(Ci.nsIInterfaceRequestor).
    27                       getInterface(Ci.nsIWebNavigation).
    28                       QueryInterface(Ci.nsIDocShell);
    30 var charset1 = docShell.charset;
    31 var charset2 = docShell.QueryInterface(Ci.nsIDocCharset).charset;
    32 var charset3 = SpecialPowers.wrap(window).QueryInterface(Ci.nsIInterfaceRequestor).
    33                       getInterface(Ci.nsIDocCharset).charset;
    35 /* if we get here without throwing and the three charsets are equal, all is OK */
    36 is(charset1, charset2, "QI'd nsIDocCharset.charset should equal nsIDocShell.charset");
    37 is(charset1, charset3, "getInterface'd nsIDocCharset.charset should equal nsIDocShell.charset");
    39 </script>
    40 </pre>
    41 </body>
    42 </html>

mercurial