tizen beta release
[profile/ivi/webkit-efl.git] / LayoutTests / media / track / track-webvtt-tc008-timings-no-hours.html
1 <!DOCTYPE html>
2 <html>
3     <head>
4         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5
6         <script src=../media-file.js></script>
7         <script src=../video-test.js></script>
8         <script>            
9
10             numberOfTrackTests = 2;
11             
12             function trackLoaded()
13             {
14                 numberOfTracksLoaded++;
15                 if (numberOfTracksLoaded == numberOfTrackTests) {
16                     testTrack0();
17                     testTrack1();
18                 }
19             }
20             
21             function testTrack0()
22             {
23                 findMediaElement();
24                 var expected = 
25                 {
26                     length : 4,
27                     tests:
28                     [
29                         {
30                             property : "id",
31                             values : ["1", "2", "3", "4"],
32                         },
33                         {
34                             property : "startTime",
35                             values : [0.0, 31.0, 61.0, 121.0],
36                         },
37                         {
38                             property : "endTime",
39                             values : [30.5, 60.5, 120.5, 180.5],
40                         },
41                         {
42                             property : "getCueAsSource()",
43                             values : ["Bear is Coming!!!!!", "I said Bear is coming!!!!", "I said Bear is coming now!!!!", "tab separators"],
44                         },
45                     ],
46                 };
47                 testCues(0, expected);
48
49                 allTestsEnded();
50             }
51
52             function testTrack1()
53             {
54                 findMediaElement();
55                 var expected = 
56                 {
57                     length : 0,
58                     tests:
59                     [],
60                 };
61                 testCues(1, expected);
62
63                 allTestsEnded();
64             }
65         </script>
66     </head>
67     <body>
68         <p>Tests cue timings that do not contain hours (they are optional), and tests various syntax errors in timings without hours.</p>
69         <video>
70             <track src="captions-webvtt/tc008-timings-no-hour.vtt" onload="trackLoaded()">
71             <track src="captions-webvtt/tc008-timings-no-hour-errors.vtt" onload="trackLoaded()">
72         </video>
73     </body>
74 </html>