diff -r 000000000000 -r 6474c204b198 browser/base/content/test/general/browser_bug561623.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/browser/base/content/test/general/browser_bug561623.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,29 @@ +function test() { + waitForExplicitFinish(); + gBrowser.selectedTab = gBrowser.addTab(); + gBrowser.selectedBrowser.addEventListener("load", function () { + gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true); + + let doc = gBrowser.contentDocument; + let tooltip = document.getElementById("aHTMLTooltip"); + let i = doc.getElementById("i"); + + ok(!tooltip.fillInPageTooltip(i), + "No tooltip should be shown when @title is null"); + + i.title = "foo"; + ok(tooltip.fillInPageTooltip(i), + "A tooltip should be shown when @title is not the empty string"); + + i.pattern = "bar"; + ok(tooltip.fillInPageTooltip(i), + "A tooltip should be shown when @title is not the empty string"); + + gBrowser.removeCurrentTab(); + finish(); + }, true); + + content.location = + "data:text/html,
"; +} +