Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge r220472 - Old subtitle track is not deleted on 'src' attribute …
…change event https://bugs.webkit.org/show_bug.cgi?id=175031 Patch by Kirill Ovchinnikov <kirill.ovchinnikov@lge.com> on 2017-08-09 Reviewed by Eric Carlson. Source/WebCore: Test: media/track/text-track-src-change.html * html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::textTrackReadyStateChanged): * html/HTMLTrackElement.cpp: (WebCore::HTMLTrackElement::loadTimerFired): * html/shadow/MediaControls.cpp: (WebCore::MediaControls::clearTextDisplayContainer): * html/shadow/MediaControls.h: LayoutTests: * media/track/text-track-src-change-expected.txt: Added. * media/track/text-track-src-change.html: Added.
- Loading branch information
1 parent
68040bb
commit 2974cd5
Showing
8 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
LayoutTests/media/track/text-track-src-change-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Tests Track 'src' changing handling | ||
|
||
|
||
|
||
*** Testing Track 'src' changing | ||
EXPECTED (cues.length == '4') OK | ||
|
||
*** Changing 'src' attribute... | ||
EXPECTED (cues.length == '100') OK | ||
|
||
*** Changing back 'src' attribute... | ||
EXPECTED (cues.length == '4') OK | ||
END OF TEST | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | ||
|
||
<script src=../media-file.js></script> | ||
<script src=../video-test.js></script> | ||
<script> | ||
var stage = 0; | ||
|
||
function trackLoaded() | ||
{ | ||
var testTrack = document.getElementById('testTrack'); | ||
switch (stage) { | ||
case 0: | ||
consoleWrite("<br>*** Testing Track 'src' changing"); | ||
cues = testTrack.track.cues; | ||
testExpected("cues.length", 4); | ||
consoleWrite("<br>*** Changing 'src' attribute..."); | ||
++stage; | ||
testTrack.src = "captions-webvtt/captions-long.vtt"; | ||
break; | ||
case 1: | ||
cues = testTrack.track.cues; | ||
testExpected("cues.length", 100); | ||
consoleWrite("<br>*** Changing back 'src' attribute..."); | ||
++stage; | ||
testTrack.src = "captions-webvtt/tc013-settings.vtt"; | ||
break; | ||
case 2: | ||
cues = testTrack.track.cues; | ||
testExpected("cues.length", 4); | ||
endTest(); | ||
break; | ||
} | ||
} | ||
|
||
setCaptionDisplayMode('Automatic'); | ||
</script> | ||
</head> | ||
<body> | ||
<p>Tests Track 'src' changing handling</p> | ||
<video> | ||
<track id="testTrack" src="captions-webvtt/tc013-settings.vtt" kind="captions" onload="trackLoaded()" default> | ||
</video> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters