OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
5 | 5 |
6 <script src=../media-file.js></script> | 6 <script src=../media-file.js></script> |
7 <script src=../video-test.js></script> | 7 <script src=../video-test.js></script> |
8 <script> | 8 <script> |
9 | 9 |
10 var cues; | 10 var cues; |
(...skipping 28 matching lines...) Expand all Loading... |
39 testExpected("textCue.startTime", 1.1); | 39 testExpected("textCue.startTime", 1.1); |
40 | 40 |
41 consoleWrite(""); | 41 consoleWrite(""); |
42 run("textCue.endTime = 3.9"); | 42 run("textCue.endTime = 3.9"); |
43 testExpected("textCue.endTime", 3.9); | 43 testExpected("textCue.endTime", 3.9); |
44 | 44 |
45 consoleWrite(""); | 45 consoleWrite(""); |
46 run("textCue.pauseOnExit = true"); | 46 run("textCue.pauseOnExit = true"); |
47 testExpected("textCue.pauseOnExit", true); | 47 testExpected("textCue.pauseOnExit", true); |
48 | 48 |
49 logSpecURL("http://www.whatwg.org/specs/web-apps/current-work/mu
ltipage/the-video-element.html#dom-texttrackcue-vertical", | 49 logSpecURL("http://dev.w3.org/html5/webvtt/#dfn-dom-vttcue-verti
cal", |
50 "On setting, the text track cue writing direction mus
t be set to the value ... is a case-sensitive match for the new value, if any. I
f none of the values match, then the user agent must instead throw a SyntaxError
exception."); | 50 "On setting, the text track cue writing direction mus
t be set to the value given in the first cell of the row in the table above whos
e second cell is a case-sensitive match for the new value."); |
51 testDOMException("textCue.vertical = 'RL'", "DOMException.SYNTAX
_ERR"); | 51 run("textCue.vertical = 'RL'"); |
52 testExpected("textCue.vertical", ""); | 52 testExpected("textCue.vertical", ""); |
53 run("textCue.vertical = 'rl'"); | 53 run("textCue.vertical = 'rl'"); |
54 testExpected("textCue.vertical", "rl"); | 54 testExpected("textCue.vertical", "rl"); |
55 | 55 |
56 consoleWrite(""); | 56 consoleWrite(""); |
57 run("textCue.snapToLines = false"); | 57 run("textCue.snapToLines = false"); |
58 testExpected("textCue.snapToLines", false); | 58 testExpected("textCue.snapToLines", false); |
59 | 59 |
60 logSpecURL("http://www.whatwg.org/specs/web-apps/current-work/mu
ltipage/the-video-element.html#dom-texttrackcue-line", | 60 logSpecURL("http://www.whatwg.org/specs/web-apps/current-work/mu
ltipage/the-video-element.html#dom-texttrackcue-line", |
61 "On setting, if the text track cue snap-to-lines fla
g is not set, and the new value is negative or greater than 100, then throw an I
ndexSizeError exception."); | 61 "On setting, if the text track cue snap-to-lines fla
g is not set, and the new value is negative or greater than 100, then throw an I
ndexSizeError exception."); |
(...skipping 15 matching lines...) Expand all Loading... |
77 run("textCue.position = 11"); | 77 run("textCue.position = 11"); |
78 testExpected("textCue.position", 11); | 78 testExpected("textCue.position", 11); |
79 | 79 |
80 logSpecURL("http://www.whatwg.org/specs/web-apps/current-work/mu
ltipage/the-video-element.html#dom-texttrackcue-size", | 80 logSpecURL("http://www.whatwg.org/specs/web-apps/current-work/mu
ltipage/the-video-element.html#dom-texttrackcue-size", |
81 "On setting, if the new value is negative or greater
than 100, then throw an IndexSizeError exception. Otherwise, set the text track
cue size to the new value."); | 81 "On setting, if the new value is negative or greater
than 100, then throw an IndexSizeError exception. Otherwise, set the text track
cue size to the new value."); |
82 testDOMException("textCue.size = -200", "DOMException.INDEX_SIZE
_ERR"); | 82 testDOMException("textCue.size = -200", "DOMException.INDEX_SIZE
_ERR"); |
83 testDOMException("textCue.size = 110", "DOMException.INDEX_SIZE_
ERR"); | 83 testDOMException("textCue.size = 110", "DOMException.INDEX_SIZE_
ERR"); |
84 run("textCue.size = 57"); | 84 run("textCue.size = 57"); |
85 testExpected("textCue.size", 57); | 85 testExpected("textCue.size", 57); |
86 | 86 |
87 logSpecURL("http://www.whatwg.org/specs/web-apps/current-work/mu
ltipage/the-video-element.html#dom-texttrackcue-align", | 87 logSpecURL("http://dev.w3.org/html5/webvtt/#dfn-dom-vttcue-align
", |
88 "On setting, the text track cue alignment must be set
to the value ... is a case-sensitive match for the new value, if any. If none o
f the values match, then the user agent must instead throw a SyntaxError excepti
on."); | 88 "On setting, the text track cue text alignment must b
e set to the value given in the first cell of the row in the table above whose s
econd cell is a case-sensitive match for the new value."); |
89 testDOMException("textCue.align = 'End'", "DOMException.SYNTAX_E
RR"); | 89 run("textCue.align = 'End'"); |
90 testExpected("textCue.align", "middle"); | 90 testExpected("textCue.align", "middle"); |
91 run("textCue.align = 'end'"); | 91 run("textCue.align = 'end'"); |
92 testExpected("textCue.align", "end"); | 92 testExpected("textCue.align", "end"); |
93 | 93 |
94 consoleWrite(""); | 94 consoleWrite(""); |
95 endTest(); | 95 endTest(); |
96 } | 96 } |
97 | 97 |
98 </script> | 98 </script> |
99 </head> | 99 </head> |
100 <body> | 100 <body> |
101 <p>Tests modifying attributes of a VTTCue</p> | 101 <p>Tests modifying attributes of a VTTCue</p> |
102 <video controls> | 102 <video controls> |
103 <track id="captions" src="captions-webvtt/captions.vtt" kind="captio
ns" onload="trackLoaded()" default> | 103 <track id="captions" src="captions-webvtt/captions.vtt" kind="captio
ns" onload="trackLoaded()" default> |
104 </video> | 104 </video> |
105 </body> | 105 </body> |
106 </html> | 106 </html> |
OLD | NEW |