2010-07-26 07:53:22 -07:00
|
|
|
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");
|
|
|
|
|
2013-03-21 05:58:07 -07:00
|
|
|
ok(!tooltip.fillInPageTooltip(i),
|
2010-07-26 07:53:22 -07:00
|
|
|
"No tooltip should be shown when @title is null");
|
|
|
|
|
|
|
|
i.title = "foo";
|
2013-03-21 05:58:07 -07:00
|
|
|
ok(tooltip.fillInPageTooltip(i),
|
2010-07-26 07:53:22 -07:00
|
|
|
"A tooltip should be shown when @title is not the empty string");
|
|
|
|
|
|
|
|
i.pattern = "bar";
|
2013-03-21 05:58:07 -07:00
|
|
|
ok(tooltip.fillInPageTooltip(i),
|
2010-07-26 07:53:22 -07:00
|
|
|
"A tooltip should be shown when @title is not the empty string");
|
|
|
|
|
|
|
|
gBrowser.removeCurrentTab();
|
|
|
|
finish();
|
|
|
|
}, true);
|
|
|
|
|
|
|
|
content.location =
|
|
|
|
"data:text/html,<!DOCTYPE html><html><body><input id='i'></body></html>";
|
|
|
|
}
|
|
|
|
|