Cue Times
Contents
Group Members
- Vince Lee
- Thevakaran Virutthasalam
- Dale Karp
Test Ideas
- Syntax
- Single cue tests
- Times out of order
- Multiple cue tests
- Nested cues
- Overlapping cues
- Cue times out of order
Testing Procedure
Writing Tests
- Check if the test you have in mind exists already in the wiki
- If not, write your test case file
- When you finish writing, document the test case in the wiki ASAP so you don't forget!
- Commit your test case to the github repo
Peer Review
- Review someone else's test case
- Sign off in the 'Peer Review' column of the table with your name so that we know it's been looked at (TO DO: Create Peer Review column in tables)
Cue Time Syntax Rules
- A WebVTT timestamp representing the start time offset of the cue. The time represented by this WebVTT timestamp must be greater than or equal to the start time offsets of all previous cues in the file.
- One or more U+0020 SPACE characters or U+0009 CHARACTER TABULATION (tab) characters.
- The string "-->" (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN).
- One or more U+0020 SPACE characters or U+0009 CHARACTER TABULATION (tab) characters.
- A WebVTT timestamp representing the end time offset of the cue. The time represented by this WebVTT timestamp must be greater than the start time offset of the cue.
Tests
Dale
URL to git repo with tests: https://github.com/daliuss/webvtt/tree/master/test/spec
Filename | Description | Should Pass / Fail? | Reasoning | Creation Note | Comments | Peer Review |
cuetime_bareminimum.vtt | Bare minimum file that passes (no cue content) | Pass | Conforms to spec (section 3.1 in W3C draft) | ST2 | ||
cuetime_bareminimum_content.vtt | Bare minimum file that passes (cue content) | Pass | Conforms to spec (section 3.1 in W3C draft) | ST2 | ||
cuetime_highestvalues.vtt | Highest legal values allowed in time stamps | Pass | Conforms to spec (section 3.1 in W3C draft) | ST2 | ||
cuetime_spacetabs.vtt | Lots of tab/space chars between timestamps and "-->" | Pass | Conforms to spec (section 3.1 in W3C draft) | ST2 | ||
cuetime_tabs.vtt | Using tab characters instead of space characters | Pass | Conforms to spec (section 3.1 in W3C draft) | ST2 | ||
cuetime_hours.vtt | Includes optional hours characters in timestamps | Pass | Conforms to spec (section 3.1 in W3C draft) | ST2 | ||
cuetime_multicues.vtt | The second cue's start time and the first cue's end time are the same | Pass | Conforms to spec (section 3.1 in W3C draft) | ST2 | ||
cuetime_nestedcues.vtt | Some cue times are nested within another cue | Pass | Conforms to spec (section 3.1 in W3C draft) | ST2 | ||
cuetime_overlappingcues.vtt | There is overlap time between the two cues | Pass | Conforms to spec (section 3.1 in W3C draft) | ST2 |
Vince
I'm gonna remake the table using markdown. Hitting <td></td> is tedious
Filename | Description | Should Pass / Fail? | Reasoning | Creation Note | Comments | Peer Review |
bad01.vtt | 00:00.000 --> 00:00.000 | Fail | End timestamp must be greater than start timestamp | Dale, Sept 26 2012 | ||
bad02.vtt | 00:00.001 --> 00:00.000 | Fail | End timestamp must be greater than start timestamp | Dale, Sept 26 2012 | ||
bad03.vtt | 00:00.000 00:00.001 | Fail | Timestamp separator not found | Took out the --> | Dale, Sept 26 2012 | |
bad04.vtt | 00:00.0000 --> 00:00.001 | Fail | Milliseconds must be 3 digits | Dale, Sept 26 2012 | ||
bad05.vtt | 00:000.000 --> 00:00.001 | Fail | Seconds should be 2 digits | Dale, Sept 26 2012 | ||
bad06.vtt | 000:00.000 --> 00:00.001 | Fail | Minutes should be 2 digits | Dale, Sept 26 2012 | ||
bad07.vtt | 00:0:00:00.000 --> 00:0:00:00.001 | Fail | No support for days | Not that hours can go for a VERY long time, I tried up to 2 billion | ||
bad08.vtt | :00:00.000 --> 00:00.001 | Fail | Time stamp must start with a number | Could do a lot of test cases for this using every symbol/alphabet | ||
bad09.vtt | 00:01.000 --> 00:01.001 00:00.000 --> 00:00.001 |
Fail | Second time stamp must be greater or in-between the first one (nested) | Look up nested cues |
TODO: Break hour, see if days work, create multiple cue times that don't make sense (first cue at 2 minutes, second at 1 minute)
Deva (Thevakaran)
Writing some test cases that not covered by Dale or Vince
Filename | Description | Should Pass / Fail? | Reasoning | Creation Note | Comments | Peer Review |
cuetime_minute_BAD.vtt | Minute should have only two characters in the range U+0030 to U+0039. | Fail | W3C WebVTT Standard - Explained in 3.1 Syntax | |||
cuetime_socond_BAD.vtt | Second should have only two characters in the range U+0030 to U+0039. | Fail | W3C WebVTT Standard - Explained in 3.1 Syntax | |||
cuetime_timestamp_tag.vtt | Start time can be changed by time stamp tagging. | Pass | EduTech Wiki WebVTT - Karaoke style cue | |||
cuetime_timestamp_tag_BAD01.vtt | Time stamp tag can not less or equal to start time stamp | Fail |
SUMMARY
CUE TIME STAMP - MINIMUM REQUIREMENT
- Starting "WEBVTT" title
- Two or more WEBVTT line breakers
- Cue start time
- One or more U+0020 SPACE characters or U+0009 TABULATION characters
- The string "-->" (U+002D HYPHEN-MINUS, U+002D HYPHEN-MINUS, U+003E GREATER-THAN SIGN).
- One or more U+0020 SPACE characters or U+0009 TABULATION characters
- Cue end time
WEBVTT 00:00.000 --> 05:00.000
CUE START TIME RULES
1. The cue start time must be greater or equal to last cue start time (Applicable only if there are any previous cue time stamps available)
2. Should start with any characters in the range of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9)
3. Can not have any characters other than
- U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9).
- one U+002E FULL STOP character (.).
- one U+003A COLON character (:) only if the hour is zero and not included, if not, two U+003A COLON character (:).
4. Optionally (required if hour is non-zero) include
- Hour - two or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9)
5. Should include
- Minute - 2 characters in the range of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). Range 00 to 59.
- Second - 2 characters in the range of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). Range 00 to 59.
- Millisecond - 3 characters in the range of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). Range 000 to 999.
6. U+003A COLON character (:) should be used to separate
- Hours and Minute
- Minute and second
7. U+002E FULL STOP character (.) should be used between second and millisecond
CUE END TIME RULES
1. The cue end time must be greater than start time
2. Should start with any characters in the range of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9)
3. Can not have any characters other than
- U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9).
- one U+002E FULL STOP character (.).
- one U+003A COLON character (:) only if the hour is zero and not included, if not, two U+003A COLON character (:).
4. Optionally (required if hour is non-zero) include
- Hour - two or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9)
5. Should include
- Minute - 2 characters in the range of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). Range 00 to 59.
- Second - 2 characters in the range of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). Range 00 to 59.
- Millisecond - 3 characters in the range of U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9). Range 000 to 999.
6. U+003A COLON character (:) should be used to separate
- Hours and Minute
- Minute and second
7. U+002E FULL STOP character (.) should be used between second and millisecond