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

Side by Side Diff: LayoutTests/media/track/track-remove-by-setting-innerHTML.html

Issue 17395006: Fix LayoutTests that assume canplay, playing, and canplaythrough will only fire once. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix event-attributes expectations. Created 7 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
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../media-file.js"></script> 4 <script src="../media-file.js"></script>
5 <script src="../video-test.js"></script> 5 <script src="../video-test.js"></script>
6 <script type="text/javascript"> 6 <script type="text/javascript">
7 var firstSeek = true; 7 var firstSeek = true;
8 8
9 function seeked() 9 function seeked()
10 { 10 {
11 if (!firstSeek) { 11 if (!firstSeek) {
12 endTest(); 12 endTest();
13 return; 13 return;
14 } 14 }
15 15
16 // Remove the text tra 16 // Remove the text tra
17 video.innerHTML = "This is a test"; 17 video.innerHTML = "This is a test";
18 18
19 // Seek again to force a repaint. 19 // Seek again to force a repaint.
20 run("video.currentTime = 7.9"); 20 run("video.currentTime = 7.9");
21 firstSeek = false; 21 firstSeek = false;
22 } 22 }
23 23
24 function loaded() 24 function loaded()
25 { 25 {
26 findMediaElement(); 26 findMediaElement();
27 waitForEvent('error'); 27 waitForEvent('error');
28 waitForEvent('seeked', seeked); 28 waitForEvent('seeked', seeked);
29 waitForEvent('canplaythrough', function() 29 waitForEventOnce('canplaythrough', function()
30 { 30 {
31 video.currentTime = 0.5; 31 video.currentTime = 0.5;
32 }); 32 });
33 video.src = findMediaFile('video', '../content/counting'); 33 video.src = findMediaFile('video', '../content/counting');
34 } 34 }
35 </script> 35 </script>
36 </head> 36 </head>
37 <body onload=loaded()> 37 <body onload=loaded()>
38 <video> 38 <video>
39 <track default="" src="captions-webvtt/captions-gaps.vtt"> 39 <track default="" src="captions-webvtt/captions-gaps.vtt">
40 </video> 40 </video>
41 <div> 41 <div>
42 This test makes sure that removing a track by setting video.innerHTML doesn't crash (https://bugs.webkit.org/show_bug.cgi?id=100981). 42 This test makes sure that removing a track by setting video.innerHTML doesn't crash (https://bugs.webkit.org/show_bug.cgi?id=100981).
43 <p>If this test does not crash, it passes.</p> 43 <p>If this test does not crash, it passes.</p>
44 </div> 44 </div>
45 </body> 45 </body>
46 </html> 46 </html>
OLDNEW
« no previous file with comments | « LayoutTests/media/track/track-cues-sorted-before-dispatch.html ('k') | LayoutTests/media/video-currentTime-delay.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698