From 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:47:29 +0200 Subject: Adding upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- .../tooltiptext/tests/browser_bug561623.js | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 toolkit/components/tooltiptext/tests/browser_bug561623.js (limited to 'toolkit/components/tooltiptext/tests/browser_bug561623.js') diff --git a/toolkit/components/tooltiptext/tests/browser_bug561623.js b/toolkit/components/tooltiptext/tests/browser_bug561623.js new file mode 100644 index 0000000000..93f68d307f --- /dev/null +++ b/toolkit/components/tooltiptext/tests/browser_bug561623.js @@ -0,0 +1,33 @@ +add_task(async function () { + await BrowserTestUtils.withNewTab( + { + gBrowser, + url: "data:text/html,", + }, + async function (browser) { + await SpecialPowers.spawn(browser, [""], function () { + let tttp = Cc[ + "@mozilla.org/embedcomp/default-tooltiptextprovider;1" + ].getService(Ci.nsITooltipTextProvider); + let i = content.document.getElementById("i"); + + ok( + !tttp.getNodeText(i, {}, {}), + "No tooltip should be shown when @title is null" + ); + + i.title = "foo"; + ok( + tttp.getNodeText(i, {}, {}), + "A tooltip should be shown when @title is not the empty string" + ); + + i.pattern = "bar"; + ok( + tttp.getNodeText(i, {}, {}), + "A tooltip should be shown when @title is not the empty string" + ); + }); + } + ); +}); -- cgit v1.2.3