Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / js / xpconnect / tests / mochitest / test_bug636097.html
blob8ae8e4822e596b409c21cec97efaed2bf24a555d
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=504877
5 test by moz_bug_r_a4@yahoo.com
6 -->
7 <head>
8 <title>Test for Bug 504877</title>
9 <script 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=504877">Mozilla Bug 504877</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 /** Test for Bug 504877 **/
22 SimpleTest.waitForExplicitFinish();
24 var targetUrl = "http://example.com/";
25 var l;
27 function a() {
28 var r = "FAIL", s;
29 try {
30 s = l.toString();
32 catch (e) {
33 if (/denied|insecure/.test(e))
34 r = "PASS";
35 s = e;
38 is(r, "PASS", "should have thrown an exception");
39 SimpleTest.finish();
42 var p = 0;
43 function b() {
44 switch (++p) {
45 case 1:
46 frames[0].location = "about:blank";
47 break;
48 case 2:
49 l = frames[0].location;
50 frames[0].location = targetUrl;
51 break;
52 case 3:
53 a();
54 break;
57 </script>
59 </pre>
60 <iframe onload="b()"></iframe>
61 </body>
62 </html>