Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / js / xpconnect / tests / mochitest / test_bug720619.html
blob804ec96d7585600c7fba8122c2f8b6c0d597a89a
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=720619
5 -->
6 <head>
7 <title>Test for Bug 629227</title>
8 <script 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=720619">Mozilla Bug 720619</a>
13 <p id="display">
14 <iframe id="testTarget"></iframe>
15 </p>
16 <div id="content" style="display: none">
18 </div>
19 <pre id="test">
20 <script type="application/javascript">
22 /** Test for Bug 720619 **/
23 SimpleTest.waitForExplicitFinish();
25 function checkThrows(f, exception) {
26 try {
27 f();
28 ok(false, "should have thrown: " + f);
29 } catch (e) {
30 ok(exception.test(e.toString()), "correctly threw");
34 function go() {
35 var loc = $('ifr').contentWindow.location;
36 checkThrows(function() {loc + '';}, /Permission denied/);
37 checkThrows(function() {'' + loc;}, /Permission denied/);
38 checkThrows(function() {String(loc);}, /Permission denied/);
40 var win = $('ifr').contentWindow;
41 checkThrows(function() {win + '';}, /Permission denied/);
42 checkThrows(function() {'' + win;}, /Permission denied/);
43 checkThrows(function() {String(win);}, /Permission denied/);
45 SimpleTest.finish();
48 </script>
50 <iframe id="ifr" onload="go()"
51 src="http://example.org/tests/js/xpconnect/tests/mochitest/file_bug720619.html">
52 </iframe>
53 </pre>
54 </body>
55 </html>