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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/regions-webvtt/vtt-region-dom-layout.html

Issue 2269883002: Refactor textTractDisplayElement utility function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « third_party/WebKit/LayoutTests/media/track/regions-webvtt/vtt-region-display.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>Tests default DOM layout structure for a VTTRegion.</title> 2 <title>Tests default DOM layout structure for a VTTRegion.</title>
3 <script src="../../media-controls.js"></script> 3 <script src="../../media-controls.js"></script>
4 <script src="../../media-file.js"></script> 4 <script src="../../media-file.js"></script>
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> 7 <script>
8 async_test(function() { 8 async_test(function() {
9 var video = document.createElement('video'); 9 var video = document.createElement('video');
10 video.src = findMediaFile('video', '../../content/test'); 10 video.src = findMediaFile('video', '../../content/test');
11 var testTrack = document.createElement('track'); 11 var testTrack = document.createElement('track');
12 testTrack.onload = this.step_func(function() { 12 testTrack.onload = this.step_func(function() {
13 video.oncanplaythrough = this.step_func_done(function() { 13 video.oncanplaythrough = this.step_func_done(function() {
14 assert_equals(testTrack.track.regions.length, 1); 14 assert_equals(testTrack.track.regions.length, 1);
15 15
16 var region = textTrackDisplayElement(video, 'region'); 16 var region = textTrackRegionElement(video);
17 var container = textTrackDisplayElement(video, 'region-container'); 17 var container = textTrackRegionContainerElement(video);
18 18
19 assert_equals(region.children.length, 1); 19 assert_equals(region.children.length, 1);
20 assert_equals(region.children[0], container); 20 assert_equals(region.children[0], container);
21 assert_equals(internals.shadowPseudoId(region), '-webkit-media-text- track-region'); 21 assert_equals(internals.shadowPseudoId(region), '-webkit-media-text- track-region');
22 assert_equals(internals.shadowPseudoId(container), '-webkit-media-te xt-track-region-container'); 22 assert_equals(internals.shadowPseudoId(container), '-webkit-media-te xt-track-region-container');
23 }); 23 });
24 }); 24 });
25 testTrack.src = '../captions-webvtt/captions-regions.vtt'; 25 testTrack.src = '../captions-webvtt/captions-regions.vtt';
26 testTrack.kind = 'captions'; 26 testTrack.kind = 'captions';
27 testTrack.default = true; 27 testTrack.default = true;
28 video.appendChild(testTrack); 28 video.appendChild(testTrack);
29 }); 29 });
30 </script> 30 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/media/track/regions-webvtt/vtt-region-display.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698