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

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-word-breaking.html

Issue 2268923003: Clean up textTrackDisplayElement utility function (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Test that line breaks are forced in captions.</title> 2 <title>Test that line breaks are forced in captions.</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 <script src="../media-file.js"></script> 5 <script src="../media-file.js"></script>
6 <script src="../media-controls.js"></script> 6 <script src="../media-controls.js"></script>
7 <script> 7 <script>
8 // This should not be necessary, but due to crbug.com/372245 style 8 // This should not be necessary, but due to crbug.com/372245 style
9 // gets dirtied during layout in LayoutTextTrackContainer which 9 // gets dirtied during layout in LayoutTextTrackContainer which
10 // causes assertions to fail when Document::scrollingElement is 10 // causes assertions to fail when Document::scrollingElement is
(...skipping 14 matching lines...) Expand all
25 }); 25 });
26 26
27 video.onseeked = t.step_func_done(function() { 27 video.onseeked = t.step_func_done(function() {
28 var multiLineCaptionHeight = getCaptionLineHeight(); 28 var multiLineCaptionHeight = getCaptionLineHeight();
29 assert_greater_than(multiLineCaptionHeight / singleLineCaptionHeight, 2) ; 29 assert_greater_than(multiLineCaptionHeight / singleLineCaptionHeight, 2) ;
30 }); 30 });
31 31
32 video.src = findMediaFile("video", "../content/test"); 32 video.src = findMediaFile("video", "../content/test");
33 33
34 function getCaptionLineHeight() { 34 function getCaptionLineHeight() {
35 var captionElement = textTrackDisplayElement(video).firstChild.firstChil d; 35 var captionElement = textTrackContainerElement(video).firstChild.firstCh ild;
36 return captionElement.getBoundingClientRect().height; 36 return captionElement.getBoundingClientRect().height;
37 } 37 }
38 }); 38 });
39 </script> 39 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698