Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/media/track/track-cue-rendering-on-resize.html |
| diff --git a/third_party/WebKit/LayoutTests/media/track/track-cue-rendering-on-resize.html b/third_party/WebKit/LayoutTests/media/track/track-cue-rendering-on-resize.html |
| index 04a8d07b2a3332aae507b1e57f132c4dd5bd41d4..4710191ff159037e92315741f8672119ea3a807e 100644 |
| --- a/third_party/WebKit/LayoutTests/media/track/track-cue-rendering-on-resize.html |
| +++ b/third_party/WebKit/LayoutTests/media/track/track-cue-rendering-on-resize.html |
| @@ -1,58 +1,25 @@ |
| <!DOCTYPE html> |
| -<html> |
| - <head> |
| - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| - |
| - <style type="text/css"> |
| - body { |
| - line-height: 108px; |
| - } |
| - </style> |
| - <script src=../media-file.js></script> |
| - <script src=../media-controls.js></script> |
| - |
| - <script> |
| - var multiLineCueDisplayElement; |
| - |
| - function testCueHeight() |
| - { |
| - if (!window.internals) { |
| - failTest(); |
| - return; |
| - } |
| - |
| - var cueContainerElement = textTrackDisplayElement(video); |
| - multiLineCueDisplayElement = textTrackDisplayElement(video, 'display', 0); |
| - |
| - consoleWrite("<br>** Line height of the cue element should be 'normal' **"); |
| - testExpected("getComputedStyle(multiLineCueDisplayElement).lineHeight", "normal"); |
| - |
| - endTest(); |
| - } |
| - |
| - function loaded() |
| - { |
| - consoleWrite("Line height isn't overriden by other CSS values in the file."); |
| - findMediaElement(); |
| - |
| - testTrack = document.querySelector('track'); |
| - video.src = findMediaFile('video', '../content/test'); |
| - |
| - waitForEvent('seeked', testCueHeight); |
| - waitForEvent('canplaythrough', function() { |
| - video.currentTime = 1.25; |
| - }); |
| - } |
| - |
| - </script> |
| - |
| - <!-- TODO(philipj): Convert test to testharness.js. crbug.com/588956 |
| - (Please avoid writing new tests using video-test.js) --> |
| - <script src=../video-test.js></script> |
| - </head> |
| - <body onload="loaded()"> |
| - <video controls> |
| - <track src="captions-webvtt/captions-snap-to-lines-set.vtt" kind="captions" default> |
| - </video> |
| - </body> |
| -</html> |
| +<title>Test that Line Height of cue element isn't overridden by author CSS.</title> |
|
philipj_slow
2016/04/21 12:48:17
No need to capitalize Line Height
|
| +<script src="../media-file.js"></script> |
| +<script src="../media-controls.js"></script> |
| +<script src="../../resources/testharness.js"></script> |
| +<script src="../../resources/testharnessreport.js"></script> |
| +<style> |
| +body { line-height: 108px; } |
| +</style> |
| +<video> |
| + <track src="captions-webvtt/captions-snap-to-lines-set.vtt" kind="captions" default> |
| +</video> |
| +<script> |
| +async_test(function(t) { |
| + var video = document.querySelector('video'); |
| + video.src = findMediaFile('video', '../content/test'); |
| + |
| + video.onseeked = t.step_func_done(function() { |
| + var multiLineCueDisplayElement = textTrackDisplayElement(video, 'display', 0); |
| + assert_equals(getComputedStyle(multiLineCueDisplayElement).lineHeight, 'normal'); |
| + }); |
| + |
| + video.currentTime = 1.25; |
| +}); |
| +</script> |