Bug 783589 - Fix for intermittent test_popup-navigates-children.html, test_sibling-matching-parent.html failure, r=justin.lebar

This commit is contained in:
Honza Bambas 2013-08-30 11:41:10 +02:00
parent c3e6d00ad8
commit b92a44eb9e

View File

@ -184,8 +184,12 @@ function xpcWaitForFinishedFrames(callback, numFrames) {
(win.document.body.textContent == body ||
win.document.body.textContent == popup_body) &&
win.document.readyState == "complete") {
if (!contains(win, finishedWindows)) {
finishedWindows.push(win);
var util = win.QueryInterface(SpecialPowers.Ci.nsIInterfaceRequestor)
.getInterface(SpecialPowers.Ci.nsIDOMWindowUtils);
var windowId = util.outerWindowID;
if (!contains(windowId, finishedWindows)) {
finishedWindows.push(windowId);
frameFinished();
}
}