equal
deleted
inserted
replaced
3 { |
3 { |
4 setup: function() { |
4 setup: function() { |
5 IriSP.jQuery("#widget-div").append("<div id='LdtPlayer'></div>"); |
5 IriSP.jQuery("#widget-div").append("<div id='LdtPlayer'></div>"); |
6 this.popcornOptions = { |
6 this.popcornOptions = { |
7 container: "LdtPlayer", |
7 container: "LdtPlayer", |
8 type: "jwplayer", file : "video/franceculture/franceculture_retourdudimanche20100620.flv", |
8 type: "html5", |
9 streamer: "rtmp://media.iri.centrepompidou.fr/ddc_player/", |
9 file : "trailer.mp4", |
10 flashplayer : '../libs/player.swf', |
|
11 live: true, |
|
12 "controlbar.position" : "none", |
|
13 height: 300, |
|
14 width: 200, |
|
15 provider: "rtmp" |
|
16 }; |
10 }; |
17 |
11 |
18 this.widgetOptions = { |
12 this.widgetOptions = { |
19 width:650, |
13 width:650, |
20 height:480, |
14 height:480, |
39 format:'cinelab', |
33 format:'cinelab', |
40 src:'test.json', |
34 src:'test.json', |
41 type:'dummy'} |
35 type:'dummy'} |
42 }, |
36 }, |
43 ]}; |
37 ]}; |
|
38 |
|
39 this.modulesOptions = [ |
|
40 {type: "Module", a : 36}, |
|
41 {type: "Module", b : 54} |
|
42 ]; |
44 } |
43 } |
45 }); |
44 }); |
46 |
45 |
47 test("test the creation of a correct popcorn object", function() { |
46 test("test the creation of a correct popcorn object", function() { |
48 |
47 |
127 ok(widgets[1] instanceof IriSP.SegmentsWidget, "second widget is a segments widget"); |
126 ok(widgets[1] instanceof IriSP.SegmentsWidget, "second widget is a segments widget"); |
128 ok(widgets[2] instanceof IriSP.AnnotationsWidget, "third widget is an annotation widget"); |
127 ok(widgets[2] instanceof IriSP.AnnotationsWidget, "third widget is an annotation widget"); |
129 equal(IriSP.jQuery("#" + this.widgetOptions.container).length, 1, "a new dom element has been created"); |
128 equal(IriSP.jQuery("#" + this.widgetOptions.container).length, 1, "a new dom element has been created"); |
130 }); |
129 }); |
131 |
130 |
|
131 test("test the instantiation of a couple modules", function() { |
|
132 |
|
133 var layoutManager = new IriSP.LayoutManager({container: "LdtPlayer", width: 327, height: 542}); |
|
134 var pop = IriSP.configurePopcorn(layoutManager, this.popcornOptions); |
|
135 |
|
136 var modules = IriSP.configureModules(pop, this.modulesOptions); |
|
137 |
|
138 ok(modules[0] instanceof IriSP.Module && modules[0]._config.a === 36); |
|
139 ok(modules[1] instanceof IriSP.Module && modules[1]._config.b === 54); |
|
140 }); |
|
141 |
132 |
142 |
133 } |
143 } |