tenfourfox/browser/base/content/test/general/browser_bug561623.js
Cameron Kaiser c9b2922b70 hello FPR
2017-04-19 00:56:45 -07:00

29 lines
820 B
JavaScript

function test() {
waitForExplicitFinish();
gBrowser.selectedTab = gBrowser.addTab();
BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser).then(() => {
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();
});
gBrowser.loadURI(
"data:text/html,<!DOCTYPE html><html><body><input id='i'></body></html>"
);
}