Skip to content

Commit

Permalink
Added Popcorn.plyaer to the list of protected functions [#831]
Browse files Browse the repository at this point in the history
  • Loading branch information
Christopher De Cairos committed Jan 9, 2012
2 parents 231f580 + 3ab62c7 commit b2afb84
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
5 changes: 3 additions & 2 deletions popcorn.js
Expand Up @@ -6,9 +6,10 @@
isSupported: false
};

var methods = ( "forEach extend effects error guid sizeOf isArray nop position disable enable destroy " +
var methods = ( "removeInstance addInstance getInstanceById removeInstanceById " +
"forEach extend effects error guid sizeOf isArray nop position disable enable destroy" +
"addTrackEvent removeTrackEvent getTrackEvents getTrackEvent getLastTrackEventId " +
"timeUpdate plugin removePlugin compose effect parser xhr getJSONP getScript" ).split(/\s+/);
"timeUpdate plugin removePlugin compose effect parser xhr getJSONP getScript player" ).split(/\s+/);

while ( methods.length ) {
global.Popcorn[ methods.shift() ] = function() {};
Expand Down
15 changes: 7 additions & 8 deletions test/popcorn.unit.archaic.js
@@ -1,3 +1,8 @@
var methodsString = "removeInstance addInstance getInstanceById removeInstanceById " +
"forEach extend effects error guid sizeOf isArray nop position disable enable destroy" +
"addTrackEvent removeTrackEvent getTrackEvents getTrackEvent getLastTrackEventId " +
"timeUpdate plugin removePlugin compose effect parser xhr getJSONP getScript player";

module("Core");
test("Dummy", function () {

Expand All @@ -19,10 +24,7 @@ module("Static Methods");
(function() {

var method,
methods = ( "removeInstance addInstance getInstanceById removeInstanceById " +
"forEach extend effects error guid sizeOf isArray nop position disable enable " +
"addTrackEvent removeTrackEvent getTrackEvents getTrackEvent getLastTrackEventId " +
"timeUpdate plugin removePlugin compose effect parser xhr getJSONP getScript" ).split(/\s+/);
methods = methodsString.split( /\s+/ );

while( methods.length ) {

Expand All @@ -43,10 +45,7 @@ module("Attempt");
(function() {

var method,
methods = ( "removeInstance addInstance getInstanceById removeInstanceById " +
"forEach extend effects error guid sizeOf isArray nop position disable enable " +
"addTrackEvent removeTrackEvent getTrackEvents getTrackEvent getLastTrackEventId " +
"timeUpdate plugin removePlugin compose effect parser xhr getJSONP getScript" ).split(/\s+/);
methods = methodsString.split( /\s+/ );

while( methods.length ) {

Expand Down

0 comments on commit b2afb84

Please sign in to comment.