From a24406dc4e31fcf41ae418e9a4c0d919580fe80e Mon Sep 17 00:00:00 2001 From: Henri Sivonen Date: Thu, 29 Apr 2010 14:22:27 +0300 Subject: [PATCH] Bug 562319 - Make NavigationUtils.js try harder when detecting if a frame is done loading. r=bzbarsky. --- docshell/test/navigation/NavigationUtils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docshell/test/navigation/NavigationUtils.js b/docshell/test/navigation/NavigationUtils.js index 742fe112b9dd..4deeb85fa11e 100644 --- a/docshell/test/navigation/NavigationUtils.js +++ b/docshell/test/navigation/NavigationUtils.js @@ -208,7 +208,11 @@ function xpcWaitForFinishedFrames(callback, numFrames) { } function searchForFinishedFrames(win) { - if (escape(unescape(win.location)) == escape(target_url)) { + if (escape(unescape(win.location)) == escape(target_url) && + win.document && + win.document.body && + win.document.body.textContent == body && + win.document.readyState == "complete") { if (!contains(win, finishedWindows)) { finishedWindows.push(win); frameFinished();