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

Side by Side Diff: LayoutTests/media/avtrack/audio-track-enabled.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 | « no previous file | LayoutTests/media/avtrack/forget-on-load.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>AudioTrack.enabled change</title> 4 <title>AudioTrack.enabled change</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("audio"); 14 var e = document.createElement("audio");
15 // add to body to prevent GC pending http://crbug.com/400659
16 document.body.appendChild(e);
15 e.src = findMediaFile("audio", "../content/test"); 17 e.src = findMediaFile("audio", "../content/test");
16 18
17 e.onloadedmetadata = t.step_func(function() 19 e.onloadedmetadata = t.step_func(function()
18 { 20 {
19 assert_equals(e.audioTracks.length, 1, "audioTracks.length") ; 21 assert_equals(e.audioTracks.length, 1, "audioTracks.length") ;
20 assert_true(e.audioTracks[0].enabled, "audioTrack.enabled (i nitial)"); 22 assert_true(e.audioTracks[0].enabled, "audioTrack.enabled (i nitial)");
21 e.audioTracks[0].enabled = false; 23 e.audioTracks[0].enabled = false;
22 assert_false(e.audioTracks[0].enabled, "audioTrack.enabled ( first setter)"); 24 assert_false(e.audioTracks[0].enabled, "audioTrack.enabled ( first setter)");
23 25
24 e.audioTracks.onchange = t.step_func(function() 26 e.audioTracks.onchange = t.step_func(function()
25 { 27 {
26 assert_false(e.audioTracks[0].enabled, "audioTrack.enabl ed (first change event)"); 28 assert_false(e.audioTracks[0].enabled, "audioTrack.enabl ed (first change event)");
27 e.audioTracks[0].enabled = true; 29 e.audioTracks[0].enabled = true;
28 assert_true(e.audioTracks[0].enabled, "audioTrack.enable d (second setter)"); 30 assert_true(e.audioTracks[0].enabled, "audioTrack.enable d (second setter)");
29 31
30 e.audioTracks.onchange = t.step_func(function() 32 e.audioTracks.onchange = t.step_func(function()
31 { 33 {
32 assert_true(e.audioTracks[0].enabled, "audioTrack.en abled (second change event)"); 34 assert_true(e.audioTracks[0].enabled, "audioTrack.en abled (second change event)");
33 t.done(); 35 t.done();
34 }); 36 });
35 }); 37 });
36 }); 38 });
37 }, "AudioTrack.enabled = false"); 39 }, "AudioTrack.enabled = false");
38 </script> 40 </script>
39 </body> 41 </body>
40 </html> 42 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/media/avtrack/forget-on-load.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698