Index: LayoutTests/media/track/track-cue-rendering-wider-than-controls.html |
diff --git a/LayoutTests/media/track/track-cue-rendering-wider-than-controls.html b/LayoutTests/media/track/track-cue-rendering-wider-than-controls.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..1f7ec2927c6a4577d03e8cd5a8ec7fc78df9b60a |
--- /dev/null |
+++ b/LayoutTests/media/track/track-cue-rendering-wider-than-controls.html |
@@ -0,0 +1,35 @@ |
+<!DOCTYPE html> |
+<script src=../media-file.js></script> |
+<script src=../video-test.js></script> |
+<script src=../media-controls.js></script> |
+<script> |
+var controlsContainer; |
+var cueRoot; |
+ |
+window.onload = function() { |
+ consoleWrite("Test that the cue root is not constrained by the controls/overlay."); |
+ findMediaElement(); |
+ video.src = findMediaFile('video', '../content/test'); |
+ waitForEvent('seeked', function() { |
+ // The width of the controls depends on UA style, so verify that our assumption holds. |
+ controlsContainer = mediaControlsButton(video, "panel"); |
+ testExpected("parseFloat(getComputedStyle(controlsContainer).width)", "800", "<="); |
+ |
+ cueRoot = textTrackDisplayElement(video); |
+ testExpected("parseFloat(getComputedStyle(cueRoot).width)", "800", ">"); |
+ endTest(); |
+ }); |
+ waitForEventOnce('canplaythrough', function() { |
+ video.currentTime = 2; |
+ }); |
+}; |
+</script> |
+<style> |
+video { |
+ width: 2000px; |
+ height: 750px; |
+} |
+</style> |
+<video controls> |
+ <track src="captions-webvtt/long-word.vtt" default> |
+</video> |