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

Side by Side Diff: LayoutTests/media/avtrack/addtrack.html

Issue 552303006: Prevent more script-observable cases of HTMLMediaElement GC (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: make gc-while-seeking.html non-flaky Created 6 years, 3 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
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>AudioTrackList &amp; VideoTrackList addtrack event</title> 4 <title>AudioTrackList &amp; VideoTrackList addtrack event</title>
5 <script src="../../resources/testharness.js"></script> 5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script> 6 <script src="../../resources/testharnessreport.js"></script>
7 <script src="../media-file.js"></script> 7 <script src="../media-file.js"></script>
8 </head> 8 </head>
9 <body> 9 <body>
10 <div id="log"></div> 10 <div id="log"></div>
(...skipping 12 matching lines...) Expand all
23 function setupTrackListHandlers(t, trackList, actualEventList) 23 function setupTrackListHandlers(t, trackList, actualEventList)
24 { 24 {
25 trackList.addEventListener("addtrack", t.step_func(onTrackLi stEvent.bind(this, actualEventList))); 25 trackList.addEventListener("addtrack", t.step_func(onTrackLi stEvent.bind(this, actualEventList)));
26 trackList.addEventListener("change", t.step_func(onTrackList Event.bind(this, actualEventList))); 26 trackList.addEventListener("change", t.step_func(onTrackList Event.bind(this, actualEventList)));
27 trackList.addEventListener("removetrack", t.step_func(onTrac kListEvent.bind(this, actualEventList))); 27 trackList.addEventListener("removetrack", t.step_func(onTrac kListEvent.bind(this, actualEventList)));
28 } 28 }
29 29
30 async_test(function(t) 30 async_test(function(t)
31 { 31 {
32 var e = document.createElement(tagName); 32 var e = document.createElement(tagName);
33 // add to body to prevent GC pending http://crbug.com/400659
34 document.body.appendChild(e);
35 e.src = src; 33 e.src = src;
36 34
37 var expectedEvents = ["addtrack"]; 35 var expectedEvents = ["addtrack"];
38 var actualAudioEvents = []; 36 var actualAudioEvents = [];
39 var actualVideoEvents = []; 37 var actualVideoEvents = [];
40 setupTrackListHandlers(t, e.audioTracks, actualAudioEvents, "audioTracks events"); 38 setupTrackListHandlers(t, e.audioTracks, actualAudioEvents, "audioTracks events");
41 setupTrackListHandlers(t, e.videoTracks, actualVideoEvents, "videoTracks events"); 39 setupTrackListHandlers(t, e.videoTracks, actualVideoEvents, "videoTracks events");
42 40
43 e.load(); 41 e.load();
44 42
(...skipping 14 matching lines...) Expand all
59 }, tagName + " : " + label); 57 }, tagName + " : " + label);
60 } 58 }
61 59
62 addtrack_test("audio", findMediaFile("audio", "../content/test"), "a udio-only"); 60 addtrack_test("audio", findMediaFile("audio", "../content/test"), "a udio-only");
63 addtrack_test("audio", findMediaFile("video", "../content/test"), "a udio-video"); 61 addtrack_test("audio", findMediaFile("video", "../content/test"), "a udio-video");
64 addtrack_test("video", findMediaFile("audio", "../content/test"), "a udio-only"); 62 addtrack_test("video", findMediaFile("audio", "../content/test"), "a udio-only");
65 addtrack_test("video", findMediaFile("video", "../content/test"), "a udio-video"); 63 addtrack_test("video", findMediaFile("video", "../content/test"), "a udio-video");
66 </script> 64 </script>
67 </body> 65 </body>
68 </html> 66 </html>
OLDNEW
« no previous file with comments | « LayoutTests/media/autoplay-with-preload-none.html ('k') | LayoutTests/media/avtrack/audio-track-enabled.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698