Bug 1915045 Ensure decode tasks are scheduled on BufferingState::Enter() r=media...
[gecko.git] / js / xpconnect / tests / mochitest / test_bug661980.html
blobafe62559a516c9a7dfdd249c4b4eba09228eaa03
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=661980
5 -->
6 <head>
7 <title>Test for Bug 661980</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=661980">Mozilla Bug 661980</a>
13 <p id="display"></p>
14 <div id="content" style="display: none">
16 </div>
17 <pre id="test">
18 <script type="application/javascript">
20 /** Test for Bug 661980 **/
22 // While not currently needed, make this as similar as possible to a real
23 // EventTarget just to make sure that we're tripping on the wrapping and
24 // nothing else.
25 var fakeTarget = {
26 addEventListener: function() {},
27 removeEventListener: function() {},
28 dispatchEvent: function() {}
31 var mouseevent = document.createEvent("MouseEvent");
32 var didThrow = false;
33 dump("hello nurse\n");
34 try {
35 mouseevent.initMouseEvent("mouseover",
36 false, false,
37 window,
38 1, 2, 3, 4, 5,
39 false, false, false, false,
41 fakeTarget);
43 catch (ex) {
44 didThrow = true;
46 ok(didThrow, "should not be able to implement EventTarget using script");
48 mouseevent.initMouseEvent("mouseout",
49 false, false,
50 window,
51 1, 2, 3, 4, 5,
52 false, false, false, false,
54 document.body);
55 is(mouseevent.type, "mouseout",
56 "should able to implement EventTarget using Element");
58 </script>
59 </pre>
60 </body>
61 </html>