changed the unit tests to reference a local video instead of youtube.
--- 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 @@
<filelist dir="../../src/js/" files="header.js" />
<filelist dir="../../src/js/libs"
- files="popcorn.js popcorn.code.js popcorn.jwplayer.js popcorn.mediafragment.js popcorn.youtube.js jwplayer.js mustache.js raphael.js" />
+ files="popcorn.js popcorn.youtube.js popcorn.code.js popcorn.jwplayer.js popcorn.mediafragment.js jwplayer.js mustache.js raphael.js"/>
<!-- required file before everything else -->
<filelist dir="../../src/js" files="main.js" />
--- 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 @@
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
<div id="qunit-fixture" style="position: float;">
- <div id='popcorn-div'>Popcorn div</div>
+ <video id='popcorn-div' style="display:;width:300px" controls preload="auto">
+ <source id='mp4' src="../test/trailer.mp4" type='video/mp4; codecs="avc1, mp4a"'>
+ <source id='ogv' src="../test/trailer.ogv" type='video/ogg; codecs="theora, vorbis"'>
+ <source id='webm' src="../test/trailer.webm" type='video/webm; codecs="vp8, vorbis"'>
+
+ <p>Your user agent does not support the HTML5 Video element.</p>
+
+ </video>
+
<div id='widget-div'></div>
</div>
</body>
--- 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
+};
--- 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");
}
});
--- 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");
}
});
--- 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
+};
--- 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();
--- 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() {
--- 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
+};
--- 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");
}
});