From 52fa923ff5df1516104c5447224eaa0874d76046 Mon Sep 17 00:00:00 2001 From: ScottDowne Date: Thu, 16 Dec 2010 16:18:03 -0500 Subject: [PATCH] practice test, should never be seen --- test/popcorn.unit.js | 51 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) 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 () { -- 2.43.0