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

Side by Side Diff: LayoutTests/media/track/opera/interfaces/TextTrackList/onremovetrack.html

Issue 1213813002: Work around flaky TextTrackList tests that will be stable with Oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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/track/opera/interfaces/TextTrackList/onaddtrack.html ('k') | no next file » | 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 <title>TextTrackList.onremovetrack</title> 2 <title>TextTrackList.onremovetrack</title>
3 <script src=../../../../../resources/testharness.js></script> 3 <script src=../../../../../resources/testharness.js></script>
4 <script src=../../../../../resources/testharnessreport.js></script> 4 <script src=../../../../../resources/testharnessreport.js></script>
5 <div id=log></div> 5 <div id=log></div>
6 <script> 6 <script>
7 setup(function(){ 7 setup(function(){
8 window.tracks = document.createElement('video').textTracks; 8 // TODO(philipj): Remove this test in favor of those in web-platform-tests
9 // once Oilpan has shipped. https://crbug.com/503852
10 window.video = document.createElement('video');
11 window.tracks = video.textTracks;
9 window.ev = new Event('removetrack'); 12 window.ev = new Event('removetrack');
10 window.ran = false; 13 window.ran = false;
11 window.cb = function() { ran = true; }; 14 window.cb = function() { ran = true; };
12 }); 15 });
13 test(function(){ 16 test(function(){
14 assert_equals(tracks.onremovetrack, null); 17 assert_equals(tracks.onremovetrack, null);
15 tracks.onremovetrack = cb; 18 tracks.onremovetrack = cb;
16 assert_equals(tracks.onremovetrack, cb); 19 assert_equals(tracks.onremovetrack, cb);
17 tracks.dispatchEvent(ev); 20 tracks.dispatchEvent(ev);
18 assert_true(ran); 21 assert_true(ran);
19 tracks.onremovetrack = null; 22 tracks.onremovetrack = null;
20 ran = false; 23 ran = false;
21 tracks.dispatchEvent(ev); 24 tracks.dispatchEvent(ev);
22 assert_false(ran); 25 assert_false(ran);
23 }); 26 });
24 test(function(){ 27 test(function(){
25 tracks.addEventListener('removetrack', cb, false); 28 tracks.addEventListener('removetrack', cb, false);
26 tracks.dispatchEvent(ev); 29 tracks.dispatchEvent(ev);
27 assert_true(ran); 30 assert_true(ran);
28 tracks.removeEventListener('removetrack', cb, false); 31 tracks.removeEventListener('removetrack', cb, false);
29 ran = false; 32 ran = false;
30 tracks.dispatchEvent(ev); 33 tracks.dispatchEvent(ev);
31 assert_false(ran); 34 assert_false(ran);
32 }, 'TextTrackList.addEventListener/removeEventListener'); 35 }, 'TextTrackList.addEventListener/removeEventListener');
33 </script> 36 </script>
OLDNEW
« no previous file with comments | « LayoutTests/media/track/opera/interfaces/TextTrackList/onaddtrack.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698