browser/base/content/test/general/browser_bug624734.js

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/base/content/test/general/browser_bug624734.js	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,31 @@
     1.4 +/* Any copyright is dedicated to the Public Domain.
     1.5 + * http://creativecommons.org/publicdomain/zero/1.0/
     1.6 + */
     1.7 +
     1.8 +// Bug 624734 - Star UI has no tooltip until bookmarked page is visited
     1.9 +
    1.10 +function finishTest() {
    1.11 +  is(BookmarkingUI.button.getAttribute("buttontooltiptext"),
    1.12 +     BookmarkingUI._unstarredTooltip,
    1.13 +     "Star icon should have the unstarred tooltip text");
    1.14 +
    1.15 +  gBrowser.removeCurrentTab();
    1.16 +  finish();
    1.17 +}
    1.18 +
    1.19 +function test() {
    1.20 +  waitForExplicitFinish();
    1.21 +
    1.22 +  let tab = gBrowser.selectedTab = gBrowser.addTab();
    1.23 +  tab.linkedBrowser.addEventListener("load", (function(event) {
    1.24 +    tab.linkedBrowser.removeEventListener("load", arguments.callee, true);
    1.25 +
    1.26 +    if (BookmarkingUI.status == BookmarkingUI.STATUS_UPDATING) {
    1.27 +      waitForCondition(function() BookmarkingUI.status != BookmarkingUI.STATUS_UPDATING, finishTest, "BookmarkingUI was updating for too long");
    1.28 +    } else {
    1.29 +      finishTest();
    1.30 +    }
    1.31 +  }), true);
    1.32 +
    1.33 +  tab.linkedBrowser.loadURI("http://example.com/browser/browser/base/content/test/general/dummy_page.html");
    1.34 +}

mercurial