OLD | NEW |
1 <html> | 1 <html> |
2 <title>Test of concurrent HTML5 audio</title> | 2 <title>Test of concurrent HTML5 audio</title> |
3 <body> | 3 <body> |
4 | 4 |
5 <p>Test that multiple audio elements can play concurrently.</p> | 5 <p>Test that multiple audio elements can play concurrently.</p> |
6 | 6 |
| 7 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| 8 (Please avoid writing new tests using video-test.js) --> |
7 <script src=video-test.js></script> | 9 <script src=video-test.js></script> |
8 <script src=media-file.js></script> | 10 <script src=media-file.js></script> |
9 <script> | 11 <script> |
10 var maxPlayers = 2; // Number of concurrent audio elements to test. For
larger values a longer media file is needed. | 12 var maxPlayers = 2; // Number of concurrent audio elements to test. For
larger values a longer media file is needed. |
11 var audioElementCount = 0; | 13 var audioElementCount = 0; |
12 | 14 |
13 function errorListener(event) | 15 function errorListener(event) |
14 { | 16 { |
15 logResult(false, "Element " + audioElementCount + " caught 'error'
event, audio.error.code = " + this.error.code); | 17 logResult(false, "Element " + audioElementCount + " caught 'error'
event, audio.error.code = " + this.error.code); |
16 endTest(); | 18 endTest(); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 | 63 |
62 consoleWrite("Starting a total of " + maxPlayers + " concurrent audio el
ements."); | 64 consoleWrite("Starting a total of " + maxPlayers + " concurrent audio el
ements."); |
63 for (var i = 0; i < maxPlayers; i++) | 65 for (var i = 0; i < maxPlayers; i++) |
64 document.write("<audio controls></audio>"); | 66 document.write("<audio controls></audio>"); |
65 | 67 |
66 testAudioElement(0); | 68 testAudioElement(0); |
67 </script> | 69 </script> |
68 | 70 |
69 </body> | 71 </body> |
70 </html> | 72 </html> |
OLD | NEW |