Bug 470455 - test_database_sync_embed_visits.js leaks, r=sdwilsh
[wine-gecko.git] / content / media / video / test / test_volume.html
blob2dbc40c12adeea3da1645bffabf251c36957b874
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>Media test: volume attribute set</title>
5 <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
6 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
8 </head>
9 <body>
11 <video id='v1'></video><audio id='a1'></audio>
13 <pre id="test">
14 <script class="testbody" type="text/javascript">
16 function test(element, value, shouldThrow) {
17 var threw = false;
18 try {
19 element.volume = value;
20 } catch (err if err.name == "NS_ERROR_DOM_INDEX_SIZE_ERR") {
21 threw = true;
23 is(shouldThrow, threw, "Case: " +element.id+ " setVolume=" + value);
27 var ids = new Array(document.getElementById('v1'), document.getElementById('a1'));
29 for (i=0; i<ids.length; i++) {
30 var element = ids[i];
31 test(element, 0.0,false);
32 test(element, 1.0, false);
33 test(element, -0.1, true);
34 test(element, 1.1, true);
37 </script>
38 </pre>
39 </body>
40 </html>