InvalidStateError and TextTrackCue.snapToLines

Hi Simon,

I have two questions regarding your new submission:

1. You're using INVALID_STATE_ERR for assert_throws. Shouldn't you use
"new InvalidStateError()" instead? After all, you're using new TypeError
in other places...

2. Looking at the spec,
[[
The snapToLines attribute, on getting, must return true if the text
track cue snap-to-lines flag of the text track cue that the TextTrackCue
object represents is set; or false otherwise. On setting, the text track
cue snap-to-lines flag must be set if the new value is true, and must be
unset otherwise.
]]

It's not clear to me that the following is correct:
[[
 assert_throws('INVALID_STATE_ERR', function(){ c1.snapToLines =
false; });
]]
https://dvcs.w3.org/hg/html/file/1ad5f579acf8/tests/submission/Opera/media/interfaces/TextTrackCue/snapToLines.html

ie, unless I'm misreading the spec, I don't think that snapToLines is
supposed to return an exception.

Thank you,

Philippe


On Mon, 2012-10-15 at 17:38 +0200, Simon Pieters wrote:
> Hi,
> 
> I've pushed the following tests:
> 
> http://w3c-test.org/html/tests/submission/Opera/media/
> 
> This tests the <track> element, the surrounding DOM API, CORS for <track>,  
> parsing of WebVTT, parsing of WebVTT cue data, and WebVTT cue rendering.  
> The rendering tests are reftests (except the adhoc folder which is  
> manual), the rest are testharness.js tests. The tests do not perfectly  
> reflect the latest changes to the specs. Not all tests are expected to  
> pass in Opera. Some tests check that a feature is not supported (e.g.  
> vertical), but that should be fixed.
> 
> The parser tests have expected result as JSON in the cue data, and a  
> separate JSON file with expected number of cues per file or error if the  
> file is expected to fail to load.
> 
> The parser cue data tests are generated from html5lib-style dat files.  
> Expected tree is the "WebVTT cue text DOM construction rules" (the  
> cue.getCueAsHTML() document fragment).
> 
> Enjoy.

Received on Sunday, 21 October 2012 14:25:41 UTC