Bug 561623 - Test tooltip for HTMLInputElement. r=gavin

This commit is contained in:
Mounir Lamouri 2010-07-26 16:53:22 +02:00
parent 4ba7d860bf
commit c99e7ead20
2 changed files with 30 additions and 0 deletions

View File

@ -136,6 +136,7 @@ _BROWSER_FILES = \
browser_bug555224.js \
browser_bug555767.js \
browser_bug556061.js \
browser_bug561623.js \
browser_bug562649.js \
browser_bug563588.js \
browser_bug577121.js \

View File

@ -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(!FillInHTMLTooltip(i),
"No tooltip should be shown when @title is null");
i.title = "foo";
ok(FillInHTMLTooltip(i),
"A tooltip should be shown when @title is not the empty string");
i.pattern = "bar";
ok(FillInHTMLTooltip(i),
"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>";
}