|
Lines 26-37
LayoutTests/media/track/track-cue-mutable.html_sec1
|
| 26 |
testExpected("textCue.startTime", 0); |
26 |
testExpected("textCue.startTime", 0); |
| 27 |
testExpected("textCue.endTime", 1.0); |
27 |
testExpected("textCue.endTime", 1.0); |
| 28 |
testExpected("textCue.pauseOnExit", false); |
28 |
testExpected("textCue.pauseOnExit", false); |
| 29 |
testExpected("textCue.direction", "horizontal"); |
29 |
testExpected("textCue.vertical", ""); |
| 30 |
testExpected("textCue.snapToLines", true); |
30 |
testExpected("textCue.snapToLines", true); |
| 31 |
testExpected("textCue.linePosition", -1); |
31 |
testExpected("textCue.line", -1); |
| 32 |
testExpected("textCue.textPosition", 50); |
32 |
testExpected("textCue.position", 50); |
| 33 |
testExpected("textCue.size", 100); |
33 |
testExpected("textCue.size", 100); |
| 34 |
testExpected("textCue.alignment", "middle"); |
34 |
testExpected("textCue.align", "middle"); |
| 35 |
|
35 |
|
| 36 |
consoleWrite("<br>** Modify cue values."); |
36 |
consoleWrite("<br>** Modify cue values."); |
| 37 |
|
37 |
|
|
Lines 46-81
LayoutTests/media/track/track-cue-mutable.html_sec2
|
| 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/multipage/the-video-element.html#dom-texttrackcue-direction", |
49 |
logSpecURL("http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-vertical", |
| 50 |
"On setting, the text track cue writing direction must be set to the value ... is a case-sensitive match for the new value, if any. If none of the values match, then the user agent must instead throw a SyntaxError exception."); |
50 |
"On setting, the text track cue writing direction must be set to the value ... is a case-sensitive match for the new value, if any. If none of the values match, then the user agent must instead throw a SyntaxError exception."); |
| 51 |
testException("textCue.direction = 'VERTICAL'", "DOMException.SYNTAX_ERR"); |
51 |
testException("textCue.vertical = 'RL'", "DOMException.SYNTAX_ERR"); |
| 52 |
testExpected("textCue.direction", "horizontal"); |
52 |
testExpected("textCue.vertical", ""); |
| 53 |
run("textCue.direction = 'vertical'"); |
53 |
run("textCue.vertical = 'rl'"); |
| 54 |
testExpected("textCue.direction", "vertical"); |
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/multipage/the-video-element.html#dom-texttrackcue-lineposition", |
60 |
logSpecURL("http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-line", |
| 61 |
"On setting, if the text track cue snap-to-lines flag is not set, and the new value is negative or greater than 100, then throw an IndexSizeError exception."); |
61 |
"On setting, if the text track cue snap-to-lines flag is not set, and the new value is negative or greater than 100, then throw an IndexSizeError exception."); |
| 62 |
testException("textCue.linePosition = -2", "DOMException.INDEX_SIZE_ERR"); |
62 |
testException("textCue.line = -2", "DOMException.INDEX_SIZE_ERR"); |
| 63 |
testException("textCue.linePosition = 102", "DOMException.INDEX_SIZE_ERR"); |
63 |
testException("textCue.line = 102", "DOMException.INDEX_SIZE_ERR"); |
| 64 |
testExpected("textCue.linePosition", -1); |
64 |
testExpected("textCue.line", -1); |
| 65 |
run("textCue.linePosition = 42"); |
65 |
run("textCue.line = 42"); |
| 66 |
testExpected("textCue.linePosition", 42); |
66 |
testExpected("textCue.line", 42); |
| 67 |
run("textCue.snapToLines = true"); |
67 |
run("textCue.snapToLines = true"); |
| 68 |
run("textCue.linePosition = -2"); |
68 |
run("textCue.line = -2"); |
| 69 |
testExpected("textCue.linePosition", -2); |
69 |
testExpected("textCue.line", -2); |
| 70 |
run("textCue.linePosition = 102"); |
70 |
run("textCue.line = 102"); |
| 71 |
testExpected("textCue.linePosition", 102); |
71 |
testExpected("textCue.line", 102); |
| 72 |
|
72 |
|
| 73 |
logSpecURL("http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-lineposition", |
73 |
logSpecURL("http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-line", |
| 74 |
"On setting, if the new value is negative or greater than 100, then throw an IndexSizeError exception. Otherwise, set the text track cue text position to the new value."); |
74 |
"On setting, if the new value is negative or greater than 100, then throw an IndexSizeError exception. Otherwise, set the text track cue text position to the new value."); |
| 75 |
testException("textCue.textPosition = -200", "DOMException.INDEX_SIZE_ERR"); |
75 |
testException("textCue.position = -200", "DOMException.INDEX_SIZE_ERR"); |
| 76 |
testException("textCue.textPosition = 110", "DOMException.INDEX_SIZE_ERR"); |
76 |
testException("textCue.position = 110", "DOMException.INDEX_SIZE_ERR"); |
| 77 |
run("textCue.textPosition = 11"); |
77 |
run("textCue.position = 11"); |
| 78 |
testExpected("textCue.textPosition", 11); |
78 |
testExpected("textCue.position", 11); |
| 79 |
|
79 |
|
| 80 |
logSpecURL("http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-size", |
80 |
logSpecURL("http://www.whatwg.org/specs/web-apps/current-work/multipage/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."); |
|
Lines 84-95
LayoutTests/media/track/track-cue-mutable.html_sec3
|
| 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/multipage/the-video-element.html#dom-texttrackcue-alignment", |
87 |
logSpecURL("http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-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 of the values match, then the user agent must instead throw a SyntaxError exception."); |
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 of the values match, then the user agent must instead throw a SyntaxError exception."); |
| 89 |
testException("textCue.alignment = 'End'", "DOMException.SYNTAX_ERR"); |
89 |
testException("textCue.align = 'End'", "DOMException.SYNTAX_ERR"); |
| 90 |
testExpected("textCue.alignment", "middle"); |
90 |
testExpected("textCue.align", "middle"); |
| 91 |
run("textCue.alignment = 'end'"); |
91 |
run("textCue.align = 'end'"); |
| 92 |
testExpected("textCue.alignment", "end"); |
92 |
testExpected("textCue.align", "end"); |
| 93 |
|
93 |
|
| 94 |
consoleWrite(""); |
94 |
consoleWrite(""); |
| 95 |
endTest(); |
95 |
endTest(); |