Bug 993712 - get more information from timeout-ing test, rs=firebot, test-only

--HG--
extra : rebase_source : 563c13548e1347a5df710e7833bd761515cfcdfa
This commit is contained in:
Gijs Kruitbosch 2014-05-20 16:55:13 +01:00
Родитель 2d7aa94c81
Коммит c50823ec7c
1 изменённых файлов: 11 добавлений и 0 удалений

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

@ -41,6 +41,7 @@ function checkPlacesContextMenu(aItemWithContextMenu) {
return Task.spawn(function* () {
let contextMenu = document.getElementById("placesContext");
let newBookmarkItem = document.getElementById("placesContext_new:bookmark");
info("Waiting for context menu on " + aItemWithContextMenu.id);
let shownPromise = popupShown(contextMenu);
EventUtils.synthesizeMouseAtCenter(aItemWithContextMenu,
{type: "contextmenu", button: 2});
@ -49,6 +50,7 @@ function checkPlacesContextMenu(aItemWithContextMenu) {
ok(!newBookmarkItem.hasAttribute("disabled"),
"New bookmark item shouldn't be disabled");
info("Closing context menu");
yield closePopup(contextMenu);
});
}
@ -81,14 +83,17 @@ function checkSpecialContextMenus() {
for (let menuID in kSpecialItemIDs) {
let menuItem = document.getElementById(menuID);
let menuPopup = document.getElementById(kSpecialItemIDs[menuID]);
info("Waiting to open menu for " + menuID);
let shownPromise = popupShown(menuPopup);
EventUtils.synthesizeMouseAtCenter(menuItem, {});
yield shownPromise;
yield checkPlacesContextMenu(menuPopup);
info("Closing menu for " + menuID);
yield closePopup(menuPopup);
}
info("Closing bookmarks menu");
yield closePopup(bookmarksMenuPopup);
});
}
@ -116,6 +121,7 @@ function checkBookmarksItemsChevronContextMenu() {
let shownPromise = popupShown(chevronPopup);
let chevron = document.getElementById("PlacesChevron");
EventUtils.synthesizeMouseAtCenter(chevron, {});
info("Waiting for bookmark toolbar item chevron popup to show");
yield shownPromise;
yield waitForCondition(() => {
for (let child of chevronPopup.children) {
@ -124,6 +130,7 @@ function checkBookmarksItemsChevronContextMenu() {
}
});
yield checkPlacesContextMenu(chevronPopup);
info("Waiting for bookmark toolbar item chevron popup to close");
yield closePopup(chevronPopup);
});
}
@ -134,6 +141,7 @@ function checkBookmarksItemsChevronContextMenu() {
* overflowable nav-bar is showing its chevron.
*/
function overflowEverything() {
info("Waiting for overflow");
window.resizeTo(kSmallWidth, window.outerHeight);
return waitForCondition(() => gNavBar.hasAttribute("overflowing"));
}
@ -144,6 +152,7 @@ function overflowEverything() {
* overflowing.
*/
function stopOverflowing() {
info("Waiting until we stop overflowing");
window.resizeTo(kOriginalWindowWidth, window.outerHeight);
return waitForCondition(() => !gNavBar.hasAttribute("overflowing"));
}
@ -202,6 +211,7 @@ add_task(function* testOverflowingBookmarksButtonContextMenu() {
* to the menu from the overflow panel, and then back to the toolbar.
*/
add_task(function* testOverflowingBookmarksItemsContextMenu() {
info("Ensuring panel is ready.");
yield PanelUI.ensureReady();
let bookmarksToolbarItems = document.getElementById(kBookmarksItems);
@ -235,6 +245,7 @@ add_task(function* testOverflowingBookmarksItemsChevronContextMenu() {
let placesToolbarItems = document.getElementById("PlacesToolbarItems");
let placesChevron = document.getElementById("PlacesChevron");
placesToolbarItems.style.maxWidth = "10px";
info("Waiting for chevron to no longer be collapsed");
yield waitForCondition(() => !placesChevron.collapsed);
yield checkBookmarksItemsChevronContextMenu();