# HG changeset patch # User hamidouk # Date 1323274324 -3600 # Node ID 440ffc18f8277f7a3e1727c4401a8df5da0c5b53 # Parent dcf7121b1202314874f54ad4f63612313da04644 changed the unit tests to reference a local video instead of youtube. diff -r dcf7121b1202 -r 440ffc18f827 sbin/build/client.xml --- a/sbin/build/client.xml Wed Dec 07 14:31:47 2011 +0100 +++ b/sbin/build/client.xml Wed Dec 07 17:12:04 2011 +0100 @@ -72,7 +72,7 @@ + files="popcorn.js popcorn.youtube.js popcorn.code.js popcorn.jwplayer.js popcorn.mediafragment.js jwplayer.js mustache.js raphael.js"/> diff -r dcf7121b1202 -r 440ffc18f827 unittests/index.html --- a/unittests/index.html Wed Dec 07 14:31:47 2011 +0100 +++ b/unittests/index.html Wed Dec 07 17:12:04 2011 +0100 @@ -76,7 +76,15 @@

    -
    Popcorn div
    + +
    diff -r dcf7121b1202 -r 440ffc18f827 unittests/tests/widgets/annotationsWidget.js --- a/unittests/tests/widgets/annotationsWidget.js Wed Dec 07 14:31:47 2011 +0100 +++ b/unittests/tests/widgets/annotationsWidget.js Wed Dec 07 17:12:04 2011 +0100 @@ -3,7 +3,7 @@ function test_annotations_widget() { module("annotations widget testing", {setup : function() { - this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); + this.Popcorn = Popcorn("#popcorn-div"); this.dt = new IriSP.DataLoader(); this.ser = new IriSP.MockSerializer(this.dt, "/url"); /* dummy serializer */ @@ -20,7 +20,7 @@ }, teardown: function() { /* free the popcorn object because it has signal handlers attached to it */ - this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); + this.Popcorn = Popcorn("#popcorn-div"); } }); @@ -40,4 +40,4 @@ equal(widget.selector.find(".Ldt-SaDescription").text(), "description", "description set correctly"); equal(widget.selector.find(".Ldt-SaKeywordText").text(), "", "keywords field set correctly"); }); -}; \ No newline at end of file +}; diff -r dcf7121b1202 -r 440ffc18f827 unittests/tests/widgets/arrowWidget.js --- a/unittests/tests/widgets/arrowWidget.js Wed Dec 07 14:31:47 2011 +0100 +++ b/unittests/tests/widgets/arrowWidget.js Wed Dec 07 17:12:04 2011 +0100 @@ -3,7 +3,7 @@ function test_arrow_widget() { module("arrow widget testing", {setup : function() { - this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); + this.Popcorn = Popcorn("#popcorn-div"); this.dt = new IriSP.DataLoader(); this.ser = new IriSP.MockSerializer(this.dt, "/url"); /* dummy serializer */ @@ -19,7 +19,7 @@ }, teardown: function() { /* free the popcorn object because it has signal handlers attached to it */ - this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); + this.Popcorn = Popcorn("#popcorn-div"); } }); diff -r dcf7121b1202 -r 440ffc18f827 unittests/tests/widgets/playerWidget.js --- a/unittests/tests/widgets/playerWidget.js Wed Dec 07 14:31:47 2011 +0100 +++ b/unittests/tests/widgets/playerWidget.js Wed Dec 07 17:12:04 2011 +0100 @@ -3,7 +3,7 @@ function test_player_widget() { module("player widget testing", {setup : function() { - this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); + this.Popcorn = Popcorn("#popcorn-div"); this.dt = new IriSP.DataLoader(); this.ser = new IriSP.MockSerializer(this.dt, "/url"); /* dummy serializer */ @@ -19,7 +19,7 @@ }, teardown: function() { /* free the popcorn object because it has signal handlers attached to it */ - this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); + this.Popcorn = Popcorn("#popcorn-div"); } }); diff -r dcf7121b1202 -r 440ffc18f827 unittests/tests/widgets/polemicWidget.js --- a/unittests/tests/widgets/polemicWidget.js Wed Dec 07 14:31:47 2011 +0100 +++ b/unittests/tests/widgets/polemicWidget.js Wed Dec 07 17:12:04 2011 +0100 @@ -3,7 +3,7 @@ function test_polemic_widget() { module("polemic widget testing", {setup : function() { - this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); + this.Popcorn = Popcorn("#popcorn-div"); this.dt = new IriSP.DataLoader(); this.ser = new IriSP.MockTweetSerializer(this.dt, "/url"); /* dummy serializer */ @@ -35,7 +35,7 @@ }, teardown: function() { /* free the popcorn object because it has signal handlers attached to it */ - this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); + this.Popcorn = Popcorn("#popcorn-div"); }}); test("test widget initialization", function() { @@ -76,4 +76,4 @@ }); -}; \ No newline at end of file +}; diff -r dcf7121b1202 -r 440ffc18f827 unittests/tests/widgets/segmentsWidget.js --- a/unittests/tests/widgets/segmentsWidget.js Wed Dec 07 14:31:47 2011 +0100 +++ b/unittests/tests/widgets/segmentsWidget.js Wed Dec 07 17:12:04 2011 +0100 @@ -3,7 +3,7 @@ function test_segments_widget() { module("segments widget testing", {setup : function() { - this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); + this.Popcorn = Popcorn("#popcorn-div"); this.dt = new IriSP.DataLoader(); this.ser = new IriSP.MockSerializer(this.dt, "/url"); /* dummy serializer */ @@ -22,7 +22,7 @@ }, teardown: function() { /* free the popcorn object because it has signal handlers attached to it */ - this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); + this.Popcorn = Popcorn("#popcorn-div"); }}); test("test widget initialization", function() { @@ -39,7 +39,7 @@ test("test click on a random segment", function() { var widget = new IriSP.SegmentsWidget(this.Popcorn, this.config, this.ser); widget.draw(); - + var spy_timeupdate = this.spy(); var spy_segmentClick = this.spy(); var spy_handler = sinon.spy(widget, "clickHandler"); @@ -52,7 +52,7 @@ ok(spy_timeupdate.called, "the timeupdate signal has been sent"); ok(spy_handler.called, "handling function has been called"); }); - + test("test search highlight features", function() { var tag_id = "#s_" + "82613B88-9578-DC2C-D7D0-B2C5BE0B7BDA".toUpperCase(); diff -r dcf7121b1202 -r 440ffc18f827 unittests/tests/widgets/sliderWidget.js --- a/unittests/tests/widgets/sliderWidget.js Wed Dec 07 14:31:47 2011 +0100 +++ b/unittests/tests/widgets/sliderWidget.js Wed Dec 07 17:12:04 2011 +0100 @@ -1,7 +1,7 @@ function test_slider_widget() { module("slider widget testing", {setup : function() { - this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); + this.Popcorn = Popcorn("#popcorn-div"); this.dt = new IriSP.DataLoader(); this.ser = new IriSP.MockSerializer(this.dt, "/url"); /* dummy serializer */ @@ -20,7 +20,7 @@ }, teardown: function() { /* free the popcorn object because it has signal handlers attached to it */ - this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); + this.Popcorn = Popcorn("#popcorn-div"); }}); test("test widget initialization", function() { diff -r dcf7121b1202 -r 440ffc18f827 unittests/tests/widgets/tooltipWidget.js --- a/unittests/tests/widgets/tooltipWidget.js Wed Dec 07 14:31:47 2011 +0100 +++ b/unittests/tests/widgets/tooltipWidget.js Wed Dec 07 17:12:04 2011 +0100 @@ -3,7 +3,7 @@ function test_tooltip_widget() { module("tooltip widget testing", {setup : function() { - this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); + this.Popcorn = Popcorn("#popcorn-div"); this.dt = new IriSP.DataLoader(); this.ser = new IriSP.MockSerializer(this.dt, "/url"); /* dummy serializer */ @@ -17,7 +17,7 @@ teardown: function() { /* free the popcorn object because it has signal handlers attached to it */ - this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); + this.Popcorn = Popcorn("#popcorn-div"); } }); @@ -44,4 +44,4 @@ equal(widget.selector.children(".tip").css("left"), "-10000px", "test if div has been positionned correctly"); equal(widget.selector.children(".tip").css("top"), "-100000px", "test if div has been positionned correctly"); }); -}; \ No newline at end of file +}; diff -r dcf7121b1202 -r 440ffc18f827 unittests/tests/widgets/tweetsWidget.js --- a/unittests/tests/widgets/tweetsWidget.js Wed Dec 07 14:31:47 2011 +0100 +++ b/unittests/tests/widgets/tweetsWidget.js Wed Dec 07 17:12:04 2011 +0100 @@ -3,7 +3,7 @@ function test_tweets_widget() { module("tweet widget testing", {setup : function() { - this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); + this.Popcorn = Popcorn("#popcorn-div"); this.dt = new IriSP.DataLoader(); this.ser = new IriSP.MockTweetSerializer(this.dt, "/url"); /* dummy serializer */ @@ -18,7 +18,7 @@ }, teardown: function() { /* free the popcorn object because it has signal handlers attached to it */ - this.Popcorn = Popcorn.youtube("#popcorn-div", "http://www.youtube.com/watch?v=QH2-TGUlwu4"); + this.Popcorn = Popcorn("#popcorn-div"); } });