Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Side by Side Diff: LayoutTests/media/audio-mpeg-supported.html

Issue 14195011: Removed WONTFIX tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 <html>
2 <body>
3
4 <p>Test that the audio element supports MPEG files.</p>
5
6 <audio controls></audio>
7
8 <script src=video-test.js></script>
9 <script>
10 var timeupdateEventCount = 0;
11 mediaElement = document.getElementsByTagName('audio')[0];
12
13 mediaElement.addEventListener('error', function() {
14 consoleWrite("<span style='color:red'>FAIL</span> : caught 'error' e vent, audio.error = " + mediaElement.error.code);
15 endTest();
16 });
17
18 mediaElement.addEventListener('canplaythrough', function() {
19 consoleWrite("EVENT(canplaythrough)");
20 testExpected("mediaElement.currentTime", 0);
21 mediaElement.play();
22 });
23
24 function timeupdate()
25 {
26 ++timeupdateEventCount;
27
28 // wait 2 timeupdate events so we are sure the media engine is
29 // playing the media.
30 if (timeupdateEventCount == 2) {
31 // make sure time is advancing
32 testExpected("mediaElement.currentTime", 0, '>');
33 // reset the counter to prevent infinite loop if the
34 // test is re-executed manually.
35 timeupdateEventCount = 0;
36 endTest();
37 }
38 }
39
40 mediaElement.addEventListener("timeupdate", timeupdate);
41 waitForEvent('play');
42
43 mediaElement.src = "content/silence.mpg";
44 </script>
45
46 </body>
47 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698