Commit ec3bf6e6 authored by Sriram's avatar Sriram Committed by Commit Bot

Fix class_white-space_[normal|pre-line]_wrapped.html wpt/webvtt tests

These tests are using "white" videos and the rendering is not actually
"white" (the CSS color) used in ref test.
Also the ref test has the font property (sans-serif) applied to the inner span,
so we get a different font for the other span - that font has slightly
different metrics (even though it's still 9px), so over the whole line
this ends up yielding an "extra pixel" in height.

Fixed the ref tests to use the actual <video> element instead of
white background <div>, and also fixed the font size issue
by applying font family to parent <span> element.

BUG=930608, 626703

Change-Id: I44c33a8cda08aff2e8b84f2542cc504866bd4c10
Reviewed-on: https://chromium-review.googlesource.com/c/1485628Reviewed-by: default avatarFredrik Söderquist <fs@opera.com>
Commit-Queue: srirama chandra sekhar <srirama.m@samsung.com>
Cr-Commit-Position: refs/heads/master@{#635450}
parent ef0fc520
......@@ -3934,9 +3934,7 @@ crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/
crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_timestamp_future.html [ Failure ]
crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_timestamp_past.html [ Failure ]
crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_transition_with_timestamp.html [ Failure ]
crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_normal_wrapped.html [ Failure ]
crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_nowrap.html [ Failure ]
crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_pre-line_wrapped.html [ Failure ]
crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_pre_wrapped.html [ Failure ]
crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_white-space_pre-wrap_wrapped.html [ Failure ]
crbug.com/626703 external/wpt/webvtt/rendering/cues-with-video/processing-model/selectors/cue_function/class_object/class_with_class.html [ Failure ]
......
<!DOCTYPE html>
<html class="reftest-wait">
<title>Reference for WebVTT rendering, class object, ::cue(c), white-space: normal (cue that wraps)</title>
<style>
html { overflow:hidden }
......@@ -17,12 +18,20 @@ body { margin:0 }
right: 0;
width: 50%;
text-align: center;
font-family: sans-serif;
}
.cue > span {
font-family: sans-serif;
background: rgba(0,0,0,0.8);
color: white;
white-space: normal
}
</style>
<div class="video"><span class="cue"><span>This is a test subtitle that most likely will span over several rows since it's a pretty long cue with a lot of text.</span></span></div>
<script src="/common/reftest-wait.js"></script>
<div class="video">
<video width="320" height="180" autoplay onplaying="this.onplaying = null; this.pause(); takeScreenshot();">
<source src="/media/white.webm" type="video/webm">
<source src="/media/white.mp4" type="video/mp4">
</video>
<span class="cue"><span>This is a test subtitle that most likely will span over several rows since it's a pretty long cue with a lot of text.</span></span>
</div>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html class="reftest-wait">
<title>Reference for WebVTT rendering, class object, ::cue(c), white-space: pre-line (cue that wraps)</title>
<style>
html { overflow:hidden }
......@@ -17,12 +18,20 @@ body { margin:0 }
right: 0;
width: 50%;
text-align: center;
font-family: sans-serif;
}
.cue > span {
font-family: sans-serif;
background: rgba(0,0,0,0.8);
color: white;
white-space: pre-line
}
</style>
<div class="video"><span class="cue"><span>This is a test subtitle that most likely will span over several rows since it's a pretty long cue with a lot of text.</span></span></div>
<script src="/common/reftest-wait.js"></script>
<div class="video">
<video width="320" height="180" autoplay onplaying="this.onplaying = null; this.pause(); takeScreenshot();">
<source src="/media/white.webm" type="video/webm">
<source src="/media/white.mp4" type="video/mp4">
</video>
<span class="cue"><span>This is a test subtitle that most likely will span over several rows since it's a pretty long cue with a lot of text.</span></span>
</div>
</html>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment