mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-08 12:37:37 +00:00
Bug 917271 - Fix race condition in browser_bug624734.js by checking for the completion of the async places call, r=dao
This commit is contained in:
parent
3f371ab30b
commit
be64c9b2ab
@ -4,6 +4,15 @@
|
||||
|
||||
// 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();
|
||||
|
||||
@ -11,12 +20,11 @@ function test() {
|
||||
tab.linkedBrowser.addEventListener("load", (function(event) {
|
||||
tab.linkedBrowser.removeEventListener("load", arguments.callee, true);
|
||||
|
||||
is(BookmarkingUI.button.getAttribute("buttontooltiptext"),
|
||||
BookmarkingUI._unstarredTooltip,
|
||||
"Star icon should have the unstarred tooltip text");
|
||||
|
||||
gBrowser.removeCurrentTab();
|
||||
finish();
|
||||
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/dummy_page.html");
|
||||
|
Loading…
Reference in New Issue
Block a user