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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* Any copyright is dedicated to the Public Domain.
     2  * http://creativecommons.org/publicdomain/zero/1.0/
     3  */
     5 // Bug 624734 - Star UI has no tooltip until bookmarked page is visited
     7 function finishTest() {
     8   is(BookmarkingUI.button.getAttribute("buttontooltiptext"),
     9      BookmarkingUI._unstarredTooltip,
    10      "Star icon should have the unstarred tooltip text");
    12   gBrowser.removeCurrentTab();
    13   finish();
    14 }
    16 function test() {
    17   waitForExplicitFinish();
    19   let tab = gBrowser.selectedTab = gBrowser.addTab();
    20   tab.linkedBrowser.addEventListener("load", (function(event) {
    21     tab.linkedBrowser.removeEventListener("load", arguments.callee, true);
    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);
    30   tab.linkedBrowser.loadURI("http://example.com/browser/browser/base/content/test/general/dummy_page.html");
    31 }

mercurial