Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / content / media / video / test / test_bug448534.html
blob003783ceb7195f3c484ed517b98bfffc848c1519
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=448534
5 -->
7 <head>
8 <title>Test for Bug 448534</title>
9 <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
10 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
12 </head>
13 <body>
14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=448535">Mozilla Bug 448534</a>
15 <!-- Ogg video obtained from Theora test suite: http://v2v.cc/~j/theora_testsuite/ -->
16 <video id='v'
17 src='320x240.ogg'
18 onloadedmetadata='return loaded();'
19 onplay='return started();'
20 onpause='return stopped();'></video>
21 <pre id="test">
22 <script class="testbody" type="text/javascript">
23 var v = document.getElementById('v');
24 var played = false;
25 var completed = false;
27 function loaded() {
28 if (completed)
29 return false;
31 v.play();
32 return false;
35 function started() {
36 if (completed)
37 return false;
39 ok(!v.paused, "Video should not be paused while playing");
40 v.parentNode.removeChild(v);
41 played = true;
42 return false;
45 function stopped() {
46 if (completed)
47 return false;
49 completed = true;
50 ok(v.paused, "Video should be paused after removing from the Document");
51 SimpleTest.finish();
52 return false;
55 SimpleTest.waitForExplicitFinish();
56 </script>
57 </pre>
58 </body>
59 </html>