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

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, 5 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 testExpected("audio.currentSrc == sourceA.src", true);
12 endTest();
13 }
14
15 function loadedMetadataA()
16 {
17 consoleWrite("loadedMetadataA");
18 audio.removeChild(sourceA);
19 audio.appendChild(sourceB);
20 waitForEventAndFail("loadedmetadata");
21 }
22
23 function onWindowLoad(e)
24 {
25 audio = document.getElementById('a');
26 waitForEvent("loadstart");
27 waitForEvent("progress");
28 waitForEvent("emptied");
29 waitForEvent("suspend");
30 waitForEvent("loadeddata");
31 waitForEvent("canplay");
32 waitForEventOnce('canplaythrough', canplaythrough);
33
34 sourceA = document.createElement("source");
35 var audioFile = findMediaFile("audio", "content/test");
36 sourceA.setAttribute("src", audioFile);
37 sourceB = document.createElement("source");
38 audioFile = findMediaFile("audio", "content/silence");
39 sourceB.setAttribute("src", audioFile);
40
41 waitForEventOnce("loadedmetadata", loadedMetadataA);
42 audio.appendChild(sourceA);
43 }
44
45 window.addEventListener('load', onWindowLoad, false);
46 </script>
47 </head>
48 <body>
49 <audio id="a"></audio>
50 </body>
51 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698