зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1389285 - check that clicking history items actually works, r=mikedeboer
MozReview-Commit-ID: 2WKqYaO8Iht --HG-- extra : source : bff4d1e4243f2c1472d9339aa7060be4c819b637
This commit is contained in:
Родитель
82c9240971
Коммит
7c9b10befb
|
@ -11,6 +11,8 @@ add_task(async function() {
|
|||
let tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_PATH + "dummy_history_item.html");
|
||||
await BrowserTestUtils.removeTab(tab);
|
||||
|
||||
tab = await BrowserTestUtils.openNewForegroundTab(gBrowser, TEST_PATH); // will 404, but we don't care.
|
||||
|
||||
CustomizableUI.addWidgetToArea("history-panelmenu", CustomizableUI.AREA_FIXED_OVERFLOW_PANEL);
|
||||
registerCleanupFunction(() => CustomizableUI.reset());
|
||||
|
||||
|
@ -25,12 +27,18 @@ add_task(async function() {
|
|||
historyButton.click();
|
||||
await promise;
|
||||
ok(historyPanel.getAttribute("current"), "History Panel is in view");
|
||||
let historyItems = document.getElementById("appMenu_historyMenu");
|
||||
ok(historyItems.querySelector("toolbarbutton.bookmark-item[label='Happy History Hero']"),
|
||||
"Should have a history item for the history we just made.");
|
||||
|
||||
let browserLoaded = BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||
let panelHiddenPromise = promiseOverflowHidden(window);
|
||||
document.getElementById("widget-overflow").hidePopup();
|
||||
|
||||
let historyItems = document.getElementById("appMenu_historyMenu");
|
||||
let historyItemForURL = historyItems.querySelector("toolbarbutton.bookmark-item[label='Happy History Hero']");
|
||||
ok(historyItemForURL, "Should have a history item for the history we just made.");
|
||||
historyItemForURL.click();
|
||||
await browserLoaded;
|
||||
is(gBrowser.currentURI.spec, TEST_PATH + "dummy_history_item.html", "Should have expected page load");
|
||||
|
||||
await panelHiddenPromise
|
||||
await BrowserTestUtils.removeTab(tab);
|
||||
info("Menu panel was closed");
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче