michael@0: function test() { michael@0: waitForExplicitFinish(); michael@0: gBrowser.selectedTab = gBrowser.addTab(); michael@0: gBrowser.selectedBrowser.addEventListener("load", function () { michael@0: gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true); michael@0: michael@0: let doc = gBrowser.contentDocument; michael@0: let tooltip = document.getElementById("aHTMLTooltip"); michael@0: let i = doc.getElementById("i"); michael@0: michael@0: ok(!tooltip.fillInPageTooltip(i), michael@0: "No tooltip should be shown when @title is null"); michael@0: michael@0: i.title = "foo"; michael@0: ok(tooltip.fillInPageTooltip(i), michael@0: "A tooltip should be shown when @title is not the empty string"); michael@0: michael@0: i.pattern = "bar"; michael@0: ok(tooltip.fillInPageTooltip(i), michael@0: "A tooltip should be shown when @title is not the empty string"); michael@0: michael@0: gBrowser.removeCurrentTab(); michael@0: finish(); michael@0: }, true); michael@0: michael@0: content.location = michael@0: "data:text/html,
"; michael@0: } michael@0: