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

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 function test() {
     2   waitForExplicitFinish();
     3   gBrowser.selectedTab = gBrowser.addTab();
     4   gBrowser.selectedBrowser.addEventListener("load", function () {
     5     gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
     7     let doc = gBrowser.contentDocument;
     8     let tooltip = document.getElementById("aHTMLTooltip");
     9     let i = doc.getElementById("i");
    11     ok(!tooltip.fillInPageTooltip(i),
    12        "No tooltip should be shown when @title is null");
    14     i.title = "foo";
    15     ok(tooltip.fillInPageTooltip(i),
    16        "A tooltip should be shown when @title is not the empty string");
    18     i.pattern = "bar";
    19     ok(tooltip.fillInPageTooltip(i),
    20        "A tooltip should be shown when @title is not the empty string");
    22     gBrowser.removeCurrentTab();
    23     finish();
    24   }, true);
    26   content.location = 
    27     "data:text/html,<!DOCTYPE html><html><body><input id='i'></body></html>";
    28 }

mercurial