Thu, 15 Jan 2015 15:55:04 +0100
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 }