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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-delete-during-setup.html

Issue 2074913006: Convert track-cues* and track-delete* tests to testharness.js (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nit Created 4 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
OLDNEW
1 > 1 <!DOCTYPE html>
2 <title>Tests track deletion during setup.</title>
3 <script src="../../resources/testharness.js"></script>
4 <script src="../../resources/testharnessreport.js"></script>
5 <script src="../media-file.js"></script>
6 <script>
7 // This should not be necessary, but due to crbug.com/372245 style
8 // gets dirtied during layout in LayoutTextTrackContainer which
9 // causes assertions to fail when Document::scrollingElement is
10 // queried during compositing update (a valid request).
11 internals.settings.setCompositorWorkerEnabled(false);
12 </script>
13 <video>
14 <track src="captions-webvtt/metadata.vtt">
15 </video>
16 <script>
17 async_test(function(t) {
18 var video = document.querySelector("video");
19 var track = document.querySelector("track");
20 setTimeout(function() {
21 video.parentNode.removeChild(video);
22 }, 61);
2 23
3 <script> 24 track.onload = t.step_func(function() {
4 if (window.internals) 25 var track2 = document.createElement("track");
5 { 26 video.appendChild(track2);
6 // This should not be necessary, but due to crbug.com/372245 sty le 27 setTimeout(function() { t.done(); }, 100);
7 // gets dirtied during layout in LayoutTextTrackContainer which 28 });
8 // causes assertions to fail when Document::scrollingElement is
9 // queried during compositing update (a valid request).
10 window.internals.settings.setCompositorWorkerEnabled(false);
11 }
12 </script>
13 <script src=../media-file.js></script>
14 <script></script>
15 <script></script>
16 <script>setTimeout("try { var v = document.querySelector('video'); v.parentNode. removeChild(v); } catch(e) {}", 61);</script>
17 <meta>
18 <!-- TODO(foolip): Convert test to testharness.js. crbug.com/588956
19 (Please avoid writing new tests using video-test.js) -->
20 <script src=../video-test.js></script>
21 <script>
22 29
23 { 30 assert_equals(track.readyState, HTMLTrackElement.NONE);
24 } 31 assert_equals(track.track.mode, "disabled");
32 track.track.mode = "hidden";
25 33
26 function metadataTrackLoaded() 34 video.src = findMediaFile("video", "../content/test");
27 { 35 });
28 track2 = document.createElement('track'); 36 </script>
29 video.appendChild(track2);
30 setTimeout("endTest()", 100);
31 }
32
33 function canplaythrough()
34 {
35 track1.track.mode = "hidden";
36 setTimeout("endTest()", 100);
37 }
38
39 function start()
40 {
41 consoleWrite("<feOffset>");
42 findMediaElement();
43
44 track1 = document.querySelectorAll('track')[0];
45 testExpected("track1.readyState", HTMLTrackElement.NONE);
46 testExpected("track1.track.mode", "disabled");
47
48 video.src = findMediaFile("video", "../content/test");
49 consoleWrite("");
50 }
51 </script>
52 <body onload="start()">
53 <command><aside><kbd><video oncanplaythrough="canplaythrough()" >
54 <track src="captions-webvtt/metadata.vtt" onload="metadataTrackLoade d()">
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698