Closed Bug 1556087 Opened 5 years ago Closed 5 years ago

[webvtt] enable vtt alignment related wpts

Categories

(Core :: Audio/Video: Playback, task, P3)

task

Tracking

()

RESOLVED FIXED
mozilla69
Tracking Status
firefox69 --- fixed

People

(Reporter: alwu, Assigned: alwu)

References

(Blocks 1 open bug)

Details

Attachments

(3 files, 2 obsolete files)

Use this bug to enable and fix those alignment related wpts (align_*.html) which are under the directory webvtt/rendering/cues-with-video/processing-model.

In the reference file, we have no need to add explicitly <br> to add a break, the text would automatically wrap to another line when it overflows.

And always use the WebVTT's default font for the comparison.

Summary: [webvtt] enable wpt 'align_center_wrapped.html'. → [webvtt] enable vtt alignment related wpts
Attachment #9069106 - Attachment description: Bug 1556087 - enable wpt 'align_center_wrapped.html'. → Bug 1556087 - part1: use default font for testing comparison.

In reference files align_center_position_*.html, the text Awesome!!! doesn't exceed the line box's boundary, so it won't wrap to multiple lines.

In other files, we don't have to set the break explicitly, texts would automatically wrap to multiple lines when it exceed the line box's boundary.

For align_start.html and align_start_wrapped.html, we didn't set cue's position, so the cue box would be 100% video's width.

The alignment start [1] is to align the start side of the box, so it would align to the left side of the box, which is equal to set left: 0px.

[1] https://www.w3.org/TR/webvtt1/#webvtt-cue-start-alignment


For other tests, even if we change cues' position from vtt files, the cue box would still keep its left side on the position left:0 or keep its right ride on the position right:0 depending on cue's position.

If cue's position is smaller than 50, the cue box would stay left and reduce its box size. If cue's position is larger than 50 the cue box would stay right and also reduce its box size [2].

Therefore, for align_center_position_lt_50-ref and align_center_position_lt_50_size_gt_maximum_size-ref, we should set left:0 because the box is in the left side.

For align_center_position_gt_50-ref, we have to set right:0.

[2] https://searchfox.org/mozilla-central/source/dom/media/webvtt/vtt.jsm#641-685

Attached file Bug 1556087 - part3 : remove `width`. (obsolete) —

For those two tests, we didn't specify the box's size in vtt files, which means the box's width should be the default value, 100% width.

Attachment #9069154 - Attachment description: Bug 1556087 - part5 : enable wpts. → Bug 1556087 - part4 : enable wpts.
Attachment #9069142 - Attachment description: Bug 1556087 - part4 : remove `width`. → Bug 1556087 - part3 : remove `width`.
Attachment #9069106 - Attachment is obsolete: true
Attachment #9069138 - Attachment description: Bug 1556087 - part3 : adjust 'left' property for reference cues. → Bug 1556087 - part2 : adjust 'left' property for reference cues.
Attachment #9069136 - Attachment description: Bug 1556087 - part2 : remove unnecessary break in reference files. → Bug 1556087 - part1 : remove unnecessary break in reference files.
Attachment #9069142 - Attachment is obsolete: true
Attachment #9069154 - Attachment description: Bug 1556087 - part4 : enable wpts. → Bug 1556087 - part3 : enable wpts.
Pushed by alwu@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/53ae0fe008c7
part1 : remove unnecessary break in reference files. r=heycam
https://hg.mozilla.org/integration/autoland/rev/249be5c1e643
part2 : adjust 'left' property for reference cues. r=heycam
https://hg.mozilla.org/integration/autoland/rev/e708fe457a95
part3 : enable wpts. r=heycam
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/17332 for changes under testing/web-platform/tests

Hi, Jame,
I found that my PR failed on upstream checks because of small color difference which should be ignored by my FUZZY keyword. I didn't know why the FUZZY setting in those ini files didn't work. Do you have any idea?
Thank you.

Flags: needinfo?(james)

The ini files from cenral aren't applied upstream. It's possible to annotate fuzziness in the test if we think it's a property of the test rather than of gecko, but I don't know if that applies in this case. Given that this is the only failure I'm happy to force merge the PR here.

Flags: needinfo?(james)

(In reply to James Graham [:jgraham] from comment #11)

The ini files from cenral aren't applied upstream. It's possible to annotate fuzziness in the test if we think it's a property of the test rather than of gecko, but I don't know if that applies in this case. Given that this is the only failure I'm happy to force merge the PR here.

Do you mean we can set something like a fuzzy range in test itself without using ini file? If so, how should I do before merging the PR?

What I'm afraid is that if this fuzzy can't be detected, will it also affect other following PR upstream checking?

Thank you.

Flags: needinfo?(james)

I already merged the PR :)

But you can set fuzzy in the test, see [1]. However note that it's only really appropriate if there are reasons to think that the fuzziness applies to all browsers.

There are some plans to handle intermittents better in the CI (mostly by labelling them); I suppose we could also consider syncing over fuzzy annotations in some way for the per-browser checks. I'll think about the best approach there.

[1] https://web-platform-tests.org/writing-tests/reftests.html?highlight=fuzzy#fuzzy-matching

Flags: needinfo?(james)

(In reply to James Graham [:jgraham] from comment #13)

I already merged the PR :)

But you can set fuzzy in the test, see [1]. However note that it's only really appropriate if there are reasons to think that the fuzziness applies to all browsers.

There are some plans to handle intermittents better in the CI (mostly by labelling them); I suppose we could also consider syncing over fuzzy annotations in some way for the per-browser checks. I'll think about the best approach there.

[1] https://web-platform-tests.org/writing-tests/reftests.html?highlight=fuzzy#fuzzy-matching

Thank you!

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: