Skip to content

Commit

Permalink
[#823] Tests now pass on all browsers again, did a small rewrite of t…
Browse files Browse the repository at this point in the history
…he tests to clean them up a bit
  • Loading branch information
dseif committed Mar 2, 2012
1 parent 0d8804c commit 9d713b3
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions plugins/image/popcorn.image.unit.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,45 +28,37 @@ test( "Popcorn Image Plugin", function() {
plus();

popped.image({
// seconds
start: 1,
// seconds
end: 3,
href: "http://www.drumbeat.org/",
src: sources[ 0 ],
text: "DRUMBEAT",
target: "imagediv"
})
.image({
// seconds
start: 4,
// seconds
end: 6,
// no href
src: sources[ 1 ],
target: "imagediv"
})
.image({
// seconds
start: 5,
// seconds
end: 6,
// no href
src: sources[ 2 ],
target: "imagediv"
});

setupId = popped.getLastTrackEventId();

popped.exec( 2, function() {
ok( /display: block;/.test( imagediv.innerHTML ), "Div contents are displayed" );
equals( imagediv.children[ 0 ].style.display, "block", "Div contents are displayed" );
plus();
ok( /img/.test( imagediv.innerHTML ), "An image exists" );
equals( imagediv.children[ 0 ].children[ 1 ].nodeName, "IMG", "An image exists" );
plus();
});

popped.exec( 3, function() {
ok( /display: none;/.test( imagediv.innerHTML ), "Div contents are hidden again" );
equals( imagediv.children[ 0 ].style.display, "none", "Div contents are hidden again" );
plus();
});

Expand Down

0 comments on commit 9d713b3

Please sign in to comment.