gecko-dev/browser/base/content/test/general/browser_bug624734.js
Gijs Kruitbosch ad93de7f1e Merge m-c to UX
--HG--
rename : browser/base/content/test/Makefile.in => browser/base/content/test/general/Makefile.in
rename : browser/base/content/test/browser_bug462289.js => browser/base/content/test/general/browser_bug462289.js
rename : browser/base/content/test/browser_bug624734.js => browser/base/content/test/general/browser_bug624734.js
rename : browser/base/content/test/head.js => browser/base/content/test/general/head.js
2013-09-19 17:15:24 +02:00

31 lines
982 B
JavaScript

/* Any copyright is dedicated to the Public Domain.
* http://creativecommons.org/publicdomain/zero/1.0/
*/
// Bug 624734 - Star UI has no tooltip until bookmarked page is visited
function finishTest() {
is(BookmarkingUI.button.getAttribute("buttontooltiptext"),
BookmarkingUI._unstarredTooltip,
"Star icon should have the unstarred tooltip text");
gBrowser.removeCurrentTab();
finish();
}
function test() {
waitForExplicitFinish();
let tab = gBrowser.selectedTab = gBrowser.addTab();
tab.linkedBrowser.addEventListener("load", (function(event) {
tab.linkedBrowser.removeEventListener("load", arguments.callee, true);
if (BookmarkingUI._pendingStmt) {
waitForCondition(function() !BookmarkingUI._pendingStmt, finishTest, "BookmarkingUI held pending statement for too long");
} else {
finishTest();
}
}), true);
tab.linkedBrowser.loadURI("http://example.com/browser/browser/base/content/test/general/dummy_page.html");
}