From 5ea17346559c55a666e095a130559f7787311714 Mon Sep 17 00:00:00 2001 From: Christopher De Cairos Date: Thu, 16 Jun 2011 17:54:54 -0400 Subject: [PATCH] fixed tests --- plugins/processing/popcorn.processing.unit.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/processing/popcorn.processing.unit.js b/plugins/processing/popcorn.processing.unit.js index 83e63d7..2fc4813 100644 --- a/plugins/processing/popcorn.processing.unit.js +++ b/plugins/processing/popcorn.processing.unit.js @@ -71,20 +71,26 @@ test( "Processing plugin tests", function() { }); //check that three canvases were created - canvases = document.getElementsByTagName( "canvas" ); + canvases = document.querySelectorAll( "canvas" ); equals( canvases.length, 3, "Three canvases are present" ); plus(); + + var called = 0; - Popcorn.forEach( canvases, function( ctx ) { + //enable this when ticket #583 lands + //Popcorn.forEach( canvases, function( ctx, idx ) { + [].forEach.call( canvases, function( ctx ) { + var idCount = 0, i = -1, len = canvases.length; for ( ; ++i < len; ){ if ( ctx.id === canvases[ i ].id ) { idCount++; } } + equals( idCount, 1, ctx.id + " is a unique canvas id" ); plus(); - + equals( ctx.style.display, "none", ctx.id + " is hidden initially" ); plus(); }); -- 2.43.0