|
1 /* Any copyright is dedicated to the Public Domain. |
|
2 * http://creativecommons.org/publicdomain/zero/1.0/ |
|
3 */ |
|
4 |
|
5 // Bug 624734 - Star UI has no tooltip until bookmarked page is visited |
|
6 |
|
7 function finishTest() { |
|
8 is(BookmarkingUI.button.getAttribute("buttontooltiptext"), |
|
9 BookmarkingUI._unstarredTooltip, |
|
10 "Star icon should have the unstarred tooltip text"); |
|
11 |
|
12 gBrowser.removeCurrentTab(); |
|
13 finish(); |
|
14 } |
|
15 |
|
16 function test() { |
|
17 waitForExplicitFinish(); |
|
18 |
|
19 let tab = gBrowser.selectedTab = gBrowser.addTab(); |
|
20 tab.linkedBrowser.addEventListener("load", (function(event) { |
|
21 tab.linkedBrowser.removeEventListener("load", arguments.callee, true); |
|
22 |
|
23 if (BookmarkingUI.status == BookmarkingUI.STATUS_UPDATING) { |
|
24 waitForCondition(function() BookmarkingUI.status != BookmarkingUI.STATUS_UPDATING, finishTest, "BookmarkingUI was updating for too long"); |
|
25 } else { |
|
26 finishTest(); |
|
27 } |
|
28 }), true); |
|
29 |
|
30 tab.linkedBrowser.loadURI("http://example.com/browser/browser/base/content/test/general/dummy_page.html"); |
|
31 } |