unittests/tests/widgets/annotationsWidget.js
branchbugslaying-after-r417-merge
changeset 427 440ffc18f827
parent 309 49c2b9e63591
equal deleted inserted replaced
424:dcf7121b1202 427:440ffc18f827
     1 /* annotationsWidget.js */
     1 /* annotationsWidget.js */
     2 
     2 
     3 function test_annotations_widget() {
     3 function test_annotations_widget() {
     4   module("annotations widget testing", 
     4   module("annotations widget testing", 
     5   {setup : function() {    
     5   {setup : function() {    
     6     this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4");
     6     this.Popcorn = Popcorn("#popcorn-div");
     7     
     7     
     8     this.dt = new IriSP.DataLoader();
     8     this.dt = new IriSP.DataLoader();
     9     this.ser = new IriSP.MockSerializer(this.dt, "/url"); /* dummy serializer */
     9     this.ser = new IriSP.MockSerializer(this.dt, "/url"); /* dummy serializer */
    10         
    10         
    11     IriSP.jQuery("#widget-div").append("<div id='Ldt-Ligne'></div>");
    11     IriSP.jQuery("#widget-div").append("<div id='Ldt-Ligne'></div>");
    18 							debug:true,
    18 							debug:true,
    19 							css:'../src/css/LdtPlayer.css'};
    19 							css:'../src/css/LdtPlayer.css'};
    20     },
    20     },
    21   teardown: function() {
    21   teardown: function() {
    22     /* free the popcorn object because it has signal handlers attached to it */
    22     /* free the popcorn object because it has signal handlers attached to it */
    23     this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4");
    23     this.Popcorn = Popcorn("#popcorn-div");
    24   }
    24   }
    25   });
    25   });
    26   
    26   
    27   test("test widget initialization", function() {  
    27   test("test widget initialization", function() {  
    28     var widget = new IriSP.AnnotationsWidget(this.Popcorn, this.config, this.ser);    
    28     var widget = new IriSP.AnnotationsWidget(this.Popcorn, this.config, this.ser);