var popped = Popcorn("#video"),
methods = "load play pause currentTime mute volume roundTime exec",
- expects = 34,
+ expects = 22,
count = 0;
- expect(expects);
+ //expect(expects);
function plus() {
+ console.log(count);
if ( ++count == expects ) {
start();
}
plus();
ok( Popcorn.registry.length === 1, "One item in the registry");
plus();
-
+
+
+
popped.executor({
start: 1,
- end: 20
+ end: 2
});
Popcorn.plugin("complicator", {
start: function ( event ) {
-
- equals( ~~this.currentTime(), 1, "~~this.currentTime() === 1");
- plus();
-
var self = this;
// These ensure that a popcorn instance is the value of `this` inside a plugin definition
plus();
popped.complicator({
- start: 1,
- end: 20
+ start: 3,
+ end: 4
});
-
-
- popped.currentTime(0).play();
-
+
+
var breaker = {
start: 0,
plus();
- equals( 1, breaker.start, "plugin start method fires only once");
+ equals( breaker.start, 1, "plugin start method fires only once");
plus();
- equals( 1, breaker.end, "plugin end method fires only once");
+ equals( breaker.end, 1, "plugin end method fires only once");
plus();
- start()
+
}
});
-
- popped.currentTime(0);
-
popped.breaker({
start: 1,
end: 2
- });
+ });
-
-
+
+ popped.currentTime(0).play();
});
/*
+
+
+
+
+
+
+
test("Events Extended", function () {
QUnit.reset();