зеркало из https://github.com/mozilla/gecko-dev.git
Bug 993712 - get more information from timeout-ing test, rs=firebot, test-only
--HG-- extra : rebase_source : 563c13548e1347a5df710e7833bd761515cfcdfa
This commit is contained in:
Родитель
2d7aa94c81
Коммит
c50823ec7c
|
@ -41,6 +41,7 @@ function checkPlacesContextMenu(aItemWithContextMenu) {
|
||||||
return Task.spawn(function* () {
|
return Task.spawn(function* () {
|
||||||
let contextMenu = document.getElementById("placesContext");
|
let contextMenu = document.getElementById("placesContext");
|
||||||
let newBookmarkItem = document.getElementById("placesContext_new:bookmark");
|
let newBookmarkItem = document.getElementById("placesContext_new:bookmark");
|
||||||
|
info("Waiting for context menu on " + aItemWithContextMenu.id);
|
||||||
let shownPromise = popupShown(contextMenu);
|
let shownPromise = popupShown(contextMenu);
|
||||||
EventUtils.synthesizeMouseAtCenter(aItemWithContextMenu,
|
EventUtils.synthesizeMouseAtCenter(aItemWithContextMenu,
|
||||||
{type: "contextmenu", button: 2});
|
{type: "contextmenu", button: 2});
|
||||||
|
@ -49,6 +50,7 @@ function checkPlacesContextMenu(aItemWithContextMenu) {
|
||||||
ok(!newBookmarkItem.hasAttribute("disabled"),
|
ok(!newBookmarkItem.hasAttribute("disabled"),
|
||||||
"New bookmark item shouldn't be disabled");
|
"New bookmark item shouldn't be disabled");
|
||||||
|
|
||||||
|
info("Closing context menu");
|
||||||
yield closePopup(contextMenu);
|
yield closePopup(contextMenu);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -81,14 +83,17 @@ function checkSpecialContextMenus() {
|
||||||
for (let menuID in kSpecialItemIDs) {
|
for (let menuID in kSpecialItemIDs) {
|
||||||
let menuItem = document.getElementById(menuID);
|
let menuItem = document.getElementById(menuID);
|
||||||
let menuPopup = document.getElementById(kSpecialItemIDs[menuID]);
|
let menuPopup = document.getElementById(kSpecialItemIDs[menuID]);
|
||||||
|
info("Waiting to open menu for " + menuID);
|
||||||
let shownPromise = popupShown(menuPopup);
|
let shownPromise = popupShown(menuPopup);
|
||||||
EventUtils.synthesizeMouseAtCenter(menuItem, {});
|
EventUtils.synthesizeMouseAtCenter(menuItem, {});
|
||||||
yield shownPromise;
|
yield shownPromise;
|
||||||
|
|
||||||
yield checkPlacesContextMenu(menuPopup);
|
yield checkPlacesContextMenu(menuPopup);
|
||||||
|
info("Closing menu for " + menuID);
|
||||||
yield closePopup(menuPopup);
|
yield closePopup(menuPopup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info("Closing bookmarks menu");
|
||||||
yield closePopup(bookmarksMenuPopup);
|
yield closePopup(bookmarksMenuPopup);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -116,6 +121,7 @@ function checkBookmarksItemsChevronContextMenu() {
|
||||||
let shownPromise = popupShown(chevronPopup);
|
let shownPromise = popupShown(chevronPopup);
|
||||||
let chevron = document.getElementById("PlacesChevron");
|
let chevron = document.getElementById("PlacesChevron");
|
||||||
EventUtils.synthesizeMouseAtCenter(chevron, {});
|
EventUtils.synthesizeMouseAtCenter(chevron, {});
|
||||||
|
info("Waiting for bookmark toolbar item chevron popup to show");
|
||||||
yield shownPromise;
|
yield shownPromise;
|
||||||
yield waitForCondition(() => {
|
yield waitForCondition(() => {
|
||||||
for (let child of chevronPopup.children) {
|
for (let child of chevronPopup.children) {
|
||||||
|
@ -124,6 +130,7 @@ function checkBookmarksItemsChevronContextMenu() {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
yield checkPlacesContextMenu(chevronPopup);
|
yield checkPlacesContextMenu(chevronPopup);
|
||||||
|
info("Waiting for bookmark toolbar item chevron popup to close");
|
||||||
yield closePopup(chevronPopup);
|
yield closePopup(chevronPopup);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -134,6 +141,7 @@ function checkBookmarksItemsChevronContextMenu() {
|
||||||
* overflowable nav-bar is showing its chevron.
|
* overflowable nav-bar is showing its chevron.
|
||||||
*/
|
*/
|
||||||
function overflowEverything() {
|
function overflowEverything() {
|
||||||
|
info("Waiting for overflow");
|
||||||
window.resizeTo(kSmallWidth, window.outerHeight);
|
window.resizeTo(kSmallWidth, window.outerHeight);
|
||||||
return waitForCondition(() => gNavBar.hasAttribute("overflowing"));
|
return waitForCondition(() => gNavBar.hasAttribute("overflowing"));
|
||||||
}
|
}
|
||||||
|
@ -144,6 +152,7 @@ function overflowEverything() {
|
||||||
* overflowing.
|
* overflowing.
|
||||||
*/
|
*/
|
||||||
function stopOverflowing() {
|
function stopOverflowing() {
|
||||||
|
info("Waiting until we stop overflowing");
|
||||||
window.resizeTo(kOriginalWindowWidth, window.outerHeight);
|
window.resizeTo(kOriginalWindowWidth, window.outerHeight);
|
||||||
return waitForCondition(() => !gNavBar.hasAttribute("overflowing"));
|
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.
|
* to the menu from the overflow panel, and then back to the toolbar.
|
||||||
*/
|
*/
|
||||||
add_task(function* testOverflowingBookmarksItemsContextMenu() {
|
add_task(function* testOverflowingBookmarksItemsContextMenu() {
|
||||||
|
info("Ensuring panel is ready.");
|
||||||
yield PanelUI.ensureReady();
|
yield PanelUI.ensureReady();
|
||||||
|
|
||||||
let bookmarksToolbarItems = document.getElementById(kBookmarksItems);
|
let bookmarksToolbarItems = document.getElementById(kBookmarksItems);
|
||||||
|
@ -235,6 +245,7 @@ add_task(function* testOverflowingBookmarksItemsChevronContextMenu() {
|
||||||
let placesToolbarItems = document.getElementById("PlacesToolbarItems");
|
let placesToolbarItems = document.getElementById("PlacesToolbarItems");
|
||||||
let placesChevron = document.getElementById("PlacesChevron");
|
let placesChevron = document.getElementById("PlacesChevron");
|
||||||
placesToolbarItems.style.maxWidth = "10px";
|
placesToolbarItems.style.maxWidth = "10px";
|
||||||
|
info("Waiting for chevron to no longer be collapsed");
|
||||||
yield waitForCondition(() => !placesChevron.collapsed);
|
yield waitForCondition(() => !placesChevron.collapsed);
|
||||||
|
|
||||||
yield checkBookmarksItemsChevronContextMenu();
|
yield checkBookmarksItemsChevronContextMenu();
|
||||||
|
|
Загрузка…
Ссылка в новой задаче