Bug 728633. (Av2) Add ensureElementIsVisible() calls, to support having more items. r=bmcbride.

This commit is contained in:
Serge Gautherie 2012-02-27 10:44:36 +01:00
Родитель 30a7711db3
Коммит 4087f00de2
1 изменённых файлов: 10 добавлений и 1 удалений

Просмотреть файл

@ -146,6 +146,7 @@ add_test(function() {
}, false);
info("Opening context menu on enabled extension item");
el.parentNode.ensureElementIsVisible(el);
EventUtils.synthesizeMouse(el, 4, 4, { }, gManagerWindow);
EventUtils.synthesizeMouse(el, 4, 4, { type: "contextmenu", button: 2 }, gManagerWindow);
});
@ -165,6 +166,7 @@ add_test(function() {
}, false);
info("Opening context menu on newly disabled extension item");
el.parentNode.ensureElementIsVisible(el);
EventUtils.synthesizeMouse(el, 4, 4, { }, gManagerWindow);
EventUtils.synthesizeMouse(el, 4, 4, { type: "contextmenu", button: 2 }, gManagerWindow);
});
@ -184,6 +186,7 @@ add_test(function() {
}, false);
info("Opening context menu on newly enabled extension item");
el.parentNode.ensureElementIsVisible(el);
EventUtils.synthesizeMouse(el, 4, 4, { }, gManagerWindow);
EventUtils.synthesizeMouse(el, 4, 4, { type: "contextmenu", button: 2 }, gManagerWindow);
});
@ -201,6 +204,7 @@ add_test(function() {
}, false);
info("Opening context menu on disabled extension item");
el.parentNode.ensureElementIsVisible(el);
EventUtils.synthesizeMouse(el, 4, 4, { }, gManagerWindow);
EventUtils.synthesizeMouse(el, 4, 4, { type: "contextmenu", button: 2 }, gManagerWindow);
});
@ -214,13 +218,14 @@ add_test(function() {
gContextMenu.addEventListener("popupshown", function() {
gContextMenu.removeEventListener("popupshown", arguments.callee, false);
check_contextmenu(true, true, false, false, false);
check_contextmenu(true, true, false, false, false);
gContextMenu.hidePopup();
run_next_test();
}, false);
info("Opening context menu on enabled theme item");
el.parentNode.ensureElementIsVisible(el);
EventUtils.synthesizeMouse(el, 4, 4, { }, gManagerWindow);
EventUtils.synthesizeMouse(el, 4, 4, { type: "contextmenu", button: 2 }, gManagerWindow);
});
@ -240,6 +245,7 @@ add_test(function() {
}, false);
info("Opening context menu on disabled theme item");
el.parentNode.ensureElementIsVisible(el);
EventUtils.synthesizeMouse(el, 4, 4, { }, gManagerWindow);
EventUtils.synthesizeMouse(el, 4, 4, { type: "contextmenu", button: 2 }, gManagerWindow);
});
@ -260,6 +266,7 @@ add_test(function() {
}, false);
info("Opening context menu on enabled LW theme item");
el.parentNode.ensureElementIsVisible(el);
EventUtils.synthesizeMouse(el, 4, 4, { }, gManagerWindow);
EventUtils.synthesizeMouse(el, 4, 4, { type: "contextmenu", button: 2 }, gManagerWindow);
});
@ -280,6 +287,7 @@ add_test(function() {
}, false);
info("Opening context menu on disabled LW theme item");
el.parentNode.ensureElementIsVisible(el);
EventUtils.synthesizeMouse(el, 4, 4, { }, gManagerWindow);
EventUtils.synthesizeMouse(el, 4, 4, { type: "contextmenu", button: 2 }, gManagerWindow);
});
@ -467,6 +475,7 @@ add_test(function() {
}, false);
info("Opening context menu on remote extension item");
el.parentNode.ensureElementIsVisible(el);
EventUtils.synthesizeMouse(el, 4, 4, { }, gManagerWindow);
EventUtils.synthesizeMouse(el, 4, 4, { type: "contextmenu", button: 2 }, gManagerWindow);