Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 function test () {
3 waitForExplicitFinish();
4 gBrowser.selectedTab = gBrowser.addTab();
5 gBrowser.selectedBrowser.addEventListener("load", function () {
6 gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
8 let doc = gBrowser.contentDocument;
9 let tooltip = document.getElementById("aHTMLTooltip");
11 ok(tooltip.fillInPageTooltip(doc.getElementById("svg1")), "should get title");
12 is(tooltip.getAttribute("label"), "This is a non-root SVG element title");
14 ok(tooltip.fillInPageTooltip(doc.getElementById("text1")), "should get title");
15 is(tooltip.getAttribute("label"), "\n\n\n This is a title\n\n ");
17 ok(!tooltip.fillInPageTooltip(doc.getElementById("text2")), "should not get title");
19 ok(!tooltip.fillInPageTooltip(doc.getElementById("text3")), "should not get title");
21 ok(tooltip.fillInPageTooltip(doc.getElementById("link1")), "should get title");
22 is(tooltip.getAttribute("label"), "\n This is a title\n ");
23 ok(tooltip.fillInPageTooltip(doc.getElementById("text4")), "should get title");
24 is(tooltip.getAttribute("label"), "\n This is a title\n ");
26 ok(!tooltip.fillInPageTooltip(doc.getElementById("link2")), "should not get title");
28 ok(tooltip.fillInPageTooltip(doc.getElementById("link3")), "should get title");
29 isnot(tooltip.getAttribute("label"), "");
31 ok(tooltip.fillInPageTooltip(doc.getElementById("link4")), "should get title");
32 is(tooltip.getAttribute("label"), "This is an xlink:title attribute");
34 ok(!tooltip.fillInPageTooltip(doc.getElementById("text5")), "should not get title");
36 gBrowser.removeCurrentTab();
37 finish();
38 }, true);
40 content.location =
41 "http://mochi.test:8888/browser/browser/base/content/test/general/title_test.svg";
42 }