Permalink
Browse files

fixed minor regression causing duplicate ids for slide indicators, ad…

…ded related test
  • Loading branch information...
1 parent 7c46713 commit f9a8eaabe7dba9c8f98bbae65216de94551d67eb @jeremyBanks jeremyBanks committed Jun 4, 2012
Showing with 17 additions and 0 deletions.
  1. +1 −0 js/setup.js
  2. +16 −0 test/index.html
View
@@ -743,6 +743,7 @@ addEventListener( "DOMContentLoaded", function() {
}
teDiv.id = "popcorn-slideshow-div-" + count;
}
+ count++;
teDiv.innerHTML = "<p><b></b></p>";
teDiv.className = "popcorn-slideshow";
View
@@ -190,6 +190,22 @@
frame.jQuery(frame.document).trigger(e);
}
} );
+
+ atest( "Slide indicators exist", function( toCleanUp ) {
+ var frame = getFramedWindow( "../index.html", toCleanUp );
+
+ return function poll() {
+ return ( frame._slideDriveReady ) ? onReady : poll;
+ }
+
+ function onReady() {
+ atest("div-1 exists and has nonzero width",
+ parseFloat(frame.document.getElementById("popcorn-slideshow-div-1").style.width) > 0);
+ atest("div-14 exists and has nonzero width",
+ parseFloat(frame.document.getElementById("popcorn-slideshow-div-14").style.width) > 0);
+
+ }
+ });
} );
atest( "./template.html", 120, function( toCleanUp ) {

0 comments on commit f9a8eaa

Please sign in to comment.