/home/clopez/webkit/webkit/layout-test-results/media/video-trackmenu-selection-actual.txt

1 Test that we update the menu when the selected track changes.
 1FAIL: Timed out waiting for notifyDone to be called
22
3 
4 EVENT(canplaythrough)
5 
6 *** Set the user's preferred language to English, enable automatic caption selection.
7 RUN(internals.setUserPreferredLanguages(['en']))
8 RUN(internals.setCaptionDisplayMode('AlwaysOn'))
9 
10 ** The preferred language is set to English, but the Spanish track should be enabled because it is available
11 Track menu:
12 0: "Off"
13 1: "Auto (Recommended)"
14 2: "Spanish", checked
15 EXPECTED (video.textTracks[0].mode == 'showing') OK
16 
17 *** Add a text track in the preferred language.
18 RUN(track = document.createElement('track'))
19 RUN(track.setAttribute('kind', 'captions'))
20 RUN(track.src = 'data:text/vtt,WEBVTT%0A%0A00%3A00%3A00.000%20--%3E%2000%3A00%3A01.000%0ACaption%201%0A')
21 RUN(track.setAttribute('srclang', 'en'))
22 RUN(track.setAttribute('onload', 'trackLoaded()'))
23 RUN(video.appendChild(track))
24 
25 EVENT(load)
26 
27 *** The new track should be selected because it is in the preferred language.
28 EXPECTED (event.target.srclang == 'en') OK
29 EXPECTED (event.target.readyState == '2') OK
30 EXPECTED (video.textTracks[0].mode == 'disabled') OK
31 EXPECTED (video.textTracks[1].mode == 'showing') OK
32 Track menu:
33 0: "Off"
34 1: "Auto (Recommended)"
35 2: "English", checked
36 3: "Spanish"
37 
38 END OF TEST
39