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

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

Issue 1950283002: Convert track-remove* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 <title>This test makes sure that removing a track by setting video.innerHTML doe sn't crash (https://bugs.webkit.org/show_bug.cgi?id=100981). If this test does n ot crash, it passes.</title>
3 <head> 3 <script src="../media-file.js"></script>
4 <script src="../media-file.js"></script> 4 <script src="../../resources/testharness.js"></script>
5 <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 5 <script src="../../resources/testharnessreport.js"></script>
6 (Please avoid writing new tests using video-test.js) --> 6 <video>
7 <script src="../video-test.js"></script> 7 <track default="" src="captions-webvtt/captions-gaps.vtt">
8 <script type="text/javascript"> 8 </video>
9 var firstSeek = true; 9 </div>
10 <script>
11 async_test(function(t) {
12 var firstSeek = true;
13 var video = document.querySelector('video');
14 video.onseeked = t.step_func(function() {
15 if (!firstSeek) {
16 t.done();
17 return;
18 }
10 19
11 function seeked() 20 // Remove the text track
12 { 21 video.innerHTML = 'This is a test';
mlamouri (slow - plz ping) 2016/05/06 12:58:28 `video.innerHTML = '';` I think passing the "This
Srirama 2016/05/06 14:17:07 Done.
13 if (!firstSeek) {
14 endTest();
15 return;
16 }
17 22
18 // Remove the text tra 23 // Seek again to force a repaint.
19 video.innerHTML = "This is a test"; 24 video.currentTime = 7.9;
20 25 firstSeek = false;
21 // Seek again to force a repaint. 26 });
22 run("video.currentTime = 7.9"); 27
23 firstSeek = false; 28 video.currentTime = 0.5;
24 } 29 video.src = findMediaFile('video', '../content/counting');
25 30 });
26 function loaded() 31 </script>
27 {
28 findMediaElement();
29 waitForEvent('error');
30 waitForEvent('seeked', seeked);
31 waitForEventOnce('canplaythrough', function()
32 {
33 video.currentTime = 0.5;
34 });
35 video.src = findMediaFile('video', '../content/counting');
36 }
37 </script>
38 </head>
39 <body onload=loaded()>
40 <video>
41 <track default="" src="captions-webvtt/captions-gaps.vtt">
42 </video>
43 <div>
44 This test makes sure that removing a track by setting video.innerHTML doesn't crash (https://bugs.webkit.org/show_bug.cgi?id=100981).
45 <p>If this test does not crash, it passes.</p>
46 </div>
47 </body>
48 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698