From c21f7d00a55ef6d011d8a6ac609e444eb30fffd2 Mon Sep 17 00:00:00 2001 From: "Glen E. Ivey" Date: Tue, 27 Apr 2010 09:37:18 -0700 Subject: [PATCH] Finished porting tests from specs/obsolete-tests/unit/iframe.js. --- specs/scope/spec.js | 89 +++++++++++++++++++++++++++++++++++++++------ 1 file changed, 78 insertions(+), 11 deletions(-) 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