1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/browser/base/content/test/general/browser_bug561623.js Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,29 @@ 1.4 +function test() { 1.5 + waitForExplicitFinish(); 1.6 + gBrowser.selectedTab = gBrowser.addTab(); 1.7 + gBrowser.selectedBrowser.addEventListener("load", function () { 1.8 + gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true); 1.9 + 1.10 + let doc = gBrowser.contentDocument; 1.11 + let tooltip = document.getElementById("aHTMLTooltip"); 1.12 + let i = doc.getElementById("i"); 1.13 + 1.14 + ok(!tooltip.fillInPageTooltip(i), 1.15 + "No tooltip should be shown when @title is null"); 1.16 + 1.17 + i.title = "foo"; 1.18 + ok(tooltip.fillInPageTooltip(i), 1.19 + "A tooltip should be shown when @title is not the empty string"); 1.20 + 1.21 + i.pattern = "bar"; 1.22 + ok(tooltip.fillInPageTooltip(i), 1.23 + "A tooltip should be shown when @title is not the empty string"); 1.24 + 1.25 + gBrowser.removeCurrentTab(); 1.26 + finish(); 1.27 + }, true); 1.28 + 1.29 + content.location = 1.30 + "data:text/html,<!DOCTYPE html><html><body><input id='i'></body></html>"; 1.31 +} 1.32 +