Test Case Id Description Example that should pass file Example that should fail Effect file Creation Note Comments
TC000 empty file -- -- empty file file not recognized as webvtt tc000_empty.vtt cat
TC001 UTF-8 File file with UTF-8 encoded characters (use iconv) - example has Japanese characters tc001_utf8.vtt file with characters in different encoding (use iconv) - example has japanese characters in ISO-2022-JP-3 file not recognized as webvtt tc001_iso2022jp3.vtt TexMate This file still works fine with annacc's WebKit implementation (doesn't look pretty, but converts successfully) - is probably ok: browsers are allowed to be more tolerant than the spec
TC002 UTF-8 File with BOM UTF-8 file in Japanese with BOM at start tc002_bom.vtt -- -- python: import codecs; file = open("bom.txt", "w"); file.write(codecs.BOM_UTF8); file.close()
TC003 Line terminator: \r, \n or \r\n file in UTF-8 with all three line terminators; file with no line terminator at the end tc003_newlines.vtt; tc003_nonewlineateof.vtt -- -- python: file = open("newline.txt", "w"); file.write("WEBVTT\n"); file.write("\r"); file.write("1\r\n"); file.write("00:00:00.000 --> 00:00:30.500\r"); file.write("Bear is Coming!!!!!\r\n"); file.close();
TC004 Magic File Header WEBVTT header plus any rubbish after it, then 2 newlines; WEBVTT FILE header tc004_webvttfile.vtt; tc004_webvttrubbish.vtt AWEBVTT header to break magic file not recognized as webvtt tc004_nowebvtt.vtt TextMate
TC008 Random content below file magic header Any text in the line directly below the WEBVTT line followed by 2 line terminators tc008_metadataarea.vtt Faulty cues, which can later be used for default styling and settings but are for now ignored cues ignored tc008_defaultstyles.vtt TextMate
TC005 with optional cue identifier random text as cue identifiers, including duplicate ids, ids with spaces, and suparts of --> tc005_cueid.vtt cue identifier that contains --> cues ignored tc005_cueiderror.vtt TextMate
TC006 cue without identifier no cue identifier id that is only --> cues ignored tc006_cuenoiderror.vtt TextMate seems like tc005 and tc006 can be combined (testing the same stuff) - one has an identifier, the other doesn't - I'll keep them separate - ok makes sense
TC007 cue timing without optional hours mm:ss.msmsms --> mm:ss.msmsms, space and tab separators tc007_timingsnohour.vtt cue timing without hours, but erroneously: wrong number of digits, minutes, or seconds greate than 59, characters other than digits cues ignored tc007_timingsnohourerror.vtt TextMate
TC009 cue timing with hours hh...:mm:ss.msmsms --> hh...:mm:ss.msmsms tc009_timingshour.vtt cue timing with hours, but erroneously: wrong number of digits, minutes, or seconds greate than 59, characters other than digits cues ignored tc009_timingshourerror.vtt TextMate
TC010 -- -- cue without time spec cues ignored tc010_notimings.vtt TextMate
TC011 cues separated by one or more blank line cues with 2, 3, 4 newlines (\r and \n) tc011_cues.vtt cues not separated one cue only tc011_cuesnosep.vtt cat to the end of tc003_newlines.vtt
TC012 -- -- cues temporally out of order cues out of order are ignored tc012_cuseoutoforder.vtt TextMate
TC013 cue with WebVTT setting cues with tab and space separated settings tc013_settings.vtt settings separated with non-blank characters cues are ignored tc013_settingsbadsep.vtt TextMate
TC014 cues with alignment settings cues should align start, middle, end tc014_alignment.vtt tc014_alignment_ltr.vtt invalid alignment values setting is ignored tc014_alignmentbad.vtt TextMate, translation copied from Google translate
TC015 cues with text positioning cues should position at different horizontal positions tc015_positioning.vtt tc015_positioning_ltr.vtt invalid positioning values positioning is ignored tc015_positioningbad.vtt TextMate, translation copied from Google translate
TC016 cues with alignment and text position settings cues should position at different horizontal positions with different alignments tc016_align_positioning.vtt either one or both of positioning and alignment values are invalid positioning and/or setting are ignored tc016_align_positioningbad.vtt TextMate
TC017 cues with line positioning cues should position at different vertical positions tc017_linepos.vtt invalid positioning values positioning is ignored tc017_lineposbad.vtt TextMate
TC018 cues with alignment, line and text position settings cues should position at different horizontal and vertical positions with different alignments tc018_align_text_linepos.vtt one or more of line/text positioning and alignment values are invalid text/line positioning and/or setting are ignored tc018_align_text_lineposbad.vtt TextMate
TC019 cue size settings cues vertical size is changed exemplified by larger background area tc019_cuesize.vtt invalid cue sizes cue size setting is ignored tc019_cuesizebad.vtt TextMate
TC020 cue size setting with alignment cues align within the different box and wrap tc020_cuesize_align.vtt either size or alignment are invalid size or alignment is ignored tc020_cuesize_alignbad.vtt TextMate
TC021 cue with vertical direction setting cues should render vertically growing left-to-right or right-to-left tc021_valign.vtt tc021_valign_ltr.vtt invalid vertical direction setting direction setting is ignored tc021_valignbad.vtt TextMate, translation copied from Google translate
TC022 cue content with escape characters &, <, > are provided in escaped manner tc022_entities.vtt invalid use of &, < and > parts of cue text are ignored, potentially whole cues scrambled tc022_entitieswrong.vtt TextMate
TC023 cue with <b>, <i>, <u>, <rt> and <ruby> tags cue text fragments should render appropriately tc023_markup.vtt cue text has invalid markup of <b>, <i>, <u>, <rt> and <ruby> markup that is wrong is ignored or has a bad effect on the remainder of the cue text tc023_markupbad.vtt TextMate
TC024 paint-on text in cues with <timestamp> markup <time> markers reveal text successively tc024_timestamp.vtt cue text has invalid timestamp invalid timestamps are ignored tc024_timestampbad.vtt TextMate
TC025 cues with class markup <c> cue text fragment mapped to HTML <span> element with CSS classes tc025_class.vtt invalid class markup invalid markup is ignored tc025_classbad.vtt TextMate
TC026 cues with voice markup <v> cue text fragment mapped to HTML <q> element with @title for annotation tc026_voice.vtt invalid voice markup invalid markup is ignored tc026_voicebad.vtt TextMate
TC027 -- -- -- empty cues empty cues are discarded tc027_emptycue.vtt TextMate
TC028 -- -- -- cue with html markup that is not specified in webvtt; examples include <h1>, <p>, <ul>, <ol>, <li>, <a>, <video>, <img> markup is discarded tc028_unsupportedmarkup.vtt TextMate