browser/base/content/test/general/browser_bug329212.js

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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 }

mercurial