b544277 patch for window_focus.xul

This commit is contained in:
Neil Deakin 2010-04-21 22:14:35 +09:00
parent 53ce892306
commit d57ebf49ba

View File

@ -154,13 +154,18 @@ function expectFocusShift(callback, expectedWindow, expectedElement, focusChange
if (testid == "mouse on html label with content inside")
expectedEvents += " commandupdate: cu";
if (expectedElement && expectedElement.id != "t" + kChildDocumentRootIndex &&
if (expectedElement &&
(!gNewExpectedWindow || gNewExpectedWindow.document.documentElement != expectedElement)) {
if (expectedEvents)
expectedEvents += " ";
if (!gNewExpectedWindow)
expectedEvents += "commandupdate: cu ";
expectedEvents += "focus: " + expectedElement.id;
if (!gNewExpectedWindow) {
if (expectedEvents)
expectedEvents += " ";
expectedEvents += "commandupdate: cu";
}
if (expectedElement.id != "t" + kChildDocumentRootIndex) {
if (expectedEvents)
expectedEvents += " ";
expectedEvents += "focus: " + expectedElement.id;
}
}
else if (expectedWindow && gLastFocusWindow != expectedWindow &&
!expectedElement) {