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

Side by Side Diff: LayoutTests/media/media-source-append-multiple.html

Issue 349973006: HTMLMediaElement::webMediaPlayer() should never be null if m_readyState >= HAVE_METADATA (multiple … (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed review comments Created 6 years, 6 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src=media-file.js></script>
5 <script src=video-test.js></script>
6 <script>
7 var audio, sourceA, sourceB;
8
9 function canplaythrough(e)
10 {
11 consoleWrite("EVENT(canplaythrough)");
12 testExpected("audio.currentSrc", sourceA.src);
13 endTest();
14 }
15
16 function loadedMetadataA()
17 {
18 consoleWrite("loadedMetadataA");
19 audio.removeChild(sourceA);
20 audio.appendChild(sourceB);
21 waitForEventAndFail("loadedmetadata", null);
acolwell GONE FROM CHROMIUM 2014/06/23 20:30:49 nit: You shouldn't need the null. waitForEventAndF
Srirama 2014/06/24 07:04:47 Done.
22 }
23
24 function onWindowLoad(e)
25 {
26 audio = document.getElementById('a');
27 waitForEvent("loadstart");
28 waitForEvent("progress");
29 waitForEvent("emptied");
30 waitForEvent("suspend");
31 waitForEvent("loadedmetadata");
32 waitForEvent("loadeddata");
33 waitForEvent("canplay");
34 audio.addEventListener('canplaythrough', canplaythrough);
acolwell GONE FROM CHROMIUM 2014/06/23 20:30:49 nit: Use waitForEventOnce() here as well and remov
Srirama 2014/06/24 07:04:47 Done.
35
36 sourceA = document.createElement("source");
37 var audioFile = findMediaFile("audio", "content/test");
38 sourceA.setAttribute("src", audioFile);
39 sourceB = document.createElement("source");
40 audioFile = findMediaFile("audio", "content/silence");
41 sourceB.setAttribute("src", audioFile);
42
43 waitForEventOnce("loadedmetadata", loadedMetadataA);
44 audio.appendChild(sourceA);
45 }
46
47 window.addEventListener('load', onWindowLoad, false);
48 </script>
49 </head>
50 <body>
51 <audio id="a"></audio>
52 </body>
53 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698