2011-02-03 11:51:17 -08:00
|
|
|
/* Any copyright is dedicated to the Public Domain.
|
|
|
|
http://creativecommons.org/publicdomain/zero/1.0/ */
|
2011-01-26 11:37:02 -08:00
|
|
|
|
|
|
|
function test() {
|
|
|
|
let cw;
|
|
|
|
|
2011-02-03 11:51:17 -08:00
|
|
|
let testEnableSearchWithWindowsKey = function () {
|
2011-01-26 11:37:02 -08:00
|
|
|
let utils = cw.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
|
|
|
.getInterface(Components.interfaces.nsIDOMWindowUtils);
|
|
|
|
|
2011-02-03 11:51:17 -08:00
|
|
|
// we test 0, for Linux, and 91 (left) and 92 (right) for windows
|
|
|
|
let keyCodes = [0, 91, 92];
|
|
|
|
keyCodes.forEach(function(keyCode) {
|
|
|
|
utils.sendKeyEvent("keydown", keyCode, 0, 0);
|
|
|
|
ok(!cw.isSearchEnabled(), "search is not enabled with keyCode: " + keyCode);
|
|
|
|
});
|
|
|
|
|
2011-01-26 11:37:02 -08:00
|
|
|
hideTabView(finish);
|
|
|
|
}
|
|
|
|
|
|
|
|
waitForExplicitFinish();
|
|
|
|
|
|
|
|
showTabView(function () {
|
|
|
|
cw = TabView.getContentWindow();
|
|
|
|
testEnableSearchWithWindowsKey();
|
|
|
|
});
|
|
|
|
}
|