js/xpconnect/tests/mochitest/test_bug393269.html

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:24349f022452
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">
16
17 SimpleTest.expectAssertions(1, 2);
18
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 }
33
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>
48

mercurial