This commit is contained in:
Scott Downe 2012-05-08 16:25:28 -04:00
Родитель 08c2e95bce
Коммит 35cdabaa36
2 изменённых файлов: 18 добавлений и 2 удалений

Просмотреть файл

@ -561,13 +561,14 @@ asyncTest( "Popcorn Youtube Plugin offsetHeight && offsetWidth Test", function()
asyncTest( "Player Errors", function() {
expect( 1 );
expect( 2 );
var pop = Popcorn.youtube( "#video4", "http://www.youtube.com/watch?v=abcdefghijk", {
events: {
error: function() {
ok( true, "error trigger by invalid URL" );
equal( pop.error.customCode, 100, "error.customCode is 100 for invalid URL" );
pop.destroy();
start();
}

Просмотреть файл

@ -20,6 +20,21 @@ test( "Core", function() {
} catch ( e ) {};
});
asyncTest( "Unsupported video error", function() {
var unsupported = document.createElement( "video" ),
popcorn = Popcorn( unsupported );
popcorn.on( "error", function() {
equal( popcorn.error.code, 4, "Unsupported video reports error code 4." );
popcorn.destroy();
start();
});
unsupported.src = "data:video/x-unsupported,0";
});
test( "noConflict", function() {
expect( 6 );
@ -1124,7 +1139,7 @@ test( "Popcorn.extend", function() {
test( "Popcorn.events", function() {
QUnit.reset()
expect( 43 );
expect( 44 );
var eventTypes = [ "UIEvents", "MouseEvents", "Events" ],
natives = "",