| OLD | NEW |
| 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 Loading... |
| 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> |
| OLD | NEW |