diff --git a/specs/scope/spec.js b/specs/scope/spec.js index 2dd72846..30f55799 100644 --- a/specs/scope/spec.js +++ b/specs/scope/spec.js @@ -131,16 +131,26 @@ function ok_accessToIFrame1x(iframe, contentOf, message){ asyncTest("Iframe nesting", function(){ var startingDepth = 3; + // if you change 'endingDepth', you'll have to adjust the set of + // iframe#.html symbolic links in specs/fixtures/scope and will + // probably want to change the frame-height constant in + // recursivelyInsertIFrames() in the style="" attribute. var endingDepth = 7; - expect(4); -// + (10*((endingDepth - startingDepth)+1))); + expect( + // firstOnloadHandlerContainingTests + 4 + // secondOnloadHandlerContainingTests + + 2 + (6*((endingDepth - startingDepth)+1)) + ); + + window.top.numberNestedIframeLoads = 2; + window.top.windowLoadCount = 0; - window.numberNestedIframeLoads = 2; - window.windowLoadCount = 0; var topNestingIFrame = document.getElementById('nesting-iframe'); - topNestingIFrame.onload = function(){ + var secondOnloadHandlerContainingTests; + var firstOnloadHandlerContainingTests = function(){ // iframe1.html contains a static