unittests/tests/init.js
branchpopcorn-port
changeset 530 3cc4a789dae7
parent 461 a9c5eeca190c
equal deleted inserted replaced
529:3ebf62837492 530:3cc4a789dae7
    94     var pop = IriSP.configurePopcorn(layoutManager, this.popcornOptions);
    94     var pop = IriSP.configurePopcorn(layoutManager, this.popcornOptions);
    95     var conf = {type: "PlayerWidget",
    95     var conf = {type: "PlayerWidget",
    96                mode: "radio",
    96                mode: "radio",
    97                metadata:{
    97                metadata:{
    98                 format:'cinelab',
    98                 format:'cinelab',
    99                 src:'test.json',
    99                 src:'../test/test.json',
   100                 type:'dummy'},
   100                 type:'dummy'},
   101                 requires: [
   101                 requires: [
   102                 {type: "PlayerWidget",
   102                 {type: "PlayerWidget",
   103                   mode: "radio",
   103                   mode: "radio",
   104                   metadata:{
   104                   metadata:{
   105                     format:'cinelab',
   105                     format:'cinelab',
   106                     src:'test.json',
   106                     src:'../test/test.json',
   107                     type:'dummy'
   107                     type:'dummy'
   108                 } }]
   108                 } }]
   109               };
   109               };
   110 
   110 
   111 
   111 
   117 
   117 
   118   test("test the instantiation of a bunch of widgets", function() {
   118   test("test the instantiation of a bunch of widgets", function() {
   119 
   119 
   120     var layoutManager = new IriSP.LayoutManager({container: "LdtPlayer", width: 327, height: 542});
   120     var layoutManager = new IriSP.LayoutManager({container: "LdtPlayer", width: 327, height: 542});
   121     var pop = IriSP.configurePopcorn(layoutManager, this.popcornOptions);
   121     var pop = IriSP.configurePopcorn(layoutManager, this.popcornOptions);
   122 
       
   123     var widgets = IriSP.configureWidgets(pop, layoutManager, this.widgetOptions);
   122     var widgets = IriSP.configureWidgets(pop, layoutManager, this.widgetOptions);
   124 
   123 
   125     ok(widgets[0] instanceof IriSP.PlayerWidget, "first widget is a player widget");
   124     ok(widgets[0] instanceof IriSP.PlayerWidget, "first widget is a player widget");
   126     ok(widgets[1] instanceof IriSP.SegmentsWidget, "second widget is a segments widget");
   125     ok(widgets[1] instanceof IriSP.SegmentsWidget, "second widget is a segments widget");
   127     ok(widgets[2] instanceof IriSP.AnnotationsWidget, "third widget is an annotation widget");
   126     ok(widgets[2] instanceof IriSP.AnnotationsWidget, "third widget is an annotation widget");