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.
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 }