From: ScottDowne Date: Thu, 16 Dec 2010 21:18:03 +0000 (-0500) Subject: practice test, should never be seen X-Git-Tag: v0.2~34^2~8 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=52fa923ff5df1516104c5447224eaa0874d76046;p=popcorn-js.git practice test, should never be seen --- diff --git a/test/popcorn.unit.js b/test/popcorn.unit.js index 3db982f..b403d5b 100644 --- a/test/popcorn.unit.js +++ b/test/popcorn.unit.js @@ -768,10 +768,61 @@ test("Functions", function () { equals( trackEvents.length, 3, "3 user created trackEvents returned by popped.getTrackEvents()" ) + /*popped.rw({ + start: 1, + end: 2 + }); + var newTrackId = popped.getLastTrackEventId(); + + popped.currentTime(1).play();*/ + }); +test("Update Index", function () { + + QUnit.reset(); + + var p3 = Popcorn("#video"), + expects = 4, + count = 0; + + function plus() { + if ( ++count === expects ) { + start(); + // clean up added events after tests + p2.removePlugin("track"); + } + } + + stop(); + + Popcorn.plugin("track", function () { + return { + start: function () { + forwardStart = !forwardStart; + ok( forwardStart, "forward's start fired"); + plus(); + }, + end: function () { + forwardEnd = !forwardEnd; + p2.currentTime(1).play(); + ok( forwardEnd, "forward's end fired"); + plus(); + } + }; + }); + + p3.track({ + start: 1, + end: 2 + }); + + p3.currentTime(1).play().currentTime(1).play().removeTrackEvent(p3.getLastTrackEventId()); + +}); + module("Popcorn XHR"); test("Basic", function () {