Difference between revisions of "OSD600/webvtt/cue settings"

From CDOT Wiki
Jump to: navigation, search
(Cue Settings Tests)
("position", "size" & "align" settings)
Line 32: Line 32:
  
 
00:11.000 --> 00:13.000 :10%
 
00:11.000 --> 00:13.000 :10%
 +
payload
 
*no cue setting
 
*no cue setting
  
Line 38: Line 39:
  
 
00:11.000 --> 00:13.000 position:10%
 
00:11.000 --> 00:13.000 position:10%
 +
payload
 
*positive test (should succeed)
 
*positive test (should succeed)
  
Line 44: Line 46:
  
 
00:11.000 --> 00:13.000 position:A%
 
00:11.000 --> 00:13.000 position:A%
 +
payload
 
*character above utf-8+0039
 
*character above utf-8+0039
 
**NOTE: the parser currently passes this test instead of failing it
 
**NOTE: the parser currently passes this test instead of failing it
Line 51: Line 54:
  
 
00:11.000 --> 00:13.000 position:+%
 
00:11.000 --> 00:13.000 position:+%
 +
payload
 
*character below utf-8+0030
 
*character below utf-8+0030
 
**NOTE: the parser currently passes this test instead of failing it
 
**NOTE: the parser currently passes this test instead of failing it
Line 58: Line 62:
  
 
00:11.000 --> 00:13.000 position10%
 
00:11.000 --> 00:13.000 position10%
 +
payload
 
*':' missing in between cue setting and value
 
*':' missing in between cue setting and value
  
Line 64: Line 69:
  
 
00:11.000 --> 00:13.000 position:10
 
00:11.000 --> 00:13.000 position:10
 +
payload
 
*'%' missing at the end
 
*'%' missing at the end
  
Line 72: Line 78:
  
 
00:11.000 --> 00:13.000 size:10%
 
00:11.000 --> 00:13.000 size:10%
 +
payload
 
*positive test (should succeed)
 
*positive test (should succeed)
  
Line 78: Line 85:
  
 
00:11.000 --> 00:13.000 size:A%
 
00:11.000 --> 00:13.000 size:A%
 +
payload
 
*character above utf-8+0039
 
*character above utf-8+0039
 
**NOTE: the parser currently passes this test instead of failing it
 
**NOTE: the parser currently passes this test instead of failing it
Line 85: Line 93:
  
 
00:11.000 --> 00:13.000 size:+%
 
00:11.000 --> 00:13.000 size:+%
 +
payload
 
*character below utf-8+0030
 
*character below utf-8+0030
 
**NOTE: the parser currently passes this test instead of failing it
 
**NOTE: the parser currently passes this test instead of failing it
Line 92: Line 101:
  
 
00:11.000 --> 00:13.000 size10%
 
00:11.000 --> 00:13.000 size10%
 +
payload
 
*':' missing in between cue setting and value
 
*':' missing in between cue setting and value
  
Line 98: Line 108:
  
 
00:11.000 --> 00:13.000 size:10
 
00:11.000 --> 00:13.000 size:10
 +
payload
 
*'%' missing at the end
 
*'%' missing at the end
  
Line 106: Line 117:
  
 
00:11.000 --> 00:13.000 :start
 
00:11.000 --> 00:13.000 :start
 +
payload
 
*no cue setting
 
*no cue setting
  
Line 112: Line 124:
  
 
00:11.000 --> 00:13.000 align:start
 
00:11.000 --> 00:13.000 align:start
 +
payload
 
*positive test (should succeed)
 
*positive test (should succeed)
  
Line 118: Line 131:
  
 
00:11.000 --> 00:13.000 align:middle
 
00:11.000 --> 00:13.000 align:middle
 +
payload
 
*positive test (should succeed)
 
*positive test (should succeed)
  
Line 124: Line 138:
  
 
00:11.000 --> 00:13.000 align:end
 
00:11.000 --> 00:13.000 align:end
 +
payload
 
*positive test (should succeed)
 
*positive test (should succeed)
  
Line 130: Line 145:
  
 
00:11.000 --> 00:13.000 align:star
 
00:11.000 --> 00:13.000 align:star
 +
payload
 
*test misspelling of one of the possible values
 
*test misspelling of one of the possible values
  
Line 136: Line 152:
  
 
00:11.000 --> 00:13.000 align:
 
00:11.000 --> 00:13.000 align:
 +
payload
 
*test missing value
 
*test missing value
  
Line 142: Line 159:
  
 
These tests look okay, but just one thing to point out, the draft does require that a cue has a cue payload (eg, the text content of the subtitle), so if they weren't in the actual test files, they need to be added in so that we're only testing the pass/fail of the specific conditions we're looking at.
 
These tests look okay, but just one thing to point out, the draft does require that a cue has a cue payload (eg, the text content of the subtitle), so if they weren't in the actual test files, they need to be added in so that we're only testing the pass/fail of the specific conditions we're looking at.
 +
*added payload to all tests

Revision as of 21:06, 25 September 2012

Cue Settings Tests

"vertical" & "line" settings

09/23/2012

Download: caitp-cue_settings_tests-09232012.tgz


Discussion:

"position", "size" & "align" settings

Note: Hi Caitlin here are the tests I've come up with so far for the position, size and align cue settings. I have a few concerns about some of the things I saw in the parser so if you could help me test them it would be great.

Some notable things I've discovered:

  • 00:11.000 --> 00:13.000position:10% passes
    • there is no space between the cue setting and the cue timing. this is a problem with the toy parser, because the draft requires one or more whitespace characters ([U+0020 || U+0009]) between the timestamp and the cue setting (and between each subsequent cue setting)
  • 00:11.000 --> 00:13.000 position:A% passes
    • any character besides ' ' (space) between : and % will pass. This is another problem with the toy parser, as the draft defines that the text between ':' and '%' must be in the U+0030-U+0039 range (ASCII digits)

A few things to note about the tests:

  • The first test for position is the absence of the cue setting tag, I think technically this test should work for the rest of the tests that use the :n% format as well hence its absence in the size tests.
  • I have a test for each cue setting type where the ':' is missing, what do you think about this? I have been thinking that only one for all the cue settings would be enough as this simply tests the parser for whether it can split setting from value.


Position

WEBVTT

00:11.000 --> 00:13.000 :10% payload

  • no cue setting


WEBVTT

00:11.000 --> 00:13.000 position:10% payload

  • positive test (should succeed)


WEBVTT

00:11.000 --> 00:13.000 position:A% payload

  • character above utf-8+0039
    • NOTE: the parser currently passes this test instead of failing it


WEBVTT

00:11.000 --> 00:13.000 position:+% payload

  • character below utf-8+0030
    • NOTE: the parser currently passes this test instead of failing it


WEBVTT

00:11.000 --> 00:13.000 position10% payload

  • ':' missing in between cue setting and value


WEBVTT

00:11.000 --> 00:13.000 position:10 payload

  • '%' missing at the end


Size

WEBVTT

00:11.000 --> 00:13.000 size:10% payload

  • positive test (should succeed)


WEBVTT

00:11.000 --> 00:13.000 size:A% payload

  • character above utf-8+0039
    • NOTE: the parser currently passes this test instead of failing it


WEBVTT

00:11.000 --> 00:13.000 size:+% payload

  • character below utf-8+0030
    • NOTE: the parser currently passes this test instead of failing it


WEBVTT

00:11.000 --> 00:13.000 size10% payload

  • ':' missing in between cue setting and value


WEBVTT

00:11.000 --> 00:13.000 size:10 payload

  • '%' missing at the end


Align

WEBVTT

00:11.000 --> 00:13.000 :start payload

  • no cue setting


WEBVTT

00:11.000 --> 00:13.000 align:start payload

  • positive test (should succeed)


WEBVTT

00:11.000 --> 00:13.000 align:middle payload

  • positive test (should succeed)


WEBVTT

00:11.000 --> 00:13.000 align:end payload

  • positive test (should succeed)


WEBVTT

00:11.000 --> 00:13.000 align:star payload

  • test misspelling of one of the possible values


WEBVTT

00:11.000 --> 00:13.000 align: payload

  • test missing value



These tests look okay, but just one thing to point out, the draft does require that a cue has a cue payload (eg, the text content of the subtitle), so if they weren't in the actual test files, they need to be added in so that we're only testing the pass/fail of the specific conditions we're looking at.

  • added payload to all tests