|
1 /* Any copyright is dedicated to the Public Domain. |
|
2 http://creativecommons.org/publicdomain/zero/1.0/ */ |
|
3 |
|
4 function test() { |
|
5 let cw; |
|
6 |
|
7 let testEnableSearchWithWindowsKey = function () { |
|
8 let utils = cw.QueryInterface(Components.interfaces.nsIInterfaceRequestor) |
|
9 .getInterface(Components.interfaces.nsIDOMWindowUtils); |
|
10 |
|
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 }); |
|
17 |
|
18 hideTabView(finish); |
|
19 } |
|
20 |
|
21 waitForExplicitFinish(); |
|
22 |
|
23 showTabView(function () { |
|
24 cw = TabView.getContentWindow(); |
|
25 testEnableSearchWithWindowsKey(); |
|
26 }); |
|
27 } |