]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
[#494] Formatting and whitespace fixes
authorRick Waldron <waldron.rick@gmail.com>
Thu, 8 Sep 2011 17:30:56 +0000 (13:30 -0400)
committerRick Waldron <waldron.rick@gmail.com>
Thu, 8 Sep 2011 17:31:47 +0000 (13:31 -0400)
test/popcorn.unit.js

index f5e28302be44b0bc3b9ea5ac2dc59cbe107e8cd7..a1b1f01ffd05f54ebcc65cd22a5a6ee6ea7a8c28 100644 (file)
@@ -1,5 +1,5 @@
 module("Popcorn API");
-test("API", function () {
+test("API", function() {
 
   var expects = 4,
       count = 0;
@@ -49,7 +49,7 @@ test("API", function () {
 
 });
 
-test("Popcorn.* Static Methods", function () {
+test("Popcorn.* Static Methods", function() {
 
   var statics = [ "forEach", "extend", "error", "guid", "sizeOf", "nop",
                   "addTrackEvent", "removeTrackEvent", "getTrackEvents", "getTrackEvent", "position", "disable", "enable" ],
@@ -100,7 +100,7 @@ test("Popcorn.forEach", function() {
   equal(count, Popcorn.sizeOf(object), Popcorn.sizeOf(object) + " properties in object");
 });
 
-test("Popcorn.util.toSeconds" , function () {
+test("Popcorn.util.toSeconds" , function() {
   var framerate = 24,
       storedStartTime,
       storedEndTime,
@@ -182,13 +182,13 @@ test("Popcorn.util.toSeconds" , function () {
     }
   ];
 
-  var equivalentTimes = function ( testedTime, correctTime ) {
+  var equivalentTimes = function( testedTime, correctTime ) {
     var tolerance = 0.0001;
     return ( testedTime < ( correctTime + tolerance ) ) &&
            ( testedTime > ( correctTime - tolerance ) );
   };
 
-  var logMessage = function ( timeStr, correctTime, incorrectTime ) {
+  var logMessage = function( timeStr, correctTime, incorrectTime ) {
     return "Time stored in seconds for '" + timeStr +
            "' should be " + correctTime +
            ". Time stored was " + incorrectTime ;
@@ -282,7 +282,7 @@ test("Instances", function() {
   plus();
 });
 
-test("guid", function () {
+test("guid", function() {
 
   expect(6);
 
@@ -354,7 +354,7 @@ test("isArray", function() {
 });
 
 
-test("Protected", function () {
+test("Protected", function() {
 
   expect(1);
   //  TODO: comprehensive tests for these utilities
@@ -364,7 +364,7 @@ test("Protected", function () {
 
 });
 
-test("Protected from removal", function () {
+test("Protected from removal", function() {
 
   expect( Popcorn.protect.natives.length * 2 );
 
@@ -386,7 +386,7 @@ test("Protected from removal", function () {
 
 
 
-test( "Object", function () {
+test( "Object", function() {
 
   var popped = Popcorn( "#video" ),
       popObj = Popcorn( document.getElementById( "video" ) ),
@@ -425,7 +425,7 @@ test( "Object", function () {
 
   popped.play();
 
-  methods.split( /\s+/g ).forEach(function ( k,v ) {
+  methods.split( /\s+/g ).forEach(function( k,v ) {
 
     ok( k in popped, "instance by id has method: " + k );
     plus();
@@ -449,7 +449,7 @@ test( "Object", function () {
 
   popObj.play();
 
-  methods.split( /\s+/g ).forEach(function ( k,v ) {
+  methods.split( /\s+/g ).forEach(function( k,v ) {
 
     ok( k in popObj, "instance by reference has method: " + k );
     plus();
@@ -487,7 +487,7 @@ module("Popcorn Prototype Methods");
 
 
 
-test("roundTime", function () {
+test("roundTime", function() {
 
   QUnit.reset();
 
@@ -501,7 +501,7 @@ test("roundTime", function () {
 });
 
 
-test("exec", function () {
+test("exec", function() {
 
   QUnit.reset();
 
@@ -528,7 +528,7 @@ test("exec", function () {
 
   stop( 10000 );
 
-  popped.exec( 4, function () {
+  popped.exec( 4, function() {
     ok( loop < 2, "exec callback fired " + ++loop );
     plus();
 
@@ -542,7 +542,7 @@ test("exec", function () {
 
 });
 
-test("mute", function () {
+test("mute", function() {
 
   var video = Popcorn("#video"),
       audio = Popcorn("#audio"),
@@ -597,7 +597,7 @@ test("mute", function () {
 
 module("Popcorn Static Methods");
 
-test( "Popcorn.extend", function () {
+test( "Popcorn.extend", function() {
 
   QUnit.reset();
 
@@ -673,7 +673,7 @@ test( "Popcorn.events", function() {
   equals( typeof Popcorn.Events.Natives, "string", "Popcorn.Events.Natives is a string" );
   equals( typeof Popcorn.events, "object", "Popcorn.events is an object" );
 
-  Popcorn.forEach( eventsReturned, function ( e ) {
+  Popcorn.forEach( eventsReturned, function( e ) {
     ok( Popcorn.events.isNative ( e ), e + " is a native event" );
   });
 
@@ -870,7 +870,7 @@ test( "Popcorn.locale object", function() {
 
 
 module("Popcorn Position");
-test("position", function () {
+test("position", function() {
 
   expect(25);
 
@@ -939,7 +939,7 @@ test("position", function () {
   $("#position-tests").hide();
 });
 
-test("position called from plugin", function () {
+test("position called from plugin", function() {
 
   var $pop = Popcorn("#video"),
       expects = 3,
@@ -1007,7 +1007,7 @@ test("Determine event api interface", function() {
   });
 });
 
-test("Stored By Type", function () {
+test("Stored By Type", function() {
 
   QUnit.reset();
 
@@ -1035,28 +1035,28 @@ test("Stored By Type", function () {
   stop( 10000 );
 
 
-  p.listen("play", function () {
+  p.listen("play", function() {
     fired++;
 
     ok(true, "Play fired " + fired);
     plus();
   });
 
-  p.listen("play", function () {
+  p.listen("play", function() {
     fired++;
 
     ok(true, "Play fired " + fired);
     plus();
   });
 
-  p.listen("play", function () {
+  p.listen("play", function() {
     fired++;
 
     ok(true, "Play fired " + fired);
     plus();
   });
 
-  p.listen("play", function () {
+  p.listen("play", function() {
     fired++;
 
     ok(true, "Play fired " + fired);
@@ -1074,7 +1074,7 @@ test("Stored By Type", function () {
 });
 
 
-test("Simulated", function () {
+test("Simulated", function() {
 
   QUnit.reset();
 
@@ -1094,8 +1094,8 @@ test("Simulated", function () {
   stop( 10000 );
 
 
-  Setup.events.forEach(function ( name ) {
-    p.listen( name, function (event) {
+  Setup.events.forEach(function( name ) {
+    p.listen( name, function(event) {
 
       if ( completed.indexOf(name) === -1 ) {
         ok( true, name + " fired" );
@@ -1108,7 +1108,7 @@ test("Simulated", function () {
     });
   });
 
-  Setup.events.forEach(function ( name ) {
+  Setup.events.forEach(function( name ) {
     p.trigger( name );
   });
 
@@ -1116,7 +1116,7 @@ test("Simulated", function () {
 });
 
 
-test("Real", function () {
+test("Real", function() {
 
   QUnit.reset();
 
@@ -1135,9 +1135,9 @@ test("Real", function () {
   stop( 10000 );
 
 
-  [ "play", "pause", "volumechange", "seeking", "seeked" ].forEach(function ( name ) {
+  [ "play", "pause", "volumechange", "seeking", "seeked" ].forEach(function( name ) {
 
-    p.listen( name, function (event) {
+    p.listen( name, function(event) {
 
       if ( completed.indexOf(name) === -1 ) {
         ok( true, name + " fired" );
@@ -1164,7 +1164,7 @@ test("Real", function () {
 
 });
 
-test("Custom", function () {
+test("Custom", function() {
 
   var expects = 1,
       count = 0;
@@ -1178,7 +1178,7 @@ test("Custom", function () {
   var p = Popcorn("#video");
 
 
-  p.listen("eventz0rz", function ( event ) {
+  p.listen("eventz0rz", function( event ) {
 
     ok( true, "Custom event fired" );
     plus();
@@ -1192,7 +1192,7 @@ test("Custom", function () {
 });
 
 
-test("UI/Mouse", function () {
+test("UI/Mouse", function() {
 
   var expects = 1,
       count = 0;
@@ -1206,7 +1206,7 @@ test("UI/Mouse", function () {
   var p = Popcorn("#video");
 
 
-  p.listen("click", function ( event ) {
+  p.listen("click", function( event ) {
 
     ok( true, "click event fired" );
     plus();
@@ -1220,7 +1220,7 @@ test("UI/Mouse", function () {
 });
 
 module("Popcorn Plugin")
-test("Manifest", function () {
+test("Manifest", function() {
 
 
 
@@ -1298,7 +1298,7 @@ test("Manifest", function () {
 
 });
 
-test("Configurable Defaults", function () {
+test("Configurable Defaults", function() {
 
   var expects = 13,
       count   = 0;
@@ -1317,7 +1317,7 @@ test("Configurable Defaults", function () {
 
   stop();
 
-  Popcorn.plugin( "configurable", function () {
+  Popcorn.plugin( "configurable", function() {
     return {
       _setup: function( options ) {
 
@@ -1358,7 +1358,7 @@ test("Configurable Defaults", function () {
     }
   });
 
-  Popcorn.plugin( "multiconfig", function () {
+  Popcorn.plugin( "multiconfig", function() {
     return {
       start: function( event, options ) {
         equal( options.target, "quux", 'options.target, "quux" in multiconfig start');
@@ -1371,7 +1371,7 @@ test("Configurable Defaults", function () {
     };
   });
 
-  Popcorn.plugin( "overridden", function () {
+  Popcorn.plugin( "overridden", function() {
     return {
       _setup: function( options ) {
         equal( options.text, "hello!", 'options.text, overriden with "hello!" in overridden _setup');
@@ -1448,7 +1448,7 @@ test("Configurable Defaults", function () {
 
 });
 
-test("Start Zero Immediately", function () {
+test("Start Zero Immediately", function() {
 
   var $pop = Popcorn("#video"),
       expects = 1,
@@ -1479,7 +1479,7 @@ test("Start Zero Immediately", function () {
     end: 2
   });
 });
-test("Update Timer (timeupdate)", function () {
+test("Update Timer (timeupdate)", function() {
 
   QUnit.reset();
 
@@ -1509,9 +1509,9 @@ test("Update Timer (timeupdate)", function () {
   // These tests come close to 10 seconds on chrome, increasing to 15
   stop( 15000 );
 
-  Popcorn.plugin( "forwards", function () {
+  Popcorn.plugin( "forwards", function() {
     return {
-      start: function ( event, options ) {
+      start: function( event, options ) {
 
         if ( !options.startFired ) {
 
@@ -1521,7 +1521,7 @@ test("Update Timer (timeupdate)", function () {
           plus();
         }
       },
-      end: function ( event, options ) {
+      end: function( event, options ) {
 
         if ( !options.endFired ) {
 
@@ -1540,9 +1540,9 @@ test("Update Timer (timeupdate)", function () {
     end: 4
   });
 
-  Popcorn.plugin( "backwards", function () {
+  Popcorn.plugin( "backwards", function() {
     return {
-      start: function ( event, options ) {
+      start: function( event, options ) {
 
         if ( !options.startFired ) {
 
@@ -1553,7 +1553,7 @@ test("Update Timer (timeupdate)", function () {
           plus();
         }
       },
-      end: function ( event, options ) {
+      end: function( event, options ) {
 
         if ( !options.endFired ) {
 
@@ -1573,11 +1573,11 @@ test("Update Timer (timeupdate)", function () {
   });
 
   Popcorn.plugin( "wrapper", {
-    start: function ( event, options ) {
+    start: function( event, options ) {
 
       wrapperRunning[ options.wrapper ] = true;
     },
-    end: function ( event, options ) {
+    end: function( event, options ) {
 
       wrapperRunning[ options.wrapper ] = false;
     }
@@ -1647,7 +1647,7 @@ test("Update Timer (timeupdate)", function () {
 
 });
 
-test("Update Timer (frameAnimation)", function () {
+test("Update Timer (frameAnimation)", function() {
 
   QUnit.reset();
 
@@ -1677,9 +1677,9 @@ test("Update Timer (frameAnimation)", function () {
   // These tests come close to 10 seconds on chrome, increasing to 15
   stop( 15000 );
 
-  Popcorn.plugin( "forwards", function () {
+  Popcorn.plugin( "forwards", function() {
     return {
-      start: function ( event, options ) {
+      start: function( event, options ) {
 
         if ( !options.startFired ) {
 
@@ -1689,7 +1689,7 @@ test("Update Timer (frameAnimation)", function () {
           plus();
         }
       },
-      end: function ( event, options ) {
+      end: function( event, options ) {
 
         if ( !options.endFired ) {
 
@@ -1708,9 +1708,9 @@ test("Update Timer (frameAnimation)", function () {
     end: 4
   });
 
-  Popcorn.plugin( "backwards", function () {
+  Popcorn.plugin( "backwards", function() {
     return {
-      start: function ( event, options ) {
+      start: function( event, options ) {
 
         if ( !options.startFired ) {
 
@@ -1721,7 +1721,7 @@ test("Update Timer (frameAnimation)", function () {
           plus();
         }
       },
-      end: function ( event, options ) {
+      end: function( event, options ) {
 
         if ( !options.endFired ) {
 
@@ -1741,11 +1741,11 @@ test("Update Timer (frameAnimation)", function () {
   });
 
   Popcorn.plugin( "wrapper", {
-    start: function ( event, options ) {
+    start: function( event, options ) {
 
       wrapperRunning[ options.wrapper ] = true;
     },
-    end: function ( event, options ) {
+    end: function( event, options ) {
 
       wrapperRunning[ options.wrapper ] = false;
     }
@@ -1816,7 +1816,7 @@ test("Update Timer (frameAnimation)", function () {
 });
 
 
-test("Plugin Factory", function () {
+test("Plugin Factory", function() {
 
   QUnit.reset();
 
@@ -1836,16 +1836,16 @@ test("Plugin Factory", function () {
   expect( expects );
   stop( 15000 );
 
-  Popcorn.plugin("executor", function () {
+  Popcorn.plugin("executor", function() {
 
     return {
 
-      start: function () {
+      start: function() {
         var self = this;
 
         // These ensure that a popcorn instance is the value of `this` inside a plugin definition
 
-        methods.split(/\s+/g).forEach(function (k,v) {
+        methods.split(/\s+/g).forEach(function(k,v) {
           ok( k in self, "executor instance has method: " + k );
 
           plus();
@@ -1866,7 +1866,7 @@ test("Plugin Factory", function () {
         ok( Object.prototype.toString.call(popped.data.trackEvents) === "[object Object]", "executor trackEvents property is an object" )
         plus();
       },
-      end: function () {
+      end: function() {
 
       }
     };
@@ -1885,13 +1885,13 @@ test("Plugin Factory", function () {
 
   Popcorn.plugin("complicator", {
 
-    start: function ( event ) {
+    start: function( event ) {
 
       var self = this;
 
       // These ensure that a popcorn instance is the value of `this` inside a plugin definition
 
-      methods.split(/\s+/g).forEach(function (k,v) {
+      methods.split(/\s+/g).forEach(function(k,v) {
         ok( k in self, "complicator instance has method: " + k );
 
         plus();
@@ -1912,12 +1912,12 @@ test("Plugin Factory", function () {
       ok( Object.prototype.toString.call(popped.data.trackEvents) === "[object Object]", "complicator trackEvents property is an object" )
       plus();
     },
-    end: function () {
+    end: function() {
 
       //start();
 
     },
-    timeupdate: function () {
+    timeupdate: function() {
     }
   });
 
@@ -1935,7 +1935,7 @@ test("Plugin Factory", function () {
 
 });
 
-test( "Popcorn Compose", function () {
+test( "Popcorn Compose", function() {
 
   QUnit.reset();
 
@@ -2187,7 +2187,7 @@ test( "Popcorn Compose", function () {
   popped.currentTime( 0 ).play();
 });
 
-test("Plugin Breaker", function () {
+test("Plugin Breaker", function() {
 
   QUnit.reset();
 
@@ -2214,14 +2214,14 @@ test("Plugin Breaker", function () {
 
   Popcorn.plugin("breaker", {
 
-    start: function () {
+    start: function() {
 
       breaker.start++;
 
       ok(true, "breaker started");
       plus();
     },
-    end: function () {
+    end: function() {
 
       breaker.end++;
 
@@ -2252,7 +2252,7 @@ test("Plugin Breaker", function () {
 
 });
 
-test("Plugin Empty", function () {
+test("Plugin Empty", function() {
 
   QUnit.reset();
 
@@ -2288,7 +2288,7 @@ test("Plugin Empty", function () {
 
 });
 
-test("Plugin Closure", function () {
+test("Plugin Closure", function() {
 
   QUnit.reset();
 
@@ -2318,12 +2318,12 @@ test("Plugin Closure", function () {
         options.startCount = 0;
         options.endCount = 0;
       },
-      start: function ( event, options ) {
+      start: function( event, options ) {
         // called once for each instance; the test will fail if startCount is not actually unique per instance
         equals( startCount++, options.startCount++, options.nick + " has correct start counts" );
         plus();
       },
-      end: function ( event, options ) {
+      end: function( event, options ) {
         // likewise for endCount
         equals( endCount++, options.endCount++, options.nick + " has correct end counts" );
         plus();
@@ -2349,7 +2349,7 @@ test("Plugin Closure", function () {
 
 });
 
-test("Remove Plugin", function () {
+test("Remove Plugin", function() {
 
   var p = Popcorn("#video"),
       p2 = Popcorn("#video"),
@@ -2378,10 +2378,10 @@ test("Remove Plugin", function () {
 
   Popcorn.plugin("removeme", {
 
-    start: function () {
+    start: function() {
 
     },
-    end: function () {
+    end: function() {
 
     },
     _teardown: function( options ) {
@@ -2483,14 +2483,14 @@ test("Remove Plugin", function () {
 
 
 
-test("Protected Names", function () {
+test("Protected Names", function() {
   //QUnit.reset();
 
   expect(8);
 
   var popped = Popcorn("#video");
 
-  $.each( "load play pause currentTime playbackRate mute volume duration".split(/\s+/), function (k, name) {
+  $.each( "load play pause currentTime playbackRate mute volume duration".split(/\s+/), function(k, name) {
     try {
 
       Popcorn.plugin( name, {});
@@ -2536,7 +2536,7 @@ test("Defaulting Empty End Values", function() {
 });
 
 module("Popcorn TrackEvents");
-test("Functions", function () {
+test("Functions", function() {
 
   //  TODO: break this into sep. units per function
   expect(19);
@@ -2544,10 +2544,10 @@ test("Functions", function () {
   var popped = Popcorn("#video"), ffTrackId, rwTrackId, rw2TrackId, rw3TrackId, historyRef, trackEvents;
 
 
-  Popcorn.plugin("ff", function () {
+  Popcorn.plugin("ff", function() {
     return {
-      start: function () {},
-      end: function () {}
+      start: function() {},
+      end: function() {}
     };
   });
 
@@ -2561,10 +2561,10 @@ test("Functions", function () {
 
 
 
-  Popcorn.plugin("rw", function () {
+  Popcorn.plugin("rw", function() {
     return {
-      start: function () {},
-      end: function () {}
+      start: function() {},
+      end: function() {}
     };
   });
 
@@ -2646,7 +2646,7 @@ test("Functions", function () {
 
 });
 
-test("getTrackEvent", function () {
+test("getTrackEvent", function() {
 
   //  TODO: break this into sep. units per function
   expect(5);
@@ -2654,10 +2654,10 @@ test("getTrackEvent", function () {
   var popped = Popcorn("#video"),
     trackIds = [], obj, oldId;
 
-  Popcorn.plugin("ff", function () {
+  Popcorn.plugin("ff", function() {
     return {
-      start: function () {},
-      end: function () {}
+      start: function() {},
+      end: function() {}
     };
   });
 
@@ -2668,10 +2668,10 @@ test("getTrackEvent", function () {
 
   trackIds.push( popped.getLastTrackEventId() );
 
-  Popcorn.plugin("rw", function () {
+  Popcorn.plugin("rw", function() {
     return {
-      start: function () {},
-      end: function () {}
+      start: function() {},
+      end: function() {}
     };
   });
 
@@ -2707,29 +2707,27 @@ test("getTrackEvent", function () {
 
 });
 
-test("Index Integrity", function () {
+test("Index Integrity (timeupdate)", function() {
 
+  var trackLen,
+    hasrun = false,
+    lastrun = false;
 
-
-  var trackLen, hasrun = false, lastrun = false;
-
-
-  Popcorn.plugin("ff", function () {
+  Popcorn.plugin("ff", function() {
     return {
-      start: function () {
-        var div = document.createElement('div');
+      start: function() {
+        var div = document.createElement("div");
         div.id = "index-test";
         div.innerHTML = "foo";
 
         document.body.appendChild(div);
       },
-      end: function () {
-        document.getElementById('index-test').parentNode.removeChild(document.getElementById('index-test'));
+      end: function() {
+        document.getElementById("index-test").parentNode.removeChild(document.getElementById("index-test"));
       }
     };
   });
 
-
   var p = Popcorn("#video");
 
   p.ff({
@@ -2746,19 +2744,13 @@ test("Index Integrity", function () {
   equals(p.data.trackEvents.startIndex, 0, "p.data.trackEvents.startIndex is 0");
   equals(p.data.trackEvents.byStart.length, 3, "p.data.trackEvents.byStart.length is 3 - before play" );
 
-
-
-
-  p.listen("timeupdate", function () {
-
-    if ( p.roundTime() > 40 && p.roundTime() < 42 && !hasrun ) {
-    }
+  p.listen("timeupdate", function() {
 
     if ( p.roundTime() > 40 && p.roundTime() < 42 && hasrun && !lastrun ) {
 
       lastrun = true;
 
-      equals( document.getElementById('index-test'), null, "document.getElementById('index-test') is null on second run - after removeTrackEvent" );
+      equals( document.getElementById("index-test"), null, "document.getElementById('index-test') is null on second run - after removeTrackEvent" );
 
       start();
     }
@@ -2772,51 +2764,41 @@ test("Index Integrity", function () {
       equals(p.data.trackEvents.startIndex, 2, "p.data.trackEvents.startIndex is 2 - after play, before removeTrackEvent");
       equals(p.data.trackEvents.endIndex, 2, "p.data.trackEvents.endIndex is 2 - after play, before removeTrackEvent");
 
-
-
       p.removeTrackEvent("removeable-track-event");
 
       equals(p.data.trackEvents.byStart.length, 2, "p.data.trackEvents.byStart.length is 2 - after removeTrackEvent" );
       equals(p.data.trackEvents.startIndex, 1, "p.data.trackEvents.startIndex is 1 - after removeTrackEvent");
       equals(p.data.trackEvents.endIndex, 1, "p.data.trackEvents.endIndex is 1 - after removeTrackEvent");
 
-
-
       p.currentTime(40).play();
 
-
-
     }
   });
 
   p.play();
-
-
 });
 
-test("Index Integrity (frameAnimation)", function () {
-
+test("Index Integrity (frameAnimation)", function() {
 
+  var trackLen,
+    hasrun = false,
+    lastrun = false;
 
-  var trackLen, hasrun = false, lastrun = false;
-
-
-  Popcorn.plugin("ff", function () {
+  Popcorn.plugin("ff", function() {
     return {
-      start: function () {
-        var div = document.createElement('div');
+      start: function() {
+        var div = document.createElement("div");
         div.id = "index-test";
         div.innerHTML = "foo";
 
         document.body.appendChild(div);
       },
-      end: function () {
-        document.getElementById('index-test').parentNode.removeChild(document.getElementById('index-test'));
+      end: function() {
+        document.getElementById("index-test").parentNode.removeChild(document.getElementById("index-test"));
       }
     };
   });
 
-
   var p = Popcorn("#video", { frameAnimation: true });
 
   p.ff({
@@ -2833,19 +2815,13 @@ test("Index Integrity (frameAnimation)", function () {
   equals(p.data.trackEvents.startIndex, 0, "p.data.trackEvents.startIndex is 0");
   equals(p.data.trackEvents.byStart.length, 3, "p.data.trackEvents.byStart.length is 3 - before play" );
 
-
-
-
-  p.listen("timeupdate", function () {
-
-    if ( p.roundTime() > 40 && p.roundTime() < 42 && !hasrun ) {
-    }
+  p.listen("timeupdate", function() {
 
     if ( p.roundTime() > 40 && p.roundTime() < 42 && hasrun && !lastrun ) {
 
       lastrun = true;
 
-      equals( document.getElementById('index-test'), null, "document.getElementById('index-test') is null on second run - after removeTrackEvent" );
+      equals( document.getElementById("index-test"), null, "document.getElementById('index-test') is null on second run - after removeTrackEvent" );
 
       start();
     }
@@ -2859,31 +2835,21 @@ test("Index Integrity (frameAnimation)", function () {
       equals(p.data.trackEvents.startIndex, 2, "p.data.trackEvents.startIndex is 2 - after play, before removeTrackEvent");
       equals(p.data.trackEvents.endIndex, 2, "p.data.trackEvents.endIndex is 2 - after play, before removeTrackEvent");
 
-
-
       p.removeTrackEvent("removeable-track-event");
 
       equals(p.data.trackEvents.byStart.length, 2, "p.data.trackEvents.byStart.length is 2 - after removeTrackEvent" );
       equals(p.data.trackEvents.startIndex, 1, "p.data.trackEvents.startIndex is 1 - after removeTrackEvent");
       equals(p.data.trackEvents.endIndex, 1, "p.data.trackEvents.endIndex is 1 - after removeTrackEvent");
 
-
-
       p.currentTime(40).play();
-
-
-
     }
   });
 
   p.play();
-
-
 });
 
 test("Popcorn.disable/enable/toggle (timeupdate)", function() {
 
-
   var $pop = Popcorn( "#video" ),
       count = 0,
       expects = 5;
@@ -2895,20 +2861,20 @@ test("Popcorn.disable/enable/toggle (timeupdate)", function() {
       start();
 
       Popcorn.removeInstance( $pop );
-                       Popcorn.removePlugin( "toggler" );
+      Popcorn.removePlugin( "toggler" );
     }
   }
 
-  Popcorn.plugin("toggler", function () {
+  Popcorn.plugin("toggler", function() {
     return {
-      start: function () {
+      start: function() {
         var div = document.createElement("div");
         div.id = "toggler-test";
         div.innerHTML = "foo";
 
         document.body.appendChild(div);
       },
-      end: function () {
+      end: function() {
         document.getElementById("toggler-test").parentNode.removeChild(document.getElementById("toggler-test"));
       }
     };
@@ -2957,7 +2923,7 @@ test("Popcorn.disable/enable/toggle (timeupdate)", function() {
 });
 
 module("Popcorn XHR");
-test("Basic", function () {
+test("Basic", function() {
 
   expect(2);
 
@@ -2967,7 +2933,7 @@ test("Basic", function () {
 
 });
 
-test("Text Response", function () {
+test("Text Response", function() {
 
   var expects = 2,
       count = 0;
@@ -2996,7 +2962,7 @@ test("Text Response", function () {
   });
 });
 
-test("dataType: Text Response", function () {
+test("dataType: Text Response", function() {
 
   var expects = 2,
       count = 0;
@@ -3027,7 +2993,7 @@ test("dataType: Text Response", function () {
 });
 
 
-test("JSON Response", function () {
+test("JSON Response", function() {
 
   var expects = 2,
       count = 0;
@@ -3061,7 +3027,7 @@ test("JSON Response", function () {
 
 });
 
-test("dataType: JSON Response", function () {
+test("dataType: JSON Response", function() {
 
   var expects = 2,
       count = 0;
@@ -3099,7 +3065,7 @@ test("dataType: JSON Response", function () {
 
 if ( !/file/.test( location.protocol ) ) {
 
-  test("JSONP Response", function () {
+  test("JSONP Response", function() {
 
     var expects = 8,
         count = 0;
@@ -3184,7 +3150,7 @@ if ( !/file/.test( location.protocol ) ) {
   });
 
 } else {
-  test("JSONP Response", function () {
+  test("JSONP Response", function() {
 
     expect(1);
 
@@ -3195,7 +3161,7 @@ if ( !/file/.test( location.protocol ) ) {
   });
 }
 
-test("Popcorn.getScript()", function () {
+test("Popcorn.getScript()", function() {
 
   var expects = 8,
       count = 0;
@@ -3296,7 +3262,7 @@ test("Popcorn.getScript()", function () {
 });
 
 
-test("XML Response", function () {
+test("XML Response", function() {
 
   var expects = 2,
       count = 0;
@@ -3331,7 +3297,7 @@ test("XML Response", function () {
 
 });
 
-test("dataType: XML Response", function () {
+test("dataType: XML Response", function() {
 
   var expects = 2,
       count = 0;
@@ -3371,7 +3337,7 @@ test("dataType: XML Response", function () {
 
 module("Popcorn Parser");
 
-test("Parsing Functions", function () {
+test("Parsing Functions", function() {
 
   var expects = 3,
       count = 0,
@@ -3402,7 +3368,7 @@ test("Parsing Functions", function () {
 
 });
 
-test("Parsing Integrity", function () {
+test("Parsing Integrity", function() {
 
   var expects = 6,
       count = 0,
@@ -3435,11 +3401,11 @@ test("Parsing Integrity", function () {
 
   Popcorn.plugin("parserTest", {
 
-    start: function () {
+    start: function() {
       ok(true, "parserTest started");
       plus();
     },
-    end: function () {
+    end: function() {
       ok(true, "parserTest ended");
       plus();
     }
@@ -3456,7 +3422,7 @@ test("Parsing Integrity", function () {
 });
 
 
-test("Parsing Handler - References unavailable plugin", function () {
+test("Parsing Handler - References unavailable plugin", function() {
 
   var expects = 1,
       count = 0,
@@ -3496,7 +3462,7 @@ test("Parsing Handler - References unavailable plugin", function () {
 });
 
 module("Audio");
-test( "Basic Audio Support (timeupdate)", function () {
+test( "Basic Audio Support (timeupdate)", function() {
 
   var popped = Popcorn( "#audio" ),
       popObj = Popcorn( document.getElementById( "audio" ) ),
@@ -3534,7 +3500,7 @@ test( "Basic Audio Support (timeupdate)", function () {
 
   popped.play();
 
-  methods.split( /\s+/g ).forEach(function ( k,v ) {
+  methods.split( /\s+/g ).forEach(function( k,v ) {
 
     ok( k in popped, "instance by id has method: " + k );
     plus();
@@ -3558,14 +3524,14 @@ test( "Basic Audio Support (timeupdate)", function () {
 
   popObj.play();
 
-  methods.split( /\s+/g ).forEach(function ( k,v ) {
+  methods.split( /\s+/g ).forEach(function( k,v ) {
 
     ok( k in popObj, "instance by reference has method: " + k );
     plus();
   });
 });
 
-test( "Basic Audio Support (frameAnimation)", function () {
+test( "Basic Audio Support (frameAnimation)", function() {
 
   var popped = Popcorn( "#audio", { frameAnimation: true }),
       popObj = Popcorn( document.getElementById( "audio" ), { frameAnimation: true }),
@@ -3603,7 +3569,7 @@ test( "Basic Audio Support (frameAnimation)", function () {
 
   popped.play();
 
-  methods.split( /\s+/g ).forEach(function ( k,v ) {
+  methods.split( /\s+/g ).forEach(function( k,v ) {
 
     ok( k in popped, "instance by id has method: " + k );
     plus();
@@ -3627,14 +3593,14 @@ test( "Basic Audio Support (frameAnimation)", function () {
 
   popObj.play();
 
-  methods.split( /\s+/g ).forEach(function ( k,v ) {
+  methods.split( /\s+/g ).forEach(function( k,v ) {
 
     ok( k in popObj, "instance by reference has method: " + k );
     plus();
   });
 });
 
-test("Parser Support", function () {
+test("Parser Support", function() {
 
   var expects = 3,
       count = 0,
@@ -3681,7 +3647,7 @@ test("Parser Support", function () {
 
 
 module("Popcorn Test Runner End");
-test("Last Check", function () {
+test("Last Check", function() {
 
   //   ALWAYS RUN LAST
   try {