diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 00:47:55 +0000 |
commit | 26a029d407be480d791972afb5975cf62c9360a6 (patch) | |
tree | f435a8308119effd964b339f76abb83a57c29483 /toolkit/components/tooltiptext/tests/browser_bug331772_xul_tooltiptext_in_html.js | |
parent | Initial commit. (diff) | |
download | firefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz firefox-26a029d407be480d791972afb5975cf62c9360a6.zip |
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/tooltiptext/tests/browser_bug331772_xul_tooltiptext_in_html.js')
-rw-r--r-- | toolkit/components/tooltiptext/tests/browser_bug331772_xul_tooltiptext_in_html.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/toolkit/components/tooltiptext/tests/browser_bug331772_xul_tooltiptext_in_html.js b/toolkit/components/tooltiptext/tests/browser_bug331772_xul_tooltiptext_in_html.js new file mode 100644 index 0000000000..61c50e5422 --- /dev/null +++ b/toolkit/components/tooltiptext/tests/browser_bug331772_xul_tooltiptext_in_html.js @@ -0,0 +1,30 @@ +/** + * Tests that the tooltiptext attribute is used for XUL elements in an HTML doc. + */ +add_task(async function () { + await SpecialPowers.pushPermissions([ + { type: "allowXULXBL", allow: true, context: "http://mochi.test:8888" }, + ]); + + await BrowserTestUtils.withNewTab( + { + gBrowser, + url: "http://mochi.test:8888/browser/toolkit/components/tooltiptext/tests/xul_tooltiptext.xhtml", + }, + async function (browser) { + await SpecialPowers.spawn(browser, [""], function () { + let textObj = {}; + let tttp = Cc[ + "@mozilla.org/embedcomp/default-tooltiptextprovider;1" + ].getService(Ci.nsITooltipTextProvider); + let xulToolbarButton = + content.document.getElementById("xulToolbarButton"); + ok( + tttp.getNodeText(xulToolbarButton, textObj, {}), + "should get tooltiptext" + ); + is(textObj.value, "XUL tooltiptext"); + }); + } + ); +}); |