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

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

Issue 533613002: Work around GC bug to fix flaky audio/video track tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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
« no previous file with comments | « LayoutTests/media/avtrack/gc.html ('k') | LayoutTests/media/avtrack/video-track-selected.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>AudioTrackList &amp; VideoTrackList.getTrackById</title> 4 <title>AudioTrackList &amp; VideoTrackList.getTrackById</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>
11 <script> 11 <script>
12 async_test(function(t) 12 async_test(function(t)
13 { 13 {
14 var e = document.createElement('video'); 14 var e = document.createElement('video');
15 // add to body to prevent GC pending http://crbug.com/400659
16 document.body.appendChild(e);
15 17
16 assert_equals(e.audioTracks.length, 0); 18 assert_equals(e.audioTracks.length, 0);
17 assert_equals(e.audioTracks.getTrackById(''), null); 19 assert_equals(e.audioTracks.getTrackById(''), null);
18 20
19 assert_equals(e.videoTracks.length, 0); 21 assert_equals(e.videoTracks.length, 0);
20 assert_equals(e.videoTracks.getTrackById(''), null); 22 assert_equals(e.videoTracks.getTrackById(''), null);
21 23
22 e.src = findMediaFile('video', '../content/test'); 24 e.src = findMediaFile('video', '../content/test');
23 25
24 e.addEventListener('loadedmetadata', t.step_func(function() 26 e.addEventListener('loadedmetadata', t.step_func(function()
25 { 27 {
26 assert_equals(e.audioTracks.length, 1); 28 assert_equals(e.audioTracks.length, 1);
27 assert_equals(e.audioTracks.getTrackById(e.audioTracks[0].id ), e.audioTracks[0]); 29 assert_equals(e.audioTracks.getTrackById(e.audioTracks[0].id ), e.audioTracks[0]);
28 assert_equals(e.audioTracks.getTrackById('fake-id'), null); 30 assert_equals(e.audioTracks.getTrackById('fake-id'), null);
29 31
30 assert_equals(e.videoTracks.length, 1); 32 assert_equals(e.videoTracks.length, 1);
31 assert_equals(e.videoTracks.getTrackById(e.videoTracks[0].id ), e.videoTracks[0]); 33 assert_equals(e.videoTracks.getTrackById(e.videoTracks[0].id ), e.videoTracks[0]);
32 assert_equals(e.videoTracks.getTrackById('fake-id'), null); 34 assert_equals(e.videoTracks.getTrackById('fake-id'), null);
33 35
34 t.done(); 36 t.done();
35 })); 37 }));
36 }); 38 });
37 </script> 39 </script>
38 </body> 40 </body>
39 </html> 41 </html>
OLDNEW
« no previous file with comments | « LayoutTests/media/avtrack/gc.html ('k') | LayoutTests/media/avtrack/video-track-selected.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698