Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

[#1002] Made sure our registry updates when a manifest is specified as t... #25

Merged
merged 2 commits into from Apr 27, 2012

Conversation

Projects
None yet
4 participants
Member

dseif commented Apr 9, 2012

...he third arguement of the plugin constructor

[#1002] Made sure our registry updates when a manifest is specified a…
…s the third arguement of the plugin constructor

@rwaldron rwaldron and 1 other commented on an outdated diff Apr 9, 2012

test/popcorn.unit.js
+ end: function() {}
+ };
+ }, manifest );
+
+ var p = Popcorn( "#video" );
+ p.test({});
+ ok( Popcorn.manifest[ "test" ], "The test plugin exists in Popcorn.manifest" );
+ plus();
+ ok( Popcorn.registry[ 0 ].base[ "manifest" ], "A manifest exists in the registry for the test plugin" );
+ plus();
+ ok( Popcorn.registryByName[ "test" ].base[ "manifest" ], "Popcorn.registryByName contains the test plugins manifest" );
+ plus();
+ deepEqual( Popcorn.registry[ 0 ].base.manifest, manifest, "The specified that we defined equals the one in the registry" );
+ plus();
+});
+
@rwaldron

rwaldron Apr 9, 2012

Contributor

This test doesn't need to use the plus() mechanism, it's 100% synchronous.

@jbuck

jbuck Apr 25, 2012

Owner

yeah, you can just remove stop(), the plus() calls and the plus() function itself

@cadecairos cadecairos and 1 other commented on an outdated diff Apr 11, 2012

test/popcorn.unit.js
+
+ return {
+ start: function() {},
+ end: function() {}
+ };
+ }, manifest );
+
+ var p = Popcorn( "#video" );
+ p.test({});
+ ok( Popcorn.manifest[ "test" ], "The test plugin exists in Popcorn.manifest" );
+ plus();
+ ok( Popcorn.registry[ 0 ].base[ "manifest" ], "A manifest exists in the registry for the test plugin" );
+ plus();
+ ok( Popcorn.registryByName[ "test" ].base[ "manifest" ], "Popcorn.registryByName contains the test plugins manifest" );
+ plus();
+ deepEqual( Popcorn.registry[ 0 ].base.manifest, manifest, "The specified that we defined equals the one in the registry" );
@cadecairos

cadecairos Apr 11, 2012

Owner

The success message should be updated for clarity.

@dseif

dseif Apr 25, 2012

Member

Haha thanks, that's some pretty bad engrish right thur.

@jbuck jbuck commented on an outdated diff Apr 25, 2012

test/popcorn.unit.js
@@ -1690,6 +1690,46 @@ test( "Manifest removal", function() {
popcorn.destroy();
});
+test( "Manifest updates registry and registryByName", function() {
@jbuck

jbuck Apr 25, 2012

Owner

You can put 4 in as the second parameter, which will do the expects

Contributor

rwaldron commented Apr 27, 2012

SR+!

dseif added a commit that referenced this pull request Apr 27, 2012

Merge pull request #25 from dseif/t1002
[#1002] Add-on manifests defined with an anonymous object do not appear in Popcorn.registry

@dseif dseif merged commit f2a3b6a into mozilla:master Apr 27, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment