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

Side by Side Diff: third_party/WebKit/LayoutTests/media/avtrack/gc.html

Issue 2268373002: clean up media tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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>
11 <script> 10 <script>
12 async_test(function(t) 11 async_test(function(t)
13 { 12 {
14 var e = document.createElement('video'); 13 var video = document.createElement('video');
15 e.src = findMediaFile('video', '../content/test'); 14 video.src = findMediaFile('video', '../content/test');
16 15
17 e.addEventListener('loadedmetadata', t.step_func(function() 16 video.addEventListener('loadedmetadata', t.step_func_done(functi on()
18 { 17 {
19 e.audioTracks.foo = 'foo'; 18 video.audioTracks.foo = 'foo';
20 e.audioTracks[0].bar = 'bar'; 19 video.audioTracks[0].bar = 'bar';
21 e.videoTracks.baz = 'baz'; 20 video.videoTracks.baz = 'baz';
22 e.videoTracks[0].qux = 'qux'; 21 video.videoTracks[0].qux = 'qux';
23 22
24 gc(); 23 gc();
25 24
26 assert_equals(e.audioTracks.foo, 'foo'); 25 assert_equals(video.audioTracks.foo, 'foo');
27 assert_equals(e.audioTracks[0].bar, 'bar'); 26 assert_equals(video.audioTracks[0].bar, 'bar');
28 assert_equals(e.videoTracks.baz, 'baz'); 27 assert_equals(video.videoTracks.baz, 'baz');
29 assert_equals(e.videoTracks[0].qux, 'qux'); 28 assert_equals(video.videoTracks[0].qux, 'qux');
30
31 t.done();
32 })); 29 }));
33 }); 30 });
34 </script> 31 </script>
35 </body> 32 </body>
36 </html> 33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698