Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / js / xpconnect / tests / mochitest / file_bug789713.html
blob4c30fe827506013e3accb7b8c5569860295aa171
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=789713
5 -->
6 <head>
7 <meta charset="utf-8">
8 </head>
9 <body>
11 <script type="application/javascript">
13 /** Test for Bug 789713 **/
15 function go() {
16 var ifr = document.getElementById('ifr');
17 var pass = true;
18 var doc = ifr.contentDocument;
19 var win = ifr.contentWindow;
21 var walker = doc.createTreeWalker(doc.body);
22 pass = pass && (walker.root === doc.body);
23 walker.foo = "expando";
25 win.bar = "another-expando";
27 // First, do the document.domain operation. This shouldn't crash.
28 document.domain = "example.org";
30 // Now make sure we can still access properties on "walker".
31 try {
32 walker.root;
33 pass = pass && walker.foo == "expando";
34 } catch (e) {
35 pass = false;
38 // And make sure we can't access properties on "win", because the
39 // document.domain change revoked the access.
40 try {
41 win.bar;
42 pass = false;
43 } catch (e) { pass = pass && /Permission denied/.exec(e.message); }
44 window.parent.postMessage(pass, '*');
47 </script>
48 <iframe id="ifr" src="file_empty.html" onload="go()"></iframe>
49 </pre>
50 </body>
51 </html>