From 3f104ee1cbabca56c73d0e99236991321aed220c Mon Sep 17 00:00:00 2001 From: Anna Sobiepanek Date: Mon, 13 Dec 2010 20:26:37 -0500 Subject: [PATCH] trying two maps --- plugins/googleMap/popcorn.googleMap.html | 21 +++++-- plugins/googleMap/popcorn.googleMap.unit.js | 66 +++++++++++++++++++++ 2 files changed, 83 insertions(+), 4 deletions(-) create mode 100644 plugins/googleMap/popcorn.googleMap.unit.js diff --git a/plugins/googleMap/popcorn.googleMap.html b/plugins/googleMap/popcorn.googleMap.html index 060bd2b..2ed21d0 100644 --- a/plugins/googleMap/popcorn.googleMap.html +++ b/plugins/googleMap/popcorn.googleMap.html @@ -8,22 +8,33 @@

Popcorn google Map Plug-in Demo

-

A Google Map displaying Toronto, Ontario will appear at 5 seconds and disappear at 45 seconds.

+

A Google Map displaying Toronto, Ontario will appear at 0 seconds and disappear at 10 seconds.

+

A Google Map displaying Toronto, Ontario will appear at 15 seconds and disappear at 25 seconds.

-

Locations in this video:

+
+

Locations in this video:

+

Locations in this video:

diff --git a/plugins/googleMap/popcorn.googleMap.unit.js b/plugins/googleMap/popcorn.googleMap.unit.js new file mode 100644 index 0000000..7877ca1 --- /dev/null +++ b/plugins/googleMap/popcorn.googleMap.unit.js @@ -0,0 +1,66 @@ +test("Popcorn Google Map Plugin", function () { + + var popped = Popcorn("#video"), + expects = 5, + count = 0, + iframeInterval, + iframeInterval2, + iframeInterval3, + iframeInterval4; + + expect(expects); + + function plus() { + if ( ++count===expects) { + start(); + } + } + + stop(); + + ok ('footnote' in popped, "footnote is a mehtod of the popped instance"); + plus(); + + ok ( document.getElementById('footnotediv').innerHTML === "", "initially, there is nothing inside the footnotediv" ); + plus(); + //equals( actual, expected, message ) instead of ok( boolean true, message ) + popped.footnote({ + start: 5, // seconds + end: 15, // seconds + text: 'This video made exclusively for drumbeat.org', + target: 'footnotediv' + } ) + .footnote({ + start: 35, // seconds + end: 45, // seconds + text: 'Visit webmademovies.org for more details', + target: 'footnotediv' + } ) + .play(); + + + interval = setInterval( function() { + if( popped.currentTime() > 5 && popped.currentTime() <= 15 ) { + ok (document.getElementById('footnotediv').innerHTML === "This video made exclusively for drumbeat.org", "footnote displaing correct information" ); + plus(); + clearInterval( interval ); + } + }, 5000); + + interval2 = setInterval( function() { + if( popped.currentTime() > 15 && popped.currentTime() < 35 ) { + ok (document.getElementById('footnotediv').innerHTML === "", "footnote cleared properly" ); + plus(); + clearInterval( interval2 ); + } + }, 5000); + + interval3 = setInterval( function() { + if( popped.currentTime() > 35 && popped.currentTime() < 45 ) { + ok (document.getElementById('footnotediv').innerHTML === "Visit webmademovies.org for more details", "footnote displaing correct information" ); + plus(); + clearInterval( interval3 ); + } + }, 5000); + +}); -- 2.43.0