browser/components/tabview/test/browser_tabview_bug628165.js

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     1 /* Any copyright is dedicated to the Public Domain.
     2    http://creativecommons.org/publicdomain/zero/1.0/ */
     4 function test() {
     5   let cw;
     7   let testEnableSearchWithWindowsKey = function () {
     8     let utils = cw.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
     9                   .getInterface(Components.interfaces.nsIDOMWindowUtils);
    11     // we test 0, for Linux, and 91 (left) and 92 (right) for windows
    12     let keyCodes = [0, 91, 92];
    13     keyCodes.forEach(function(keyCode) {
    14       utils.sendKeyEvent("keydown", keyCode, 0, 0);
    15       ok(!cw.Search.isEnabled(), "search is not enabled with keyCode: " + keyCode);
    16     });
    18     hideTabView(finish);
    19   }
    21   waitForExplicitFinish();
    23   showTabView(function () {
    24     cw = TabView.getContentWindow();
    25     testEnableSearchWithWindowsKey();
    26   });
    27 }

mercurial