| Differences between
and this patch
- Source/WebCore/ChangeLog +34 lines
Lines 1-3 Source/WebCore/ChangeLog_sec1
1
2012-02-23  Eric Carlson  <eric.carlson@apple.com>
2
3
        Update TextTrackCue API
4
        https://bugs.webkit.org/show_bug.cgi?id=79368
5
6
        Change TextTrackCue.alignment to .align, TextTrackCue.linePosition and .textPosition to .line
7
        and .position, and TextTrackCue.direction to .vertical. Change direction values "horizontal" 
8
        to "","vertical" to "rl", and "vertical-lr" to "lr".
9
10
        Reviewed by NOBODY (OOPS!).
11
12
        No new tests, updated existing tests for API changes.
13
14
        * html/track/TextTrackCue.cpp:
15
        (WebCore::horizontalKeyword):
16
        (WebCore::verticalGrowingLeftKeyword):
17
        (WebCore):
18
        (WebCore::verticalGrowingRightKeyword):
19
        (WebCore::verticalKeywordOLD):
20
        (WebCore::verticallrKeywordOLD):
21
        (WebCore::TextTrackCue::TextTrackCue):
22
        (WebCore::TextTrackCue::vertical):
23
        (WebCore::TextTrackCue::setVertical):
24
        (WebCore::TextTrackCue::setLine):
25
        (WebCore::TextTrackCue::setPosition):
26
        (WebCore::TextTrackCue::align):
27
        (WebCore::TextTrackCue::setAlign):
28
        (WebCore::TextTrackCue::parseSettings):
29
        * html/track/TextTrackCue.h:
30
        (TextTrackCue):
31
        (WebCore::TextTrackCue::line):
32
        (WebCore::TextTrackCue::position):
33
        * html/track/TextTrackCue.idl:
34
1
2012-02-23  Tom Sepez  <tsepez@chromium.org>
35
2012-02-23  Tom Sepez  <tsepez@chromium.org>
2
36
3
        [chromium] XSS Auditor bypass via javascript url and control characters
37
        [chromium] XSS Auditor bypass via javascript url and control characters
- Source/WebCore/html/track/TextTrackCue.cpp -17 / +33 lines
Lines 66-96 static const AtomicString& endKeyword() Source/WebCore/html/track/TextTrackCue.cpp_sec1
66
66
67
static const AtomicString& horizontalKeyword()
67
static const AtomicString& horizontalKeyword()
68
{
68
{
69
    DEFINE_STATIC_LOCAL(const AtomicString, horizontal, ("horizontal"));
69
    DEFINE_STATIC_LOCAL(const AtomicString, horizontal, (emptyString()));
70
    return horizontal;
70
    return horizontal;
71
}
71
}
72
72
73
static const AtomicString& verticalKeyword()
73
static const AtomicString& verticalGrowingLeftKeyword()
74
{
75
    DEFINE_STATIC_LOCAL(const AtomicString, vertical, ("rl"));
76
    return vertical;
77
}
78
79
static const AtomicString& verticalGrowingRightKeyword()
80
{
81
    DEFINE_STATIC_LOCAL(const AtomicString, verticallr, ("lr"));
82
    return verticallr;
83
}
84
85
// FIXME: remove this once https://bugs.webkit.org/show_bug.cgi?id=78706 has been fixed.
86
static const AtomicString& verticalKeywordOLD()
74
{
87
{
75
    DEFINE_STATIC_LOCAL(const AtomicString, vertical, ("vertical"));
88
    DEFINE_STATIC_LOCAL(const AtomicString, vertical, ("vertical"));
76
    return vertical;
89
    return vertical;
77
}
90
}
78
static const AtomicString& verticallrKeyword()
91
92
// FIXME: remove this once https://bugs.webkit.org/show_bug.cgi?id=78706 has been fixed.
93
static const AtomicString& verticallrKeywordOLD()
79
{
94
{
80
    DEFINE_STATIC_LOCAL(const AtomicString, verticallr, ("vertical-lr"));
95
    DEFINE_STATIC_LOCAL(const AtomicString, verticallr, ("vertical-lr"));
81
    return verticallr;
96
    return verticallr;
82
}
97
}
83
    
98
    
99
84
TextTrackCue::TextTrackCue(ScriptExecutionContext* context, const String& id, double start, double end, const String& content, const String& settings, bool pauseOnExit)
100
TextTrackCue::TextTrackCue(ScriptExecutionContext* context, const String& id, double start, double end, const String& content, const String& settings, bool pauseOnExit)
85
    : m_id(id)
101
    : m_id(id)
86
    , m_startTime(start)
102
    , m_startTime(start)
87
    , m_endTime(end)
103
    , m_endTime(end)
88
    , m_content(content)
104
    , m_content(content)
89
    , m_writingDirection(Horizontal)
90
    , m_linePosition(-1)
105
    , m_linePosition(-1)
91
    , m_textPosition(50)
106
    , m_textPosition(50)
92
    , m_cueSize(100)
107
    , m_cueSize(100)
93
    , m_cueIndex(invalidCueIndex)
108
    , m_cueIndex(invalidCueIndex)
109
    , m_writingDirection(Horizontal)
94
    , m_cueAlignment(Middle)
110
    , m_cueAlignment(Middle)
95
    , m_scriptExecutionContext(context)
111
    , m_scriptExecutionContext(context)
96
    , m_isActive(false)
112
    , m_isActive(false)
Lines 166-187 void TextTrackCue::setPauseOnExit(bool v Source/WebCore/html/track/TextTrackCue.cpp_sec2
166
    cueDidChange();
182
    cueDidChange();
167
}
183
}
168
184
169
const String& TextTrackCue::direction() const
185
const String& TextTrackCue::vertical() const
170
{
186
{
171
    switch (m_writingDirection) {
187
    switch (m_writingDirection) {
172
    case Horizontal: 
188
    case Horizontal: 
173
        return horizontalKeyword();
189
        return horizontalKeyword();
174
    case VerticalGrowingLeft:
190
    case VerticalGrowingLeft:
175
        return verticalKeyword();
191
        return verticalGrowingLeftKeyword();
176
    case VerticalGrowingRight:
192
    case VerticalGrowingRight:
177
        return verticallrKeyword();
193
        return verticalGrowingRightKeyword();
178
    default:
194
    default:
179
        ASSERT_NOT_REACHED();
195
        ASSERT_NOT_REACHED();
180
        return emptyString();
196
        return emptyString();
181
    }
197
    }
182
}
198
}
183
199
184
void TextTrackCue::setDirection(const String& value, ExceptionCode& ec)
200
void TextTrackCue::setVertical(const String& value, ExceptionCode& ec)
185
{
201
{
186
    // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-direction
202
    // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-direction
187
    // On setting, the text track cue writing direction must be set to the value given 
203
    // On setting, the text track cue writing direction must be set to the value given 
Lines 189-200 void TextTrackCue::setDirection(const St Source/WebCore/html/track/TextTrackCue.cpp_sec3
189
    // case-sensitive match for the new value, if any. If none of the values match, then
205
    // case-sensitive match for the new value, if any. If none of the values match, then
190
    // the user agent must instead throw a SyntaxError exception.
206
    // the user agent must instead throw a SyntaxError exception.
191
    
207
    
192
    Direction direction = m_writingDirection;
208
    WritingDirection direction = m_writingDirection;
193
    if (value == horizontalKeyword())
209
    if (value == horizontalKeyword())
194
        direction = Horizontal;
210
        direction = Horizontal;
195
    else if (value == verticalKeyword())
211
    else if (value == verticalGrowingLeftKeyword())
196
        direction = VerticalGrowingLeft;
212
        direction = VerticalGrowingLeft;
197
    else if (value == verticallrKeyword())
213
    else if (value == verticalGrowingRightKeyword())
198
        direction = VerticalGrowingRight;
214
        direction = VerticalGrowingRight;
199
    else
215
    else
200
        ec = SYNTAX_ERR;
216
        ec = SYNTAX_ERR;
Lines 217-223 void TextTrackCue::setSnapToLines(bool v Source/WebCore/html/track/TextTrackCue.cpp_sec4
217
    cueDidChange();
233
    cueDidChange();
218
}
234
}
219
235
220
void TextTrackCue::setLinePosition(int position, ExceptionCode& ec)
236
void TextTrackCue::setLine(int position, ExceptionCode& ec)
221
{
237
{
222
    // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-lineposition
238
    // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-lineposition
223
    // On setting, if the text track cue snap-to-lines flag is not set, and the new
239
    // On setting, if the text track cue snap-to-lines flag is not set, and the new
Lines 236-242 void TextTrackCue::setLinePosition(int p Source/WebCore/html/track/TextTrackCue.cpp_sec5
236
    cueDidChange();
252
    cueDidChange();
237
}
253
}
238
254
239
void TextTrackCue::setTextPosition(int position, ExceptionCode& ec)
255
void TextTrackCue::setPosition(int position, ExceptionCode& ec)
240
{
256
{
241
    // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-lineposition
257
    // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-lineposition
242
    // On setting, if the new value is negative or greater than 100, then throw an IndexSizeError exception.
258
    // On setting, if the new value is negative or greater than 100, then throw an IndexSizeError exception.
Lines 274-280 void TextTrackCue::setSize(int size, Exc Source/WebCore/html/track/TextTrackCue.cpp_sec6
274
    cueDidChange();
290
    cueDidChange();
275
}
291
}
276
292
277
const String& TextTrackCue::alignment() const
293
const String& TextTrackCue::align() const
278
{
294
{
279
    switch (m_cueAlignment) {
295
    switch (m_cueAlignment) {
280
    case Start:
296
    case Start:
Lines 289-295 const String& TextTrackCue::alignment() Source/WebCore/html/track/TextTrackCue.cpp_sec7
289
    }
305
    }
290
}
306
}
291
307
292
void TextTrackCue::setAlignment(const String& value, ExceptionCode& ec)
308
void TextTrackCue::setAlign(const String& value, ExceptionCode& ec)
293
{
309
{
294
    // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-alignment
310
    // http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-alignment
295
    // On setting, the text track cue alignment must be set to the value given in the 
311
    // On setting, the text track cue alignment must be set to the value given in the 
Lines 405-413 void TextTrackCue::parseSettings(const S Source/WebCore/html/track/TextTrackCue.cpp_sec8
405
            {
421
            {
406
            // 1-3 - Collect the next word and set the writing direction accordingly.
422
            // 1-3 - Collect the next word and set the writing direction accordingly.
407
            String writingDirection = WebVTTParser::collectWord(input, &position);
423
            String writingDirection = WebVTTParser::collectWord(input, &position);
408
            if (writingDirection == verticalKeyword())
424
            if (writingDirection == verticalKeywordOLD())
409
                m_writingDirection = VerticalGrowingLeft;
425
                m_writingDirection = VerticalGrowingLeft;
410
            else if (writingDirection == verticallrKeyword())
426
            else if (writingDirection == verticallrKeywordOLD())
411
                m_writingDirection = VerticalGrowingRight;
427
                m_writingDirection = VerticalGrowingRight;
412
            }
428
            }
413
            break;
429
            break;
- Source/WebCore/html/track/TextTrackCue.h -12 / +13 lines
Lines 51-59 public: Source/WebCore/html/track/TextTrackCue.h_sec1
51
        return adoptRef(new TextTrackCue(context, id, start, end, content, settings, pauseOnExit));
51
        return adoptRef(new TextTrackCue(context, id, start, end, content, settings, pauseOnExit));
52
    }
52
    }
53
53
54
    enum Direction { Horizontal, VerticalGrowingLeft, VerticalGrowingRight };
55
    enum Alignment { Start, Middle, End };
56
57
    virtual ~TextTrackCue();
54
    virtual ~TextTrackCue();
58
55
59
    TextTrack* track() const;
56
    TextTrack* track() const;
Lines 71-93 public: Source/WebCore/html/track/TextTrackCue.h_sec2
71
    bool pauseOnExit() const { return m_pauseOnExit; }
68
    bool pauseOnExit() const { return m_pauseOnExit; }
72
    void setPauseOnExit(bool);
69
    void setPauseOnExit(bool);
73
70
74
    const String& direction() const;
71
    const String& vertical() const;
75
    void setDirection(const String&, ExceptionCode&);
72
    void setVertical(const String&, ExceptionCode&);
76
73
77
    bool snapToLines() const { return m_snapToLines; }
74
    bool snapToLines() const { return m_snapToLines; }
78
    void setSnapToLines(bool);
75
    void setSnapToLines(bool);
79
76
80
    int linePosition() const { return m_linePosition; }
77
    int line() const { return m_linePosition; }
81
    void setLinePosition(int, ExceptionCode&);
78
    void setLine(int, ExceptionCode&);
82
79
83
    int textPosition() const { return m_textPosition; }
80
    int position() const { return m_textPosition; }
84
    void setTextPosition(int, ExceptionCode&);
81
    void setPosition(int, ExceptionCode&);
85
82
86
    int size() const { return m_cueSize; }
83
    int size() const { return m_cueSize; }
87
    void setSize(int, ExceptionCode&);
84
    void setSize(int, ExceptionCode&);
88
85
89
    const String& alignment() const;
86
    const String& align() const;
90
    void setAlignment(const String&, ExceptionCode&);
87
    void setAlign(const String&, ExceptionCode&);
91
88
92
    const String& text() const { return m_content; }
89
    const String& text() const { return m_content; }
93
    void setText(const String&);
90
    void setText(const String&);
Lines 132-144 private: Source/WebCore/html/track/TextTrackCue.h_sec3
132
    double m_startTime;
129
    double m_startTime;
133
    double m_endTime;
130
    double m_endTime;
134
    String m_content;
131
    String m_content;
135
    Direction m_writingDirection;
136
    int m_linePosition;
132
    int m_linePosition;
137
    int m_textPosition;
133
    int m_textPosition;
138
    int m_cueSize;
134
    int m_cueSize;
139
    int m_cueIndex;
135
    int m_cueIndex;
140
136
137
    enum WritingDirection { Horizontal, VerticalGrowingLeft, VerticalGrowingRight };
138
    WritingDirection m_writingDirection;
139
140
    enum Alignment { Start, Middle, End };
141
    Alignment m_cueAlignment;
141
    Alignment m_cueAlignment;
142
142
    RefPtr<DocumentFragment> m_documentFragment;
143
    RefPtr<DocumentFragment> m_documentFragment;
143
    RefPtr<TextTrack> m_track;
144
    RefPtr<TextTrack> m_track;
144
145
- Source/WebCore/html/track/TextTrackCue.idl -5 / +5 lines
Lines 42-57 module html { Source/WebCore/html/track/TextTrackCue.idl_sec1
42
        attribute double endTime;
42
        attribute double endTime;
43
        attribute boolean pauseOnExit;
43
        attribute boolean pauseOnExit;
44
44
45
        attribute DOMString direction
45
        attribute DOMString vertical
46
            setter raises (DOMException);
46
            setter raises (DOMException);
47
        attribute boolean snapToLines;
47
        attribute boolean snapToLines;
48
        attribute long linePosition
48
        attribute long line
49
            setter raises (DOMException);
49
            setter raises (DOMException);
50
        attribute long textPosition
50
        attribute long position
51
            setter raises (DOMException);
51
            setter raises (DOMException);
52
        attribute long size
52
        attribute long size
53
            setter raises (DOMException);
53
            setter raises (DOMException);
54
        attribute DOMString alignment
54
        attribute DOMString align
55
            setter raises (DOMException);
55
            setter raises (DOMException);
56
56
57
        attribute DOMString text;
57
        attribute DOMString text;
Lines 71-74 module html { Source/WebCore/html/track/TextTrackCue.idl_sec2
71
            raises(EventException);
71
            raises(EventException);
72
    };
72
    };
73
73
74
}
74
}
- LayoutTests/ChangeLog +29 lines
Lines 1-3 LayoutTests/ChangeLog_sec1
1
2012-02-23  Eric Carlson  <eric.carlson@apple.com>
2
3
        Update TextTrackCue API
4
        https://bugs.webkit.org/show_bug.cgi?id=79368
5
6
        Reviewed by NOBODY (OOPS!).
7
8
        * media/track/track-add-remove-cue-expected.txt:
9
        * media/track/track-add-remove-cue.html:
10
        * media/track/track-cue-mutable-expected.txt:
11
        * media/track/track-cue-mutable.html:
12
        * media/track/track-webvtt-tc013-settings-expected.txt:
13
        * media/track/track-webvtt-tc013-settings.html:
14
        * media/track/track-webvtt-tc014-alignment-expected.txt:
15
        * media/track/track-webvtt-tc014-alignment.html:
16
        * media/track/track-webvtt-tc015-positioning-expected.txt:
17
        * media/track/track-webvtt-tc015-positioning.html:
18
        * media/track/track-webvtt-tc016-align-positioning-expected.txt:
19
        * media/track/track-webvtt-tc016-align-positioning.html:
20
        * media/track/track-webvtt-tc017-line-position-expected.txt:
21
        * media/track/track-webvtt-tc017-line-position.html:
22
        * media/track/track-webvtt-tc018-align-text-line-position-expected.txt:
23
        * media/track/track-webvtt-tc018-align-text-line-position.html:
24
        * media/track/track-webvtt-tc020-cue-size-align-expected.txt:
25
        * media/track/track-webvtt-tc020-cue-size-align.html:
26
        * media/track/track-webvtt-tc021-valign-expected.txt:
27
        * media/track/track-webvtt-tc021-valign.html:
28
        * platform/mac/Skipped:
29
1
2012-02-23  Tom Sepez  <tsepez@chromium.org>
30
2012-02-23  Tom Sepez  <tsepez@chromium.org>
2
31
3
        [chromium] XSS Auditor bypass via javascript url and control characters
32
        [chromium] XSS Auditor bypass via javascript url and control characters
- LayoutTests/media/track/track-add-remove-cue-expected.txt -8 / +8 lines
Lines 16-27 EXPECTED (textCue.id == 'sausage-cue') O LayoutTests/media/track/track-add-remove-cue-expected.txt_sec1
16
EXPECTED (textCue.startTime == '33') OK
16
EXPECTED (textCue.startTime == '33') OK
17
EXPECTED (textCue.endTime == '3.4') OK
17
EXPECTED (textCue.endTime == '3.4') OK
18
EXPECTED (textCue.pauseOnExit == 'false') OK
18
EXPECTED (textCue.pauseOnExit == 'false') OK
19
EXPECTED (textCue.direction == 'horizontal') OK
19
EXPECTED (textCue.vertical == '') OK
20
EXPECTED (textCue.snapToLines == 'true') OK
20
EXPECTED (textCue.snapToLines == 'true') OK
21
EXPECTED (textCue.linePosition == '-1') OK
21
EXPECTED (textCue.line == '-1') OK
22
EXPECTED (textCue.textPosition == '50') OK
22
EXPECTED (textCue.position == '50') OK
23
EXPECTED (textCue.size == '100') OK
23
EXPECTED (textCue.size == '100') OK
24
EXPECTED (textCue.alignment == 'middle') OK
24
EXPECTED (textCue.align == 'middle') OK
25
25
26
*** Add the new cue to a track, make sure it is inserted correctly.
26
*** Add the new cue to a track, make sure it is inserted correctly.
27
RUN(testTrack.track.addCue(textCue))
27
RUN(testTrack.track.addCue(textCue))
Lines 39-50 EXPECTED (newCue.id == 'test') OK LayoutTests/media/track/track-add-remove-cue-expected.txt_sec2
39
EXPECTED (newCue.startTime == '0') OK
39
EXPECTED (newCue.startTime == '0') OK
40
EXPECTED (newCue.endTime == '1') OK
40
EXPECTED (newCue.endTime == '1') OK
41
EXPECTED (newCue.pauseOnExit == 'false') OK
41
EXPECTED (newCue.pauseOnExit == 'false') OK
42
EXPECTED (newCue.direction == 'horizontal') OK
42
EXPECTED (newCue.vertical == '') OK
43
EXPECTED (newCue.snapToLines == 'true') OK
43
EXPECTED (newCue.snapToLines == 'true') OK
44
EXPECTED (newCue.linePosition == '-1') OK
44
EXPECTED (newCue.line == '-1') OK
45
EXPECTED (newCue.textPosition == '50') OK
45
EXPECTED (newCue.position == '50') OK
46
EXPECTED (newCue.size == '100') OK
46
EXPECTED (newCue.size == '100') OK
47
EXPECTED (newCue.alignment == 'middle') OK
47
EXPECTED (newCue.align == 'middle') OK
48
48
49
*** Remove a cue created with addCue().
49
*** Remove a cue created with addCue().
50
RUN(testTrack.track.removeCue(textCue))
50
RUN(testTrack.track.removeCue(textCue))
- LayoutTests/media/track/track-add-remove-cue.html -8 / +8 lines
Lines 29-40 LayoutTests/media/track/track-add-remove-cue.html_sec1
29
                testExpected("textCue.startTime", 33);
29
                testExpected("textCue.startTime", 33);
30
                testExpected("textCue.endTime", 3.4);
30
                testExpected("textCue.endTime", 3.4);
31
                testExpected("textCue.pauseOnExit", false);
31
                testExpected("textCue.pauseOnExit", false);
32
                testExpected("textCue.direction", "horizontal");
32
                testExpected("textCue.vertical", "");
33
                testExpected("textCue.snapToLines", true);
33
                testExpected("textCue.snapToLines", true);
34
                testExpected("textCue.linePosition", -1);
34
                testExpected("textCue.line", -1);
35
                testExpected("textCue.textPosition", 50);
35
                testExpected("textCue.position", 50);
36
                testExpected("textCue.size", 100);
36
                testExpected("textCue.size", 100);
37
                testExpected("textCue.alignment", "middle");
37
                testExpected("textCue.align", "middle");
38
38
39
                consoleWrite("<br>*** Add the new cue to a track, make sure it is inserted correctly.");
39
                consoleWrite("<br>*** Add the new cue to a track, make sure it is inserted correctly.");
40
                run("testTrack.track.addCue(textCue)");
40
                run("testTrack.track.addCue(textCue)");
Lines 54-65 LayoutTests/media/track/track-add-remove-cue.html_sec2
54
                testExpected("newCue.startTime", 0.0);
54
                testExpected("newCue.startTime", 0.0);
55
                testExpected("newCue.endTime", 1.0);
55
                testExpected("newCue.endTime", 1.0);
56
                testExpected("newCue.pauseOnExit", false);
56
                testExpected("newCue.pauseOnExit", false);
57
                testExpected("newCue.direction", "horizontal");
57
                testExpected("newCue.vertical", "");
58
                testExpected("newCue.snapToLines", true);
58
                testExpected("newCue.snapToLines", true);
59
                testExpected("newCue.linePosition", -1);
59
                testExpected("newCue.line", -1);
60
                testExpected("newCue.textPosition", 50);
60
                testExpected("newCue.position", 50);
61
                testExpected("newCue.size", 100);
61
                testExpected("newCue.size", 100);
62
                testExpected("newCue.alignment", "middle");
62
                testExpected("newCue.align", "middle");
63
63
64
                consoleWrite("<br>*** Remove a cue created with addCue().");
64
                consoleWrite("<br>*** Remove a cue created with addCue().");
65
                run("testTrack.track.removeCue(textCue)");
65
                run("testTrack.track.removeCue(textCue)");
- LayoutTests/media/track/track-cue-mutable-expected.txt -29 / +29 lines
Lines 5-16 RUN(textCue = cues.getCueById('1')) LayoutTests/media/track/track-cue-mutable-expected.txt_sec1
5
EXPECTED (textCue.startTime == '0') OK
5
EXPECTED (textCue.startTime == '0') OK
6
EXPECTED (textCue.endTime == '1') OK
6
EXPECTED (textCue.endTime == '1') OK
7
EXPECTED (textCue.pauseOnExit == 'false') OK
7
EXPECTED (textCue.pauseOnExit == 'false') OK
8
EXPECTED (textCue.direction == 'horizontal') OK
8
EXPECTED (textCue.vertical == '') OK
9
EXPECTED (textCue.snapToLines == 'true') OK
9
EXPECTED (textCue.snapToLines == 'true') OK
10
EXPECTED (textCue.linePosition == '-1') OK
10
EXPECTED (textCue.line == '-1') OK
11
EXPECTED (textCue.textPosition == '50') OK
11
EXPECTED (textCue.position == '50') OK
12
EXPECTED (textCue.size == '100') OK
12
EXPECTED (textCue.size == '100') OK
13
EXPECTED (textCue.alignment == 'middle') OK
13
EXPECTED (textCue.align == 'middle') OK
14
14
15
** Modify cue values.
15
** Modify cue values.
16
RUN(textCue.startTime = 1.1)
16
RUN(textCue.startTime = 1.1)
Lines 23-56 RUN(textCue.pauseOnExit = true) LayoutTests/media/track/track-cue-mutable-expected.txt_sec2
23
EXPECTED (textCue.pauseOnExit == 'true') OK
23
EXPECTED (textCue.pauseOnExit == 'true') OK
24
24
25
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.
25
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.
26
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-direction
26
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-vertical
27
TEST(textCue.direction = 'VERTICAL') THROWS(DOMException.SYNTAX_ERR) OK
27
TEST(textCue.vertical = 'RL') THROWS(DOMException.SYNTAX_ERR) OK
28
EXPECTED (textCue.direction == 'horizontal') OK
28
EXPECTED (textCue.vertical == '') OK
29
RUN(textCue.direction = 'vertical')
29
RUN(textCue.vertical = 'rl')
30
EXPECTED (textCue.direction == 'vertical') OK
30
EXPECTED (textCue.vertical == 'rl') OK
31
31
32
RUN(textCue.snapToLines = false)
32
RUN(textCue.snapToLines = false)
33
EXPECTED (textCue.snapToLines == 'false') OK
33
EXPECTED (textCue.snapToLines == 'false') OK
34
34
35
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.
35
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.
36
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-lineposition
36
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-line
37
TEST(textCue.linePosition = -2) THROWS(DOMException.INDEX_SIZE_ERR) OK
37
TEST(textCue.line = -2) THROWS(DOMException.INDEX_SIZE_ERR) OK
38
TEST(textCue.linePosition = 102) THROWS(DOMException.INDEX_SIZE_ERR) OK
38
TEST(textCue.line = 102) THROWS(DOMException.INDEX_SIZE_ERR) OK
39
EXPECTED (textCue.linePosition == '-1') OK
39
EXPECTED (textCue.line == '-1') OK
40
RUN(textCue.linePosition = 42)
40
RUN(textCue.line = 42)
41
EXPECTED (textCue.linePosition == '42') OK
41
EXPECTED (textCue.line == '42') OK
42
RUN(textCue.snapToLines = true)
42
RUN(textCue.snapToLines = true)
43
RUN(textCue.linePosition = -2)
43
RUN(textCue.line = -2)
44
EXPECTED (textCue.linePosition == '-2') OK
44
EXPECTED (textCue.line == '-2') OK
45
RUN(textCue.linePosition = 102)
45
RUN(textCue.line = 102)
46
EXPECTED (textCue.linePosition == '102') OK
46
EXPECTED (textCue.line == '102') OK
47
47
48
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.
48
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.
49
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-lineposition
49
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-line
50
TEST(textCue.textPosition = -200) THROWS(DOMException.INDEX_SIZE_ERR) OK
50
TEST(textCue.position = -200) THROWS(DOMException.INDEX_SIZE_ERR) OK
51
TEST(textCue.textPosition = 110) THROWS(DOMException.INDEX_SIZE_ERR) OK
51
TEST(textCue.position = 110) THROWS(DOMException.INDEX_SIZE_ERR) OK
52
RUN(textCue.textPosition = 11)
52
RUN(textCue.position = 11)
53
EXPECTED (textCue.textPosition == '11') OK
53
EXPECTED (textCue.position == '11') OK
54
54
55
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.
55
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.
56
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-size
56
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-size
Lines 60-70 RUN(textCue.size = 57) LayoutTests/media/track/track-cue-mutable-expected.txt_sec3
60
EXPECTED (textCue.size == '57') OK
60
EXPECTED (textCue.size == '57') OK
61
61
62
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.
62
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.
63
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-alignment
63
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#dom-texttrackcue-align
64
TEST(textCue.alignment = 'End') THROWS(DOMException.SYNTAX_ERR) OK
64
TEST(textCue.align = 'End') THROWS(DOMException.SYNTAX_ERR) OK
65
EXPECTED (textCue.alignment == 'middle') OK
65
EXPECTED (textCue.align == 'middle') OK
66
RUN(textCue.alignment = 'end')
66
RUN(textCue.align = 'end')
67
EXPECTED (textCue.alignment == 'end') OK
67
EXPECTED (textCue.align == 'end') OK
68
68
69
END OF TEST
69
END OF TEST
70
70
- LayoutTests/media/track/track-cue-mutable.html -29 / +29 lines
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();
- LayoutTests/media/track/track-webvtt-tc013-settings-expected.txt -32 / +32 lines
Lines 3-42 Tests WebVTT settings. LayoutTests/media/track/track-webvtt-tc013-settings-expected.txt_sec1
3
3
4
*** Testing text track 0
4
*** Testing text track 0
5
EXPECTED (cues.length == '4') OK
5
EXPECTED (cues.length == '4') OK
6
EXPECTED (cues[0].linePosition == '100') OK
6
EXPECTED (cues[0].line == '100') OK
7
EXPECTED (cues[0].textPosition == '50') OK
7
EXPECTED (cues[0].position == '50') OK
8
EXPECTED (cues[0].alignment == 'middle') OK
8
EXPECTED (cues[0].align == 'middle') OK
9
EXPECTED (cues[0].direction == 'horizontal') OK
9
EXPECTED (cues[0].vertical == '') OK
10
EXPECTED (cues[1].linePosition == '-1') OK
10
EXPECTED (cues[1].line == '-1') OK
11
EXPECTED (cues[1].textPosition == '50') OK
11
EXPECTED (cues[1].position == '50') OK
12
EXPECTED (cues[1].alignment == 'middle') OK
12
EXPECTED (cues[1].align == 'middle') OK
13
EXPECTED (cues[1].direction == 'horizontal') OK
13
EXPECTED (cues[1].vertical == '') OK
14
EXPECTED (cues[2].linePosition == '-1') OK
14
EXPECTED (cues[2].line == '-1') OK
15
EXPECTED (cues[2].textPosition == '50') OK
15
EXPECTED (cues[2].position == '50') OK
16
EXPECTED (cues[2].alignment == 'middle') OK
16
EXPECTED (cues[2].align == 'middle') OK
17
EXPECTED (cues[2].direction == 'horizontal') OK
17
EXPECTED (cues[2].vertical == '') OK
18
EXPECTED (cues[3].linePosition == '-1') OK
18
EXPECTED (cues[3].line == '-1') OK
19
EXPECTED (cues[3].textPosition == '50') OK
19
EXPECTED (cues[3].position == '50') OK
20
EXPECTED (cues[3].alignment == 'middle') OK
20
EXPECTED (cues[3].align == 'middle') OK
21
EXPECTED (cues[3].direction == 'horizontal') OK
21
EXPECTED (cues[3].vertical == '') OK
22
22
23
*** Testing text track 1
23
*** Testing text track 1
24
EXPECTED (cues.length == '4') OK
24
EXPECTED (cues.length == '4') OK
25
EXPECTED (cues[0].linePosition == '100') OK
25
EXPECTED (cues[0].line == '100') OK
26
EXPECTED (cues[0].textPosition == '50') OK
26
EXPECTED (cues[0].position == '50') OK
27
EXPECTED (cues[0].alignment == 'middle') OK
27
EXPECTED (cues[0].align == 'middle') OK
28
EXPECTED (cues[0].direction == 'horizontal') OK
28
EXPECTED (cues[0].vertical == '') OK
29
EXPECTED (cues[1].linePosition == '-1') OK
29
EXPECTED (cues[1].line == '-1') OK
30
EXPECTED (cues[1].textPosition == '50') OK
30
EXPECTED (cues[1].position == '50') OK
31
EXPECTED (cues[1].alignment == 'middle') OK
31
EXPECTED (cues[1].align == 'middle') OK
32
EXPECTED (cues[1].direction == 'horizontal') OK
32
EXPECTED (cues[1].vertical == '') OK
33
EXPECTED (cues[2].linePosition == '-1') OK
33
EXPECTED (cues[2].line == '-1') OK
34
EXPECTED (cues[2].textPosition == '50') OK
34
EXPECTED (cues[2].position == '50') OK
35
EXPECTED (cues[2].alignment == 'middle') OK
35
EXPECTED (cues[2].align == 'middle') OK
36
EXPECTED (cues[2].direction == 'horizontal') OK
36
EXPECTED (cues[2].vertical == '') OK
37
EXPECTED (cues[3].linePosition == '-1') OK
37
EXPECTED (cues[3].line == '-1') OK
38
EXPECTED (cues[3].textPosition == '50') OK
38
EXPECTED (cues[3].position == '50') OK
39
EXPECTED (cues[3].alignment == 'middle') OK
39
EXPECTED (cues[3].align == 'middle') OK
40
EXPECTED (cues[3].direction == 'horizontal') OK
40
EXPECTED (cues[3].vertical == '') OK
41
END OF TEST
41
END OF TEST
42
42
- LayoutTests/media/track/track-webvtt-tc013-settings.html -5 / +5 lines
Lines 27-46 LayoutTests/media/track/track-webvtt-tc013-settings.html_sec1
27
                    tests:
27
                    tests:
28
                    [
28
                    [
29
                        {
29
                        {
30
                            property : "linePosition",
30
                            property : "line",
31
                            values : [100, -1, -1, -1],
31
                            values : [100, -1, -1, -1],
32
                        },
32
                        },
33
                        {
33
                        {
34
                            property : "textPosition",
34
                            property : "position",
35
                            values : [50, 50, 50, 50],
35
                            values : [50, 50, 50, 50],
36
                        },
36
                        },
37
                        {
37
                        {
38
                            property : "alignment",
38
                            property : "align",
39
                            values : ["middle", "middle", "middle", "middle"],
39
                            values : ["middle", "middle", "middle", "middle"],
40
                        },
40
                        },
41
                        {
41
                        {
42
                            property : "direction",
42
                            property : "vertical",
43
                            values : ["horizontal", "horizontal", "horizontal", "horizontal"],
43
                            values : ["", "", "", ""],
44
                        },
44
                        },
45
                    ],
45
                    ],
46
                };
46
                };
- LayoutTests/media/track/track-webvtt-tc014-alignment-expected.txt -12 / +12 lines
Lines 3-25 Tests cue alignment from settings. LayoutTests/media/track/track-webvtt-tc014-alignment-expected.txt_sec1
3
3
4
*** Testing text track 0
4
*** Testing text track 0
5
EXPECTED (cues.length == '4') OK
5
EXPECTED (cues.length == '4') OK
6
EXPECTED (cues[0].alignment == 'start') OK
6
EXPECTED (cues[0].align == 'start') OK
7
EXPECTED (cues[1].alignment == 'middle') OK
7
EXPECTED (cues[1].align == 'middle') OK
8
EXPECTED (cues[2].alignment == 'end') OK
8
EXPECTED (cues[2].align == 'end') OK
9
EXPECTED (cues[3].alignment == 'middle') OK
9
EXPECTED (cues[3].align == 'middle') OK
10
10
11
*** Testing text track 1
11
*** Testing text track 1
12
EXPECTED (cues.length == '4') OK
12
EXPECTED (cues.length == '4') OK
13
EXPECTED (cues[0].alignment == 'start') OK
13
EXPECTED (cues[0].align == 'start') OK
14
EXPECTED (cues[1].alignment == 'middle') OK
14
EXPECTED (cues[1].align == 'middle') OK
15
EXPECTED (cues[2].alignment == 'end') OK
15
EXPECTED (cues[2].align == 'end') OK
16
EXPECTED (cues[3].alignment == 'middle') OK
16
EXPECTED (cues[3].align == 'middle') OK
17
17
18
*** Testing text track 2
18
*** Testing text track 2
19
EXPECTED (cues.length == '4') OK
19
EXPECTED (cues.length == '4') OK
20
EXPECTED (cues[0].alignment == 'middle') OK
20
EXPECTED (cues[0].align == 'middle') OK
21
EXPECTED (cues[1].alignment == 'middle') OK
21
EXPECTED (cues[1].align == 'middle') OK
22
EXPECTED (cues[2].alignment == 'middle') OK
22
EXPECTED (cues[2].align == 'middle') OK
23
EXPECTED (cues[3].alignment == 'middle') OK
23
EXPECTED (cues[3].align == 'middle') OK
24
END OF TEST
24
END OF TEST
25
25
- LayoutTests/media/track/track-webvtt-tc014-alignment.html -2 / +2 lines
Lines 28-34 LayoutTests/media/track/track-webvtt-tc014-alignment.html_sec1
28
                    tests:
28
                    tests:
29
                    [
29
                    [
30
                        {
30
                        {
31
                            property : "alignment",
31
                            property : "align",
32
                            values : ["start", "middle", "end", "middle"],
32
                            values : ["start", "middle", "end", "middle"],
33
                        },
33
                        },
34
                    ],
34
                    ],
Lines 47-53 LayoutTests/media/track/track-webvtt-tc014-alignment.html_sec2
47
                    tests:
47
                    tests:
48
                    [
48
                    [
49
                        {
49
                        {
50
                            property : "alignment",
50
                            property : "align",
51
                            values : ["middle", "middle", "middle", "middle"],
51
                            values : ["middle", "middle", "middle", "middle"],
52
                        },
52
                        },
53
                    ],
53
                    ],
- LayoutTests/media/track/track-webvtt-tc015-positioning-expected.txt -16 / +16 lines
Lines 3-29 Tests cue text position from settings. LayoutTests/media/track/track-webvtt-tc015-positioning-expected.txt_sec1
3
3
4
*** Testing text track 0
4
*** Testing text track 0
5
EXPECTED (cues.length == '4') OK
5
EXPECTED (cues.length == '4') OK
6
EXPECTED (cues[0].textPosition == '0') OK
6
EXPECTED (cues[0].position == '0') OK
7
EXPECTED (cues[1].textPosition == '50') OK
7
EXPECTED (cues[1].position == '50') OK
8
EXPECTED (cues[2].textPosition == '50') OK
8
EXPECTED (cues[2].position == '50') OK
9
EXPECTED (cues[3].textPosition == '100') OK
9
EXPECTED (cues[3].position == '100') OK
10
10
11
*** Testing text track 1
11
*** Testing text track 1
12
EXPECTED (cues.length == '4') OK
12
EXPECTED (cues.length == '4') OK
13
EXPECTED (cues[0].textPosition == '0') OK
13
EXPECTED (cues[0].position == '0') OK
14
EXPECTED (cues[1].textPosition == '50') OK
14
EXPECTED (cues[1].position == '50') OK
15
EXPECTED (cues[2].textPosition == '50') OK
15
EXPECTED (cues[2].position == '50') OK
16
EXPECTED (cues[3].textPosition == '100') OK
16
EXPECTED (cues[3].position == '100') OK
17
17
18
*** Testing text track 2
18
*** Testing text track 2
19
EXPECTED (cues.length == '8') OK
19
EXPECTED (cues.length == '8') OK
20
EXPECTED (cues[0].textPosition == '50') OK
20
EXPECTED (cues[0].position == '50') OK
21
EXPECTED (cues[1].textPosition == '50') OK
21
EXPECTED (cues[1].position == '50') OK
22
EXPECTED (cues[2].textPosition == '50') OK
22
EXPECTED (cues[2].position == '50') OK
23
EXPECTED (cues[3].textPosition == '50') OK
23
EXPECTED (cues[3].position == '50') OK
24
EXPECTED (cues[4].textPosition == '50') OK
24
EXPECTED (cues[4].position == '50') OK
25
EXPECTED (cues[5].textPosition == '50') OK
25
EXPECTED (cues[5].position == '50') OK
26
EXPECTED (cues[6].textPosition == '50') OK
26
EXPECTED (cues[6].position == '50') OK
27
EXPECTED (cues[7].textPosition == '50') OK
27
EXPECTED (cues[7].position == '50') OK
28
END OF TEST
28
END OF TEST
29
29
- LayoutTests/media/track/track-webvtt-tc015-positioning.html -2 / +2 lines
Lines 28-34 LayoutTests/media/track/track-webvtt-tc015-positioning.html_sec1
28
                    tests:
28
                    tests:
29
                    [
29
                    [
30
                        {
30
                        {
31
                            property : "textPosition",
31
                            property : "position",
32
                            values : [0, 50, 50, 100],
32
                            values : [0, 50, 50, 100],
33
                        },
33
                        },
34
                    ],
34
                    ],
Lines 47-53 LayoutTests/media/track/track-webvtt-tc015-positioning.html_sec2
47
                    tests:
47
                    tests:
48
                    [
48
                    [
49
                        {
49
                        {
50
                            property : "textPosition",
50
                            property : "position",
51
                            values : [50, 50, 50, 50, 50, 50, 50, 50],
51
                            values : [50, 50, 50, 50, 50, 50, 50, 50],
52
                        },
52
                        },
53
                    ],
53
                    ],
- LayoutTests/media/track/track-webvtt-tc016-align-positioning-expected.txt -12 / +12 lines
Lines 3-22 Tests cue text position and alignment fr LayoutTests/media/track/track-webvtt-tc016-align-positioning-expected.txt_sec1
3
3
4
*** Testing text track 0
4
*** Testing text track 0
5
EXPECTED (cues.length == '3') OK
5
EXPECTED (cues.length == '3') OK
6
EXPECTED (cues[0].textPosition == '10') OK
6
EXPECTED (cues[0].position == '10') OK
7
EXPECTED (cues[0].alignment == 'start') OK
7
EXPECTED (cues[0].align == 'start') OK
8
EXPECTED (cues[1].textPosition == '20') OK
8
EXPECTED (cues[1].position == '20') OK
9
EXPECTED (cues[1].alignment == 'middle') OK
9
EXPECTED (cues[1].align == 'middle') OK
10
EXPECTED (cues[2].textPosition == '80') OK
10
EXPECTED (cues[2].position == '80') OK
11
EXPECTED (cues[2].alignment == 'end') OK
11
EXPECTED (cues[2].align == 'end') OK
12
12
13
*** Testing text track 1
13
*** Testing text track 1
14
EXPECTED (cues.length == '3') OK
14
EXPECTED (cues.length == '3') OK
15
EXPECTED (cues[0].textPosition == '10') OK
15
EXPECTED (cues[0].position == '10') OK
16
EXPECTED (cues[0].alignment == 'middle') OK
16
EXPECTED (cues[0].align == 'middle') OK
17
EXPECTED (cues[1].textPosition == '50') OK
17
EXPECTED (cues[1].position == '50') OK
18
EXPECTED (cues[1].alignment == 'middle') OK
18
EXPECTED (cues[1].align == 'middle') OK
19
EXPECTED (cues[2].textPosition == '50') OK
19
EXPECTED (cues[2].position == '50') OK
20
EXPECTED (cues[2].alignment == 'middle') OK
20
EXPECTED (cues[2].align == 'middle') OK
21
END OF TEST
21
END OF TEST
22
22
- LayoutTests/media/track/track-webvtt-tc016-align-positioning.html -4 / +4 lines
Lines 27-37 LayoutTests/media/track/track-webvtt-tc016-align-positioning.html_sec1
27
                    tests:
27
                    tests:
28
                    [
28
                    [
29
                        {
29
                        {
30
                            property : "textPosition",
30
                            property : "position",
31
                            values : [10, 20, 80],
31
                            values : [10, 20, 80],
32
                        },
32
                        },
33
                        {
33
                        {
34
                            property : "alignment",
34
                            property : "align",
35
                            values : ["start", "middle", "end"],
35
                            values : ["start", "middle", "end"],
36
                        },
36
                        },
37
                    ],
37
                    ],
Lines 50-60 LayoutTests/media/track/track-webvtt-tc016-align-positioning.html_sec2
50
                    tests:
50
                    tests:
51
                    [
51
                    [
52
                        {
52
                        {
53
                            property : "textPosition",
53
                            property : "position",
54
                            values : [10, 50, 50],
54
                            values : [10, 50, 50],
55
                        },
55
                        },
56
                        {
56
                        {
57
                            property : "alignment",
57
                            property : "align",
58
                            values : ["middle", "middle", "middle"],
58
                            values : ["middle", "middle", "middle"],
59
                        },
59
                        },
60
                    ],
60
                    ],
- LayoutTests/media/track/track-webvtt-tc017-line-position-expected.txt -13 / +13 lines
Lines 3-36 Tests cue line position from settings. LayoutTests/media/track/track-webvtt-tc017-line-position-expected.txt_sec1
3
3
4
*** Testing text track 0
4
*** Testing text track 0
5
EXPECTED (cues.length == '7') OK
5
EXPECTED (cues.length == '7') OK
6
EXPECTED (cues[0].linePosition == '0') OK
6
EXPECTED (cues[0].line == '0') OK
7
EXPECTED (cues[0].snapToLines == 'false') OK
7
EXPECTED (cues[0].snapToLines == 'false') OK
8
EXPECTED (cues[1].linePosition == '0') OK
8
EXPECTED (cues[1].line == '0') OK
9
EXPECTED (cues[1].snapToLines == 'true') OK
9
EXPECTED (cues[1].snapToLines == 'true') OK
10
EXPECTED (cues[2].linePosition == '50') OK
10
EXPECTED (cues[2].line == '50') OK
11
EXPECTED (cues[2].snapToLines == 'false') OK
11
EXPECTED (cues[2].snapToLines == 'false') OK
12
EXPECTED (cues[3].linePosition == '5') OK
12
EXPECTED (cues[3].line == '5') OK
13
EXPECTED (cues[3].snapToLines == 'true') OK
13
EXPECTED (cues[3].snapToLines == 'true') OK
14
EXPECTED (cues[4].linePosition == '100') OK
14
EXPECTED (cues[4].line == '100') OK
15
EXPECTED (cues[4].snapToLines == 'false') OK
15
EXPECTED (cues[4].snapToLines == 'false') OK
16
EXPECTED (cues[5].linePosition == '-1') OK
16
EXPECTED (cues[5].line == '-1') OK
17
EXPECTED (cues[5].snapToLines == 'true') OK
17
EXPECTED (cues[5].snapToLines == 'true') OK
18
EXPECTED (cues[6].linePosition == '500') OK
18
EXPECTED (cues[6].line == '500') OK
19
EXPECTED (cues[6].snapToLines == 'true') OK
19
EXPECTED (cues[6].snapToLines == 'true') OK
20
20
21
*** Testing text track 1
21
*** Testing text track 1
22
EXPECTED (cues.length == '6') OK
22
EXPECTED (cues.length == '6') OK
23
EXPECTED (cues[0].linePosition == '-1') OK
23
EXPECTED (cues[0].line == '-1') OK
24
EXPECTED (cues[0].snapToLines == 'true') OK
24
EXPECTED (cues[0].snapToLines == 'true') OK
25
EXPECTED (cues[1].linePosition == '-1') OK
25
EXPECTED (cues[1].line == '-1') OK
26
EXPECTED (cues[1].snapToLines == 'true') OK
26
EXPECTED (cues[1].snapToLines == 'true') OK
27
EXPECTED (cues[2].linePosition == '-1') OK
27
EXPECTED (cues[2].line == '-1') OK
28
EXPECTED (cues[2].snapToLines == 'true') OK
28
EXPECTED (cues[2].snapToLines == 'true') OK
29
EXPECTED (cues[3].linePosition == '-1') OK
29
EXPECTED (cues[3].line == '-1') OK
30
EXPECTED (cues[3].snapToLines == 'true') OK
30
EXPECTED (cues[3].snapToLines == 'true') OK
31
EXPECTED (cues[4].linePosition == '-1') OK
31
EXPECTED (cues[4].line == '-1') OK
32
EXPECTED (cues[4].snapToLines == 'true') OK
32
EXPECTED (cues[4].snapToLines == 'true') OK
33
EXPECTED (cues[5].linePosition == '-1') OK
33
EXPECTED (cues[5].line == '-1') OK
34
EXPECTED (cues[5].snapToLines == 'true') OK
34
EXPECTED (cues[5].snapToLines == 'true') OK
35
END OF TEST
35
END OF TEST
36
36
- LayoutTests/media/track/track-webvtt-tc017-line-position.html -2 / +2 lines
Lines 27-33 LayoutTests/media/track/track-webvtt-tc017-line-position.html_sec1
27
                    tests:
27
                    tests:
28
                    [
28
                    [
29
                        {
29
                        {
30
                            property : "linePosition",
30
                            property : "line",
31
                            values : [0, 0, 50, 5, 100, -1, 500],
31
                            values : [0, 0, 50, 5, 100, -1, 500],
32
                        },
32
                        },
33
                        {
33
                        {
Lines 50-56 LayoutTests/media/track/track-webvtt-tc017-line-position.html_sec2
50
                    tests:
50
                    tests:
51
                    [
51
                    [
52
                        {
52
                        {
53
                            property : "linePosition",
53
                            property : "line",
54
                            values : [-1, -1, -1, -1, -1, -1, -1],
54
                            values : [-1, -1, -1, -1, -1, -1, -1],
55
                        },
55
                        },
56
                        {
56
                        {
- LayoutTests/media/track/track-webvtt-tc018-align-text-line-position-expected.txt -24 / +24 lines
Lines 3-42 Tests cue alignment, line and text posit LayoutTests/media/track/track-webvtt-tc018-align-text-line-position-expected.txt_sec1
3
3
4
*** Testing text track 0
4
*** Testing text track 0
5
EXPECTED (cues.length == '5') OK
5
EXPECTED (cues.length == '5') OK
6
EXPECTED (cues[0].alignment == 'start') OK
6
EXPECTED (cues[0].align == 'start') OK
7
EXPECTED (cues[0].textPosition == '10') OK
7
EXPECTED (cues[0].position == '10') OK
8
EXPECTED (cues[0].linePosition == '0') OK
8
EXPECTED (cues[0].line == '0') OK
9
EXPECTED (cues[0].snapToLines == 'false') OK
9
EXPECTED (cues[0].snapToLines == 'false') OK
10
EXPECTED (cues[1].alignment == 'start') OK
10
EXPECTED (cues[1].align == 'start') OK
11
EXPECTED (cues[1].textPosition == '50') OK
11
EXPECTED (cues[1].position == '50') OK
12
EXPECTED (cues[1].linePosition == '0') OK
12
EXPECTED (cues[1].line == '0') OK
13
EXPECTED (cues[1].snapToLines == 'true') OK
13
EXPECTED (cues[1].snapToLines == 'true') OK
14
EXPECTED (cues[2].alignment == 'middle') OK
14
EXPECTED (cues[2].align == 'middle') OK
15
EXPECTED (cues[2].textPosition == '80') OK
15
EXPECTED (cues[2].position == '80') OK
16
EXPECTED (cues[2].linePosition == '80') OK
16
EXPECTED (cues[2].line == '80') OK
17
EXPECTED (cues[2].snapToLines == 'false') OK
17
EXPECTED (cues[2].snapToLines == 'false') OK
18
EXPECTED (cues[3].alignment == 'end') OK
18
EXPECTED (cues[3].align == 'end') OK
19
EXPECTED (cues[3].textPosition == '30') OK
19
EXPECTED (cues[3].position == '30') OK
20
EXPECTED (cues[3].linePosition == '5') OK
20
EXPECTED (cues[3].line == '5') OK
21
EXPECTED (cues[3].snapToLines == 'true') OK
21
EXPECTED (cues[3].snapToLines == 'true') OK
22
EXPECTED (cues[4].alignment == 'middle') OK
22
EXPECTED (cues[4].align == 'middle') OK
23
EXPECTED (cues[4].textPosition == '60') OK
23
EXPECTED (cues[4].position == '60') OK
24
EXPECTED (cues[4].linePosition == '-3') OK
24
EXPECTED (cues[4].line == '-3') OK
25
EXPECTED (cues[4].snapToLines == 'true') OK
25
EXPECTED (cues[4].snapToLines == 'true') OK
26
26
27
*** Testing text track 1
27
*** Testing text track 1
28
EXPECTED (cues.length == '3') OK
28
EXPECTED (cues.length == '3') OK
29
EXPECTED (cues[0].alignment == 'middle') OK
29
EXPECTED (cues[0].align == 'middle') OK
30
EXPECTED (cues[0].textPosition == '50') OK
30
EXPECTED (cues[0].position == '50') OK
31
EXPECTED (cues[0].linePosition == '-1') OK
31
EXPECTED (cues[0].line == '-1') OK
32
EXPECTED (cues[0].snapToLines == 'true') OK
32
EXPECTED (cues[0].snapToLines == 'true') OK
33
EXPECTED (cues[1].alignment == 'end') OK
33
EXPECTED (cues[1].align == 'end') OK
34
EXPECTED (cues[1].textPosition == '0') OK
34
EXPECTED (cues[1].position == '0') OK
35
EXPECTED (cues[1].linePosition == '-1') OK
35
EXPECTED (cues[1].line == '-1') OK
36
EXPECTED (cues[1].snapToLines == 'true') OK
36
EXPECTED (cues[1].snapToLines == 'true') OK
37
EXPECTED (cues[2].alignment == 'middle') OK
37
EXPECTED (cues[2].align == 'middle') OK
38
EXPECTED (cues[2].textPosition == '60') OK
38
EXPECTED (cues[2].position == '60') OK
39
EXPECTED (cues[2].linePosition == '-3') OK
39
EXPECTED (cues[2].line == '-3') OK
40
EXPECTED (cues[2].snapToLines == 'true') OK
40
EXPECTED (cues[2].snapToLines == 'true') OK
41
END OF TEST
41
END OF TEST
42
42
- LayoutTests/media/track/track-webvtt-tc018-align-text-line-position.html -6 / +6 lines
Lines 28-42 LayoutTests/media/track/track-webvtt-tc018-align-text-line-position.html_sec1
28
                    tests:
28
                    tests:
29
                    [
29
                    [
30
                        {
30
                        {
31
                            property : "alignment",
31
                            property : "align",
32
                            values : ["start", "start", "middle", "end", "middle"],
32
                            values : ["start", "start", "middle", "end", "middle"],
33
                        },
33
                        },
34
                        {
34
                        {
35
                            property : "textPosition",
35
                            property : "position",
36
                            values : [10, 50, 80, 30, 60],
36
                            values : [10, 50, 80, 30, 60],
37
                        },
37
                        },
38
                        {
38
                        {
39
                            property : "linePosition",
39
                            property : "line",
40
                            values : [0, 0, 80, 5, -3],
40
                            values : [0, 0, 80, 5, -3],
41
                        },
41
                        },
42
                        {
42
                        {
Lines 59-73 LayoutTests/media/track/track-webvtt-tc018-align-text-line-position.html_sec2
59
                    tests:
59
                    tests:
60
                    [
60
                    [
61
                        {
61
                        {
62
                            property : "alignment",
62
                            property : "align",
63
                            values : ["middle", "end", "middle"],
63
                            values : ["middle", "end", "middle"],
64
                        },
64
                        },
65
                        {
65
                        {
66
                            property : "textPosition",
66
                            property : "position",
67
                            values : [50, 0, 60],
67
                            values : [50, 0, 60],
68
                        },
68
                        },
69
                        {
69
                        {
70
                            property : "linePosition",
70
                            property : "line",
71
                            values : [-1, -1, -3],
71
                            values : [-1, -1, -3],
72
                        },
72
                        },
73
                        {
73
                        {
- LayoutTests/media/track/track-webvtt-tc020-cue-size-align-expected.txt -6 / +6 lines
Lines 4-22 Tests cue size and alignment from settin LayoutTests/media/track/track-webvtt-tc020-cue-size-align-expected.txt_sec1
4
*** Testing text track 0
4
*** Testing text track 0
5
EXPECTED (cues.length == '3') OK
5
EXPECTED (cues.length == '3') OK
6
EXPECTED (cues[0].size == '100') OK
6
EXPECTED (cues[0].size == '100') OK
7
EXPECTED (cues[0].alignment == 'start') OK
7
EXPECTED (cues[0].align == 'start') OK
8
EXPECTED (cues[1].size == '10') OK
8
EXPECTED (cues[1].size == '10') OK
9
EXPECTED (cues[1].alignment == 'end') OK
9
EXPECTED (cues[1].align == 'end') OK
10
EXPECTED (cues[2].size == '0') OK
10
EXPECTED (cues[2].size == '0') OK
11
EXPECTED (cues[2].alignment == 'middle') OK
11
EXPECTED (cues[2].align == 'middle') OK
12
12
13
*** Testing text track 1
13
*** Testing text track 1
14
EXPECTED (cues.length == '3') OK
14
EXPECTED (cues.length == '3') OK
15
EXPECTED (cues[0].size == '100') OK
15
EXPECTED (cues[0].size == '100') OK
16
EXPECTED (cues[0].alignment == 'middle') OK
16
EXPECTED (cues[0].align == 'middle') OK
17
EXPECTED (cues[1].size == '100') OK
17
EXPECTED (cues[1].size == '100') OK
18
EXPECTED (cues[1].alignment == 'end') OK
18
EXPECTED (cues[1].align == 'end') OK
19
EXPECTED (cues[2].size == '100') OK
19
EXPECTED (cues[2].size == '100') OK
20
EXPECTED (cues[2].alignment == 'middle') OK
20
EXPECTED (cues[2].align == 'middle') OK
21
END OF TEST
21
END OF TEST
22
22
- LayoutTests/media/track/track-webvtt-tc020-cue-size-align.html -2 / +2 lines
Lines 31-37 LayoutTests/media/track/track-webvtt-tc020-cue-size-align.html_sec1
31
                            values : [100, 10, 0],
31
                            values : [100, 10, 0],
32
                        },
32
                        },
33
                        {
33
                        {
34
                            property : "alignment",
34
                            property : "align",
35
                            values : ["start", "end", "middle"],
35
                            values : ["start", "end", "middle"],
36
                        },
36
                        },
37
                    ],
37
                    ],
Lines 54-60 LayoutTests/media/track/track-webvtt-tc020-cue-size-align.html_sec2
54
                            values : [100, 100, 100],
54
                            values : [100, 100, 100],
55
                        },
55
                        },
56
                        {
56
                        {
57
                            property : "alignment",
57
                            property : "align",
58
                            values : ["middle", "end", "middle"],
58
                            values : ["middle", "end", "middle"],
59
                        },
59
                        },
60
                    ],
60
                    ],
- LayoutTests/media/track/track-webvtt-tc021-valign-expected.txt -21 / +21 lines
Lines 3-34 Tests cue vertical alignment (direction) LayoutTests/media/track/track-webvtt-tc021-valign-expected.txt_sec1
3
3
4
*** Testing text track 0
4
*** Testing text track 0
5
EXPECTED (cues.length == '3') OK
5
EXPECTED (cues.length == '3') OK
6
EXPECTED (cues[0].direction == 'vertical') OK
6
EXPECTED (cues[0].vertical == 'rl') OK
7
EXPECTED (cues[0].alignment == 'middle') OK
7
EXPECTED (cues[0].align == 'middle') OK
8
EXPECTED (cues[0].textPosition == '50') OK
8
EXPECTED (cues[0].position == '50') OK
9
EXPECTED (cues[1].direction == 'vertical-lr') OK
9
EXPECTED (cues[1].vertical == 'lr') OK
10
EXPECTED (cues[1].alignment == 'middle') OK
10
EXPECTED (cues[1].align == 'middle') OK
11
EXPECTED (cues[1].textPosition == '50') OK
11
EXPECTED (cues[1].position == '50') OK
12
EXPECTED (cues[2].direction == 'vertical') OK
12
EXPECTED (cues[2].vertical == 'rl') OK
13
EXPECTED (cues[2].alignment == 'start') OK
13
EXPECTED (cues[2].align == 'start') OK
14
EXPECTED (cues[2].textPosition == '0') OK
14
EXPECTED (cues[2].position == '0') OK
15
15
16
*** Testing text track 1
16
*** Testing text track 1
17
EXPECTED (cues.length == '3') OK
17
EXPECTED (cues.length == '3') OK
18
EXPECTED (cues[0].direction == 'vertical') OK
18
EXPECTED (cues[0].vertical == 'rl') OK
19
EXPECTED (cues[0].alignment == 'middle') OK
19
EXPECTED (cues[0].align == 'middle') OK
20
EXPECTED (cues[0].textPosition == '50') OK
20
EXPECTED (cues[0].position == '50') OK
21
EXPECTED (cues[1].direction == 'vertical-lr') OK
21
EXPECTED (cues[1].vertical == 'lr') OK
22
EXPECTED (cues[1].alignment == 'middle') OK
22
EXPECTED (cues[1].align == 'middle') OK
23
EXPECTED (cues[1].textPosition == '50') OK
23
EXPECTED (cues[1].position == '50') OK
24
EXPECTED (cues[2].direction == 'vertical') OK
24
EXPECTED (cues[2].vertical == 'rl') OK
25
EXPECTED (cues[2].alignment == 'start') OK
25
EXPECTED (cues[2].align == 'start') OK
26
EXPECTED (cues[2].textPosition == '0') OK
26
EXPECTED (cues[2].position == '0') OK
27
27
28
*** Testing text track 2
28
*** Testing text track 2
29
EXPECTED (cues.length == '3') OK
29
EXPECTED (cues.length == '3') OK
30
EXPECTED (cues[0].direction == 'horizontal') OK
30
EXPECTED (cues[0].vertical == '') OK
31
EXPECTED (cues[1].direction == 'horizontal') OK
31
EXPECTED (cues[1].vertical == '') OK
32
EXPECTED (cues[2].direction == 'horizontal') OK
32
EXPECTED (cues[2].vertical == '') OK
33
END OF TEST
33
END OF TEST
34
34
- LayoutTests/media/track/track-webvtt-tc021-valign.html -6 / +6 lines
Lines 28-42 LayoutTests/media/track/track-webvtt-tc021-valign.html_sec1
28
                    tests:
28
                    tests:
29
                    [
29
                    [
30
                        {
30
                        {
31
                            property : "direction",
31
                            property : "vertical",
32
                            values : ["vertical", "vertical-lr", "vertical"],
32
                            values : ["rl", "lr", "rl"],
33
                        },
33
                        },
34
                        {
34
                        {
35
                            property : "alignment",
35
                            property : "align",
36
                            values : ["middle", "middle", "start"],
36
                            values : ["middle", "middle", "start"],
37
                        },
37
                        },
38
                        {
38
                        {
39
                            property : "textPosition",
39
                            property : "position",
40
                            values : [50, 50, 0],
40
                            values : [50, 50, 0],
41
                        },
41
                        },
42
                    ],
42
                    ],
Lines 55-62 LayoutTests/media/track/track-webvtt-tc021-valign.html_sec2
55
                    tests:
55
                    tests:
56
                    [
56
                    [
57
                        {
57
                        {
58
                            property : "direction",
58
                            property : "vertical",
59
                            values : ["horizontal", "horizontal", "horizontal"],
59
                            values : ["", "", ""],
60
                        },
60
                        },
61
                    ],
61
                    ],
62
                };
62
                };

Return to Bug 79368