Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | function test() { |
michael@0 | 2 | waitForExplicitFinish(); |
michael@0 | 3 | gBrowser.selectedTab = gBrowser.addTab(); |
michael@0 | 4 | gBrowser.selectedBrowser.addEventListener("load", function () { |
michael@0 | 5 | gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true); |
michael@0 | 6 | |
michael@0 | 7 | let doc = gBrowser.contentDocument; |
michael@0 | 8 | let tooltip = document.getElementById("aHTMLTooltip"); |
michael@0 | 9 | let i = doc.getElementById("i"); |
michael@0 | 10 | |
michael@0 | 11 | ok(!tooltip.fillInPageTooltip(i), |
michael@0 | 12 | "No tooltip should be shown when @title is null"); |
michael@0 | 13 | |
michael@0 | 14 | i.title = "foo"; |
michael@0 | 15 | ok(tooltip.fillInPageTooltip(i), |
michael@0 | 16 | "A tooltip should be shown when @title is not the empty string"); |
michael@0 | 17 | |
michael@0 | 18 | i.pattern = "bar"; |
michael@0 | 19 | ok(tooltip.fillInPageTooltip(i), |
michael@0 | 20 | "A tooltip should be shown when @title is not the empty string"); |
michael@0 | 21 | |
michael@0 | 22 | gBrowser.removeCurrentTab(); |
michael@0 | 23 | finish(); |
michael@0 | 24 | }, true); |
michael@0 | 25 | |
michael@0 | 26 | content.location = |
michael@0 | 27 | "data:text/html,<!DOCTYPE html><html><body><input id='i'></body></html>"; |
michael@0 | 28 | } |
michael@0 | 29 |