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") if (testid == "mouse on html label with content inside")
expectedEvents += " commandupdate: cu"; expectedEvents += " commandupdate: cu";
if (expectedElement && expectedElement.id != "t" + kChildDocumentRootIndex && if (expectedElement &&
(!gNewExpectedWindow || gNewExpectedWindow.document.documentElement != expectedElement)) { (!gNewExpectedWindow || gNewExpectedWindow.document.documentElement != expectedElement)) {
if (expectedEvents) if (!gNewExpectedWindow) {
expectedEvents += " "; if (expectedEvents)
if (!gNewExpectedWindow) expectedEvents += " ";
expectedEvents += "commandupdate: cu "; expectedEvents += "commandupdate: cu";
expectedEvents += "focus: " + expectedElement.id; }
if (expectedElement.id != "t" + kChildDocumentRootIndex) {
if (expectedEvents)
expectedEvents += " ";
expectedEvents += "focus: " + expectedElement.id;
}
} }
else if (expectedWindow && gLastFocusWindow != expectedWindow && else if (expectedWindow && gLastFocusWindow != expectedWindow &&
!expectedElement) { !expectedElement) {