4 https://bugzilla.mozilla.org/show_bug.cgi?id=713825
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"/>
13 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=713825">Mozilla Bug
713825</a>
15 <div id=
"content" style=
"display: none">
19 <script type=
"application/javascript">
23 * test that nsIDocCharset still works backward compatibly
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");