@@ -21,6 +21,16 @@ Tests.registerAsync("Video.open(invalid file)", function(next) {
21
21
video . open ( "invalid" ) ;
22
22
} , 5000 ) ;
23
23
24
+ Tests . register ( "Video access to uninitialized properties" , function ( ) {
25
+ Assert . strictEqual ( video . width , - 1 , "Video width does not match" ) ;
26
+ Assert . strictEqual ( video . height , - 1 , "Video height does not match" ) ;
27
+ Assert . strictEqual ( video . duration , 0 , "Video duration is incorrect" ) ;
28
+ Assert . strictEqual ( video . bitrate , 0 , "Unexpected bitrate" ) ;
29
+ Assert . strictEqual ( video . metadata , undefined , "File MetaData does not match" ) ;
30
+ Assert . strictEqual ( video . getAudioNode ( ) , null , "Node should not be defined" ) ;
31
+ } ) ;
32
+
33
+
24
34
Tests . registerAsync ( "Video.open" , function ( next ) {
25
35
video . close ( ) ;
26
36
@@ -40,6 +50,11 @@ Tests.registerAsync("Video.open", function(next) {
40
50
video . open ( "AV/video.ogg" ) ;
41
51
} , 5000 ) ;
42
52
53
+ Tests . register ( "Video.width/height" , function ( ) {
54
+ Assert . strictEqual ( video . width , 720 , "Video width does not match" ) ;
55
+ Assert . strictEqual ( video . height , 400 , "Video height does not match" ) ;
56
+ } ) ;
57
+
43
58
Tests . register ( "Video.duration" , function ( ) {
44
59
Assert . strictEqual ( video . duration , 6 , "Video duration is incorrect" ) ;
45
60
} ) ;
0 commit comments