mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 762349 - Allow Sleep button to bubble from browser frames. r=jlebar
This commit is contained in:
parent
4e02d84f2d
commit
f29bd73fe9
@ -16,6 +16,7 @@ Cu.import("resource://gre/modules/BrowserElementPromptService.jsm");
|
||||
// Event whitelisted for bubbling.
|
||||
let whitelistedEvents = [
|
||||
Ci.nsIDOMKeyEvent.DOM_VK_ESCAPE, // Back button.
|
||||
Ci.nsIDOMKeyEvent.DOM_VK_SLEEP, // Power button.
|
||||
Ci.nsIDOMKeyEvent.DOM_VK_CONTEXT_MENU,
|
||||
Ci.nsIDOMKeyEvent.DOM_VK_F5, // Search button.
|
||||
Ci.nsIDOMKeyEvent.DOM_VK_PAGE_UP, // Volume up.
|
||||
|
@ -9,6 +9,7 @@ let Ci = Components.interfaces;
|
||||
|
||||
let whitelistedEvents = [
|
||||
Ci.nsIDOMKeyEvent.DOM_VK_ESCAPE, // Back button.
|
||||
Ci.nsIDOMKeyEvent.DOM_VK_SLEEP, // Power button
|
||||
Ci.nsIDOMKeyEvent.DOM_VK_CONTEXT_MENU,
|
||||
Ci.nsIDOMKeyEvent.DOM_VK_F5, // Search button.
|
||||
Ci.nsIDOMKeyEvent.DOM_VK_PAGE_UP, // Volume up.
|
||||
@ -27,7 +28,7 @@ iframe.src = browserElementTestHelpers.focusPage;
|
||||
document.body.appendChild(iframe);
|
||||
|
||||
// Number of expected events at which point we will consider the test as done.
|
||||
var nbEvents = 15;
|
||||
var nbEvents = whitelistedEvents.length * 3;
|
||||
|
||||
function eventHandler(e) {
|
||||
ok(((e.type == 'keydown' || e.type == 'keypress' || e.type == 'keyup') &&
|
||||
@ -70,6 +71,7 @@ function runTest() {
|
||||
synthesizeKey("VK_PAGE_UP", {}); // keypress is ignored because .preventDefault() will be called.
|
||||
synthesizeKey("VK_PAGE_DOWN", {}); // keypress is ignored because .preventDefault() will be called.
|
||||
synthesizeKey("VK_CONTEXT_MENU", {});
|
||||
synthesizeKey("VK_SLEEP", {});
|
||||
}
|
||||
|
||||
SimpleTest.waitForFocus(function() {
|
||||
|
Loading…
Reference in New Issue
Block a user