Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gecko Bug 1548731] part3 : modify wpt 'track-mode.html'. #16879

Merged
merged 1 commit into from May 16, 2019

Conversation

moz-wptsync-bot
Copy link
Collaborator

This patch does two changes in order to test the correct behavior.

(1) Not to use time out function
Waiting for 0.4s by using timeout function doesn't mean the code will exactly be executed after 0.4s.
If we would like to specify the time when we would like to change track's mode, we should listen for video's timeupdate to get the correct result.

(2) Modify ending condition
As this test is going to turn the track's mode to showing/hidden after video plays after 0.4s, the second and the third cue would be showed correctly.

The second cue is from 0.3 to 0.7, so when we changed track mode in 0.4s, the second cue would be regard as an active cue, and we would dispatched enter event on it. When the cue is going to become inactive, the event exit would be dispatched.

Therefore, there would be total 4 times of the accumulation of enter and exit events, which means oncuechange would also be dispatched 4 times.

Differential Revision: https://phabricator.services.mozilla.com/D30141

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1548731
gecko-commit: 304294b29dae2db6e398ed5693d5a65821812c0d
gecko-integration-branch: central
gecko-reviewers: smaug

This patch does two changes in order to test the correct behavior.

(1) Not to use time out function
Waiting for 0.4s by using timeout function doesn't mean the code will exactly be executed after 0.4s.
If we would like to specify the time when we would like to change track's mode, we should listen for video's `timeupdate` to get the correct result.

(2) Modify ending condition
As this test is going to turn the track's mode to `showing/hidden` after video plays after 0.4s, the second and the third cue would be showed correctly.

The second cue is from 0.3 to 0.7, so when we changed track mode in 0.4s, the second cue would be regard as an active cue, and we would dispatched `enter` event on it. When the cue is going to become inactive, the event `exit` would be dispatched.

Therefore, there would be total 4 times of the accumulation of `enter` and `exit` events, which means `oncuechange` would also be dispatched 4 times.

Differential Revision: https://phabricator.services.mozilla.com/D30141

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1548731
gecko-commit: 304294b29dae2db6e398ed5693d5a65821812c0d
gecko-integration-branch: central
gecko-reviewers: smaug
Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

@moz-wptsync-bot moz-wptsync-bot merged commit bb0dd38 into master May 16, 2019
@moz-wptsync-bot moz-wptsync-bot deleted the gecko/1548731 branch May 16, 2019 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants