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

Side by Side Diff: LayoutTests/media/avtrack/gc.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>AudioTrack &amp; VideoTrack garbage collection</title> 4 <title>AudioTrack &amp; VideoTrack garbage collection</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);
17 e.src = findMediaFile('video', '../content/test'); 15 e.src = findMediaFile('video', '../content/test');
18 16
19 e.addEventListener('loadedmetadata', t.step_func(function() 17 e.addEventListener('loadedmetadata', t.step_func(function()
20 { 18 {
21 e.audioTracks.foo = 'foo'; 19 e.audioTracks.foo = 'foo';
22 e.audioTracks[0].bar = 'bar'; 20 e.audioTracks[0].bar = 'bar';
23 e.videoTracks.baz = 'baz'; 21 e.videoTracks.baz = 'baz';
24 e.videoTracks[0].qux = 'qux'; 22 e.videoTracks[0].qux = 'qux';
25 23
26 gc(); 24 gc();
27 25
28 assert_equals(e.audioTracks.foo, 'foo'); 26 assert_equals(e.audioTracks.foo, 'foo');
29 assert_equals(e.audioTracks[0].bar, 'bar'); 27 assert_equals(e.audioTracks[0].bar, 'bar');
30 assert_equals(e.videoTracks.baz, 'baz'); 28 assert_equals(e.videoTracks.baz, 'baz');
31 assert_equals(e.videoTracks[0].qux, 'qux'); 29 assert_equals(e.videoTracks[0].qux, 'qux');
32 30
33 t.done(); 31 t.done();
34 })); 32 }));
35 }); 33 });
36 </script> 34 </script>
37 </body> 35 </body>
38 </html> 36 </html>
OLDNEW
« no previous file with comments | « LayoutTests/media/avtrack/forget-on-load.html ('k') | LayoutTests/media/avtrack/getTrackById.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698