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