Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: third_party/WebKit/LayoutTests/media/track/track-cue-mutable-expected.txt

Issue 1879353002: Convert track tests from video-test.js to testharness.js based (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comment Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 CONSOLE WARNING: The provided value 'RL' is not a valid enum value of type Direc tionSetting.
2 CONSOLE WARNING: The provided value 'End' is not a valid enum value of type Alig nSetting.
3 Tests modifying attributes of a VTTCue
4
5 ** Test initial values.
6 RUN(textCue = cues.getCueById('1'))
7 EXPECTED (textCue.startTime == '0') OK
8 EXPECTED (textCue.endTime == '1') OK
9 EXPECTED (textCue.pauseOnExit == 'false') OK
10 EXPECTED (textCue.vertical == '') OK
11 EXPECTED (textCue.snapToLines == 'true') OK
12 EXPECTED (textCue.line == 'auto') OK
13 EXPECTED (textCue.position == 'auto') OK
14 EXPECTED (textCue.size == '100') OK
15 EXPECTED (textCue.align == 'middle') OK
16
17 ** Modify cue values.
18 RUN(textCue.startTime = 1.1)
19 EXPECTED (textCue.startTime == '1.1') OK
20
21 RUN(textCue.endTime = 3.9)
22 EXPECTED (textCue.endTime == '3.9') OK
23
24 RUN(textCue.pauseOnExit = true)
25 EXPECTED (textCue.pauseOnExit == 'true') OK
26
27 On setting, the text track cue writing direction must be set to the value given in the first cell of the row in the table above whose second cell is a case-sens itive match for the new value.
28 http://dev.w3.org/html5/webvtt/#dfn-dom-vttcue-vertical
29 RUN(textCue.vertical = 'RL')
30 EXPECTED (textCue.vertical == '') OK
31 RUN(textCue.vertical = 'rl')
32 EXPECTED (textCue.vertical == 'rl') OK
33
34 RUN(textCue.snapToLines = false)
35 EXPECTED (textCue.snapToLines == 'false') OK
36
37 On setting, the text track cue line position must be set to the new value; if th e new value is the string 'auto', then it must be interpreted as the special val ue auto.
38 http://dev.w3.org/html5/webvtt/#dfn-vttcue-line
39 EXPECTED (textCue.line == 'auto') OK
40 TEST(textCue.line = 'gazonk') THROWS("TypeError: Failed to set the 'line' proper ty on 'VTTCue': 'gazonk' is not a valid enum value.") FAIL
41 EXPECTED (textCue.line == 'auto') OK
42 RUN(textCue.line = 42)
43 EXPECTED (textCue.line == '42') OK
44 RUN(textCue.line = -2)
45 EXPECTED (textCue.line == '-2') OK
46 RUN(textCue.line = 102)
47 EXPECTED (textCue.line == '102') OK
48 RUN(textCue.snapToLines = true)
49 RUN(textCue.line = -2)
50 EXPECTED (textCue.line == '-2') OK
51 RUN(textCue.line = 102)
52 EXPECTED (textCue.line == '102') OK
53
54 On setting, if the new value is negative or greater than 100, then throw an Inde xSizeError exception. Otherwise, set the text track cue text position to the new value.
55 http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.ht ml#dom-texttrackcue-line
56 TEST(textCue.position = -200) THROWS(DOMException.INDEX_SIZE_ERR: Failed to set the 'position' property on 'VTTCue': The value provided (-200) is outside the ra nge [0, 100].) OK
57 TEST(textCue.position = 110) THROWS(DOMException.INDEX_SIZE_ERR: Failed to set t he 'position' property on 'VTTCue': The value provided (110) is outside the rang e [0, 100].) OK
58 RUN(textCue.position = 11)
59 EXPECTED (textCue.position == '11') OK
60
61 On setting, if the new value is negative or greater than 100, then throw an Inde xSizeError exception. Otherwise, set the text track cue size to the new value.
62 http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.ht ml#dom-texttrackcue-size
63 TEST(textCue.size = -200) THROWS(DOMException.INDEX_SIZE_ERR: Failed to set the 'size' property on 'VTTCue': The value provided (-200) is outside the range [0, 100].) OK
64 TEST(textCue.size = 110) THROWS(DOMException.INDEX_SIZE_ERR: Failed to set the ' size' property on 'VTTCue': The value provided (110) is outside the range [0, 10 0].) OK
65 RUN(textCue.size = 57)
66 EXPECTED (textCue.size == '57') OK
67
68 On setting, the text track cue text alignment must be set to the value given in the first cell of the row in the table above whose second cell is a case-sensiti ve match for the new value.
69 http://dev.w3.org/html5/webvtt/#dfn-dom-vttcue-align
70 RUN(textCue.align = 'End')
71 EXPECTED (textCue.align == 'middle') OK
72 RUN(textCue.align = 'end')
73 EXPECTED (textCue.align == 'end') OK
74
75 END OF TEST
76
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698