Merge autoland to mozilla-central. a=merge

This commit is contained in:
Noemi Erli 2018-02-03 11:50:53 +02:00
Родитель 250785729c 9d65a9cea8
Коммит c1da6f3f85
130 изменённых файлов: 921 добавлений и 2150 удалений

Просмотреть файл

@ -1,6 +1,6 @@
[flake8]
# See http://pep8.readthedocs.io/en/latest/intro.html#configuration
ignore = E121, E123, E126, E129, E133, E226, E241, E242, E704, W503, E402
ignore = E121, E123, E126, E129, E133, E226, E241, E242, E704, W503, E402, E741
max-line-length = 99
exclude =
testing/mochitest/pywebsocket,

Просмотреть файл

@ -1,12 +0,0 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
<menu id="charsetMenu"
label="&charsetMenu2.label;"
accesskey="&charsetMenu2.accesskey;"
oncommand="BrowserSetForcedCharacterSet(event.target.getAttribute('charset'));"
onpopupshowing="CharsetMenu.build(event.target); UpdateCurrentCharset(this);">
<menupopup>
</menupopup>
</menu>

Просмотреть файл

@ -263,7 +263,14 @@
<menuseparator/>
</menupopup>
</menu>
#include browser-charsetmenu.inc
<menu id="charsetMenu"
label="&charsetMenu2.label;"
accesskey="&charsetMenu2.accesskey;"
oncommand="BrowserSetForcedCharacterSet(event.target.getAttribute('charset'));"
onpopupshowing="CharsetMenu.build(event.target); UpdateCurrentCharset(this);">
<menupopup>
</menupopup>
</menu>
<menuseparator/>
#ifdef XP_MACOSX
<menuitem id="enterFullScreenItem"

Просмотреть файл

@ -3,6 +3,8 @@
*/
const PERMISSIONS_PAGE = getRootDirectory(gTestPath).replace("chrome://mochitests/content", "https://example.com") + "permissions.html";
const kStrictKeyPressEvents =
SpecialPowers.getBoolPref("dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content");
function openIdentityPopup() {
let promise = BrowserTestUtils.waitForEvent(gIdentityHandler._identityPopup, "popupshown");
@ -188,9 +190,15 @@ add_task(async function testPermissionShortcuts() {
async function tryKey(desc, expectedValue) {
await EventUtils.synthesizeAndWaitKey("c", { accelKey: true });
let result = await ContentTask.spawn(browser, null, function() {
return content.wrappedJSObject.gKeyPresses;
return {keydowns: content.wrappedJSObject.gKeyDowns,
keypresses: content.wrappedJSObject.gKeyPresses};
});
is(result, expectedValue, desc);
is(result.keydowns, expectedValue, "keydown event was fired or not fired as expected, " + desc);
if (kStrictKeyPressEvents) {
is(result.keypresses, 0, "keypress event shouldn't be fired for shortcut key, " + desc);
} else {
is(result.keypresses, expectedValue, "keypress event should be fired even for shortcut key, " + desc);
}
}
await tryKey("pressed with default permissions", 1);

Просмотреть файл

@ -7,9 +7,10 @@
<meta charset="utf8">
</head>
<script>
var gKeyDowns = 0;
var gKeyPresses = 0;
</script>
<body onkeypress="gKeyPresses++;">
<body onkeydown="gKeyDowns++;" onkeypress="gKeyPresses++">
<!-- This page could eventually request permissions from content
and make sure that chrome responds appropriately -->
<button id="geo" onclick="navigator.geolocation.getCurrentPosition(() => {})">Geolocation</button>

Просмотреть файл

@ -523,7 +523,8 @@ const PanelUI = {
// As per bug 1402023, hard-coded limit, until Activity Stream develops a
// richer list.
numItems: 6,
withFavicons: true
withFavicons: true,
excludePocket: true
}).catch(ex => {
// Just hide the section if we can't retrieve the items from the database.
Cu.reportError(ex);

Просмотреть файл

@ -5,35 +5,40 @@
const { classes: Cc, Constructor: CC, interfaces: Ci, utils: Cu } = Components;
const kStrictKeyPressEvents =
SpecialPowers.getBoolPref("dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content");
const nsIDOMKeyEvent = Ci.nsIDOMKeyEvent;
const SHOULD_DELIVER_KEYDOWN = 0x1;
const SHOULD_DELIVER_KEYPRESS = 0x2;
const SHOULD_DELIVER_KEYUP = 0x4;
const SHOULD_DELIVER_ALL = SHOULD_DELIVER_KEYDOWN |
SHOULD_DELIVER_KEYPRESS |
SHOULD_DELIVER_KEYUP;
const SHOULD_DELIVER_ALL_FOR_PRINTABLE = SHOULD_DELIVER_KEYDOWN |
SHOULD_DELIVER_KEYPRESS |
SHOULD_DELIVER_KEYUP;
const SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE =
kStrictKeyPressEvents ? (SHOULD_DELIVER_KEYDOWN | SHOULD_DELIVER_KEYUP) : SHOULD_DELIVER_ALL_FOR_PRINTABLE;
const TEST_PATH = "http://example.net/browser/browser/" +
"components/resistfingerprinting/test/browser/";
// The test cases for english content.
const TEST_CASES_EN = [
{ key: "KEY_ArrowDown", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_ArrowDown", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "ArrowDown", code: "ArrowDown", charCode: 0, keyCode: nsIDOMKeyEvent.DOM_VK_DOWN,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_ArrowLeft", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_ArrowLeft", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "ArrowLeft", code: "ArrowLeft", charCode: 0, keyCode: nsIDOMKeyEvent.DOM_VK_LEFT,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_ArrowRight", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_ArrowRight", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "ArrowRight", code: "ArrowRight", charCode: 0, keyCode: nsIDOMKeyEvent.DOM_VK_RIGHT,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_ArrowUp", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_ArrowUp", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "ArrowUp", code: "ArrowUp", charCode: 0, keyCode: nsIDOMKeyEvent.DOM_VK_UP,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
@ -43,22 +48,22 @@ const TEST_CASES_EN = [
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_End", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_End", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "End", code: "End", charCode: 0, keyCode: nsIDOMKeyEvent.DOM_VK_END,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_Enter", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_Enter", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "Enter", code: "Enter", charCode: 0, keyCode: nsIDOMKeyEvent.DOM_VK_RETURN,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_Escape", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_Escape", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "Escape", code: "Escape", charCode: 0, keyCode: nsIDOMKeyEvent.DOM_VK_ESCAPE,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_Home", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_Home", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "Home", code: "Home", charCode: 0, keyCode: nsIDOMKeyEvent.DOM_VK_HOME,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
@ -87,532 +92,532 @@ const TEST_CASES_EN = [
location: KeyboardEvent.DOM_KEY_LOCATION_RIGHT, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_PageDown", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_PageDown", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "PageDown", code: "PageDown", charCode: 0, keyCode: nsIDOMKeyEvent.DOM_VK_PAGE_DOWN,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_PageUp", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_PageUp", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "PageUp", code: "PageUp", charCode: 0, keyCode: nsIDOMKeyEvent.DOM_VK_PAGE_UP,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: " ", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: " ", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: " ", code: "Space", charCode: 32, keyCode: nsIDOMKeyEvent.DOM_VK_SPACE,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: ",", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: ",", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: ",", code: "Comma", charCode: 44, keyCode: nsIDOMKeyEvent.DOM_VK_COMMA,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "<", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "<", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "<", code: "Comma", charCode: 60, keyCode: nsIDOMKeyEvent.DOM_VK_COMMA,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "[", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "[", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "[", code: "BracketLeft", charCode: 91, keyCode: nsIDOMKeyEvent.DOM_VK_OPEN_BRACKET,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "{", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "{", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "{", code: "BracketLeft", charCode: 123, keyCode: nsIDOMKeyEvent.DOM_VK_OPEN_BRACKET,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "]", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "]", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "]", code: "BracketRight", charCode: 93, keyCode: nsIDOMKeyEvent.DOM_VK_CLOSE_BRACKET,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "}", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "}", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "}", code: "BracketRight", charCode: 125, keyCode: nsIDOMKeyEvent.DOM_VK_CLOSE_BRACKET,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "\\", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "\\", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "\\", code: "Backslash", charCode: 92, keyCode: nsIDOMKeyEvent.DOM_VK_BACK_SLASH,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "|", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "|", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "|", code: "Backslash", charCode: 124, keyCode: nsIDOMKeyEvent.DOM_VK_BACK_SLASH,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: ";", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: ";", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: ";", code: "Semicolon", charCode: 59, keyCode: nsIDOMKeyEvent.DOM_VK_SEMICOLON,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: ":", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: ":", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: ":", code: "Semicolon", charCode: 58, keyCode: nsIDOMKeyEvent.DOM_VK_SEMICOLON,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: ".", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: ".", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: ".", code: "Period", charCode: 46, keyCode: nsIDOMKeyEvent.DOM_VK_PERIOD,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: ">", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: ">", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: ">", code: "Period", charCode: 62, keyCode: nsIDOMKeyEvent.DOM_VK_PERIOD,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "/", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "/", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "/", code: "Slash", charCode: 47, keyCode: nsIDOMKeyEvent.DOM_VK_SLASH,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "?", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "?", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "?", code: "Slash", charCode: 63, keyCode: nsIDOMKeyEvent.DOM_VK_SLASH,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "'", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "'", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "'", code: "Quote", charCode: 39, keyCode: nsIDOMKeyEvent.DOM_VK_QUOTE,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "\"", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "\"", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "\"", code: "Quote", charCode: 34, keyCode: nsIDOMKeyEvent.DOM_VK_QUOTE,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "-", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "-", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "-", code: "Minus", charCode: 45, keyCode: nsIDOMKeyEvent.DOM_VK_HYPHEN_MINUS,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "_", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "_", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "_", code: "Minus", charCode: 95, keyCode: nsIDOMKeyEvent.DOM_VK_HYPHEN_MINUS,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "=", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "=", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "=", code: "Equal", charCode: 61, keyCode: nsIDOMKeyEvent.DOM_VK_EQUALS,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "+", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "+", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "+", code: "Equal", charCode: 43, keyCode: nsIDOMKeyEvent.DOM_VK_EQUALS,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "a", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "a", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "a", code: "KeyA", charCode: 97, keyCode: nsIDOMKeyEvent.DOM_VK_A,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "A", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "A", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "A", code: "KeyA", charCode: 65, keyCode: nsIDOMKeyEvent.DOM_VK_A,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "b", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "b", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "b", code: "KeyB", charCode: 98, keyCode: nsIDOMKeyEvent.DOM_VK_B,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "B", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "B", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "B", code: "KeyB", charCode: 66, keyCode: nsIDOMKeyEvent.DOM_VK_B,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "c", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "c", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "c", code: "KeyC", charCode: 99, keyCode: nsIDOMKeyEvent.DOM_VK_C,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "C", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "C", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "C", code: "KeyC", charCode: 67, keyCode: nsIDOMKeyEvent.DOM_VK_C,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "d", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "d", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "d", code: "KeyD", charCode: 100, keyCode: nsIDOMKeyEvent.DOM_VK_D,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "D", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "D", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "D", code: "KeyD", charCode: 68, keyCode: nsIDOMKeyEvent.DOM_VK_D,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "e", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "e", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "e", code: "KeyE", charCode: 101, keyCode: nsIDOMKeyEvent.DOM_VK_E,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "E", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "E", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "E", code: "KeyE", charCode: 69, keyCode: nsIDOMKeyEvent.DOM_VK_E,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "f", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "f", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "f", code: "KeyF", charCode: 102, keyCode: nsIDOMKeyEvent.DOM_VK_F,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "F", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "F", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "F", code: "KeyF", charCode: 70, keyCode: nsIDOMKeyEvent.DOM_VK_F,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "g", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "g", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "g", code: "KeyG", charCode: 103, keyCode: nsIDOMKeyEvent.DOM_VK_G,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "G", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "G", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "G", code: "KeyG", charCode: 71, keyCode: nsIDOMKeyEvent.DOM_VK_G,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "h", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "h", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "h", code: "KeyH", charCode: 104, keyCode: nsIDOMKeyEvent.DOM_VK_H,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "H", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "H", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "H", code: "KeyH", charCode: 72, keyCode: nsIDOMKeyEvent.DOM_VK_H,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "i", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "i", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "i", code: "KeyI", charCode: 105, keyCode: nsIDOMKeyEvent.DOM_VK_I,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "I", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "I", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "I", code: "KeyI", charCode: 73, keyCode: nsIDOMKeyEvent.DOM_VK_I,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "j", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "j", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "j", code: "KeyJ", charCode: 106, keyCode: nsIDOMKeyEvent.DOM_VK_J,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "J", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "J", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "J", code: "KeyJ", charCode: 74, keyCode: nsIDOMKeyEvent.DOM_VK_J,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "k", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "k", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "k", code: "KeyK", charCode: 107, keyCode: nsIDOMKeyEvent.DOM_VK_K,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "K", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "K", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "K", code: "KeyK", charCode: 75, keyCode: nsIDOMKeyEvent.DOM_VK_K,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "l", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "l", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "l", code: "KeyL", charCode: 108, keyCode: nsIDOMKeyEvent.DOM_VK_L,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "L", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "L", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "L", code: "KeyL", charCode: 76, keyCode: nsIDOMKeyEvent.DOM_VK_L,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "m", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "m", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "m", code: "KeyM", charCode: 109, keyCode: nsIDOMKeyEvent.DOM_VK_M,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "M", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "M", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "M", code: "KeyM", charCode: 77, keyCode: nsIDOMKeyEvent.DOM_VK_M,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "n", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "n", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "n", code: "KeyN", charCode: 110, keyCode: nsIDOMKeyEvent.DOM_VK_N,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "N", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "N", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "N", code: "KeyN", charCode: 78, keyCode: nsIDOMKeyEvent.DOM_VK_N,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "o", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "o", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "o", code: "KeyO", charCode: 111, keyCode: nsIDOMKeyEvent.DOM_VK_O,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "O", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "O", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "O", code: "KeyO", charCode: 79, keyCode: nsIDOMKeyEvent.DOM_VK_O,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "p", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "p", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "p", code: "KeyP", charCode: 112, keyCode: nsIDOMKeyEvent.DOM_VK_P,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "P", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "P", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "P", code: "KeyP", charCode: 80, keyCode: nsIDOMKeyEvent.DOM_VK_P,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "q", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "q", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "q", code: "KeyQ", charCode: 113, keyCode: nsIDOMKeyEvent.DOM_VK_Q,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "Q", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "Q", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "Q", code: "KeyQ", charCode: 81, keyCode: nsIDOMKeyEvent.DOM_VK_Q,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "r", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "r", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "r", code: "KeyR", charCode: 114, keyCode: nsIDOMKeyEvent.DOM_VK_R,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "R", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "R", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "R", code: "KeyR", charCode: 82, keyCode: nsIDOMKeyEvent.DOM_VK_R,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "s", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "s", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "s", code: "KeyS", charCode: 115, keyCode: nsIDOMKeyEvent.DOM_VK_S,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "S", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "S", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "S", code: "KeyS", charCode: 83, keyCode: nsIDOMKeyEvent.DOM_VK_S,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "t", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "t", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "t", code: "KeyT", charCode: 116, keyCode: nsIDOMKeyEvent.DOM_VK_T,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "T", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "T", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "T", code: "KeyT", charCode: 84, keyCode: nsIDOMKeyEvent.DOM_VK_T,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "u", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "u", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "u", code: "KeyU", charCode: 117, keyCode: nsIDOMKeyEvent.DOM_VK_U,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "U", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "U", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "U", code: "KeyU", charCode: 85, keyCode: nsIDOMKeyEvent.DOM_VK_U,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "v", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "v", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "v", code: "KeyV", charCode: 118, keyCode: nsIDOMKeyEvent.DOM_VK_V,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "V", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "V", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "V", code: "KeyV", charCode: 86, keyCode: nsIDOMKeyEvent.DOM_VK_V,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "w", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "w", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "w", code: "KeyW", charCode: 119, keyCode: nsIDOMKeyEvent.DOM_VK_W,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "W", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "W", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "W", code: "KeyW", charCode: 87, keyCode: nsIDOMKeyEvent.DOM_VK_W,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "x", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "x", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "x", code: "KeyX", charCode: 120, keyCode: nsIDOMKeyEvent.DOM_VK_X,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "X", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "X", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "X", code: "KeyX", charCode: 88, keyCode: nsIDOMKeyEvent.DOM_VK_X,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "y", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "y", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "y", code: "KeyY", charCode: 121, keyCode: nsIDOMKeyEvent.DOM_VK_Y,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "Y", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "Y", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "Y", code: "KeyY", charCode: 89, keyCode: nsIDOMKeyEvent.DOM_VK_Y,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "z", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "z", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "z", code: "KeyZ", charCode: 122, keyCode: nsIDOMKeyEvent.DOM_VK_Z,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "Z", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "Z", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "Z", code: "KeyZ", charCode: 90, keyCode: nsIDOMKeyEvent.DOM_VK_Z,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "0", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "0", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "0", code: "Digit0", charCode: 48, keyCode: nsIDOMKeyEvent.DOM_VK_0,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "1", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "1", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "1", code: "Digit1", charCode: 49, keyCode: nsIDOMKeyEvent.DOM_VK_1,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "2", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "2", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "2", code: "Digit2", charCode: 50, keyCode: nsIDOMKeyEvent.DOM_VK_2,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "3", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "3", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "3", code: "Digit3", charCode: 51, keyCode: nsIDOMKeyEvent.DOM_VK_3,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "4", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "4", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "4", code: "Digit4", charCode: 52, keyCode: nsIDOMKeyEvent.DOM_VK_4,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "5", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "5", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "5", code: "Digit5", charCode: 53, keyCode: nsIDOMKeyEvent.DOM_VK_5,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "6", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "6", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "6", code: "Digit6", charCode: 54, keyCode: nsIDOMKeyEvent.DOM_VK_6,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "7", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "7", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "7", code: "Digit7", charCode: 55, keyCode: nsIDOMKeyEvent.DOM_VK_7,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "8", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "8", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "8", code: "Digit8", charCode: 56, keyCode: nsIDOMKeyEvent.DOM_VK_8,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "9", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "9", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "9", code: "Digit9", charCode: 57, keyCode: nsIDOMKeyEvent.DOM_VK_9,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: ")", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: ")", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: ")", code: "Digit0", charCode: 41, keyCode: nsIDOMKeyEvent.DOM_VK_0,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "!", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "!", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "!", code: "Digit1", charCode: 33, keyCode: nsIDOMKeyEvent.DOM_VK_1,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "@", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "@", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "@", code: "Digit2", charCode: 64, keyCode: nsIDOMKeyEvent.DOM_VK_2,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "#", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "#", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "#", code: "Digit3", charCode: 35, keyCode: nsIDOMKeyEvent.DOM_VK_3,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "$", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "$", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "$", code: "Digit4", charCode: 36, keyCode: nsIDOMKeyEvent.DOM_VK_4,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "%", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "%", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "%", code: "Digit5", charCode: 37, keyCode: nsIDOMKeyEvent.DOM_VK_5,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "^", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "^", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "^", code: "Digit6", charCode: 94, keyCode: nsIDOMKeyEvent.DOM_VK_6,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "&", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "&", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "&", code: "Digit7", charCode: 38, keyCode: nsIDOMKeyEvent.DOM_VK_7,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "*", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "*", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "*", code: "Digit8", charCode: 42, keyCode: nsIDOMKeyEvent.DOM_VK_8,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "(", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "(", modifiers: { shiftKey: true }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "(", code: "Digit9", charCode: 40, keyCode: nsIDOMKeyEvent.DOM_VK_9,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: true,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_F1", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_F1", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "F1", code: "F1", charCode: 112, keyCode: nsIDOMKeyEvent.DOM_VK_F1,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_F2", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_F2", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "F2", code: "F2", charCode: 113, keyCode: nsIDOMKeyEvent.DOM_VK_F2,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_F3", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_F3", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "F3", code: "F3", charCode: 114, keyCode: nsIDOMKeyEvent.DOM_VK_F3,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_F4", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_F4", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "F4", code: "F4", charCode: 115, keyCode: nsIDOMKeyEvent.DOM_VK_F4,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_F5", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_F5", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "F5", code: "F5", charCode: 116, keyCode: nsIDOMKeyEvent.DOM_VK_F5,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_F7", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_F7", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "F7", code: "F7", charCode: 118, keyCode: nsIDOMKeyEvent.DOM_VK_F7,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_F8", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_F8", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "F8", code: "F8", charCode: 119, keyCode: nsIDOMKeyEvent.DOM_VK_F8,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_F9", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_F9", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "F9", code: "F9", charCode: 120, keyCode: nsIDOMKeyEvent.DOM_VK_F9,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_F10", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_F10", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "F10", code: "F10", charCode: 121, keyCode: nsIDOMKeyEvent.DOM_VK_F10,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_F11", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_F11", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "F11", code: "F11", charCode: 122, keyCode: nsIDOMKeyEvent.DOM_VK_F11,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
},
{ key: "KEY_F12", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL,
{ key: "KEY_F12", modifiers: {}, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_NON_PRINTABLE,
result: { key: "F12", code: "F12", charCode: 123, keyCode: nsIDOMKeyEvent.DOM_VK_F12,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }
@ -736,7 +741,7 @@ add_task(async function runTestsForEnglishContent() {
// Test a key which doesn't exist in US English keyboard layout.
await testKeyEvent(tab,
{
key: "\u00DF", modifiers: { code: "Minus", keyCode: 63 }, expectedKeyEvent: SHOULD_DELIVER_ALL,
key: "\u00DF", modifiers: { code: "Minus", keyCode: 63 }, expectedKeyEvent: SHOULD_DELIVER_ALL_FOR_PRINTABLE,
result: { key: "\u00DF", code: "", charCode: 223, keyCode: 0,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD, altKey: false, shiftKey: false,
ctrlKey: false, altGraphKey: false }

Просмотреть файл

@ -87,7 +87,8 @@ this.HighlightsFeed = class HighlightsFeed {
// Request more than the expected length to allow for items being removed by
// deduping against Top Sites or multiple history from the same domain, etc.
const manyPages = await this.linksCache.request({numItems: MANY_EXTRA_LENGTH});
// Until bug 1425496 lands, do not include saved Pocket items in highlights
const manyPages = await this.linksCache.request({numItems: MANY_EXTRA_LENGTH, excludePocket: true});
// Remove adult highlights if we need to
const checkedAdult = this.store.getState().Prefs.values.filterAdult ?

36
browser/extensions/pocket/bootstrap.js поставляемый
Просмотреть файл

@ -136,9 +136,6 @@ var PocketPageAction = {
BrowserPageActions.doCommandForAction(this, event, wrapper);
});
},
onPlacedInPanel(panelNode, urlbarNode) {
PocketOverlay.onWindowOpened(panelNode.ownerGlobal);
},
onIframeShowing(iframe, panel) {
Pocket.onShownInPhotonPageActionPanel(panel, iframe);
@ -402,6 +399,7 @@ var PocketOverlay = {
this._cachedSheet = styleSheetService.preloadSheet(gPocketStyleURI,
this._sheetType);
Services.ppmm.loadProcessScript(PROCESS_SCRIPT, true);
Services.obs.addObserver(this, "browser-delayed-startup-finished");
PocketReader.startup();
PocketPageAction.init();
PocketContextMenu.init();
@ -413,6 +411,7 @@ var PocketOverlay = {
let ppmm = Cc["@mozilla.org/parentprocessmessagemanager;1"]
.getService(Ci.nsIMessageBroadcaster);
ppmm.broadcastAsyncMessage("PocketShuttingDown");
Services.obs.removeObserver(this, "browser-delayed-startup-finished");
// Although the ppmm loads the scripts into the chrome process as well,
// we need to manually unregister here anyway to ensure these aren't part
// of the chrome process and avoid errors.
@ -422,8 +421,7 @@ var PocketOverlay = {
PocketPageAction.shutdown();
for (let window of browserWindows()) {
for (let id of ["panelMenu_pocket", "panelMenu_pocketSeparator",
"appMenu-library-pocket-button"]) {
for (let id of ["appMenu-library-pocket-button"]) {
let element = window.document.getElementById(id) ||
window.gNavToolbox.palette.querySelector("#" + id);
if (element)
@ -440,6 +438,11 @@ var PocketOverlay = {
PocketContextMenu.shutdown();
PocketReader.shutdown();
},
observe(subject, topic, detail) {
if (topic == "browser-delayed-startup-finished") {
this.onWindowOpened(subject);
}
},
onWindowOpened(window) {
if (window.hasOwnProperty("pktUI"))
return;
@ -462,29 +465,8 @@ var PocketOverlay = {
let document = window.document;
let hidden = !isPocketEnabled();
// add to PanelUI-bookmarks
let sib = document.getElementById("panelMenuBookmarkThisPage");
if (sib && !document.getElementById("panelMenu_pocket")) {
let menu = createElementWithAttrs(document, "toolbarbutton", {
"id": "panelMenu_pocket",
"label": gPocketBundle.GetStringFromName("pocketMenuitem.label"),
"class": "subviewbutton cui-withicon",
"oncommand": "Pocket.openList(event)",
"hidden": hidden
});
let sep = createElementWithAttrs(document, "toolbarseparator", {
"id": "panelMenu_pocketSeparator",
"hidden": hidden
});
// nextSibling is no-id toolbarseparator
// insert separator first then button
sib = sib.nextSibling;
sib.parentNode.insertBefore(sep, sib);
sib.parentNode.insertBefore(menu, sib);
}
// Add to library panel
sib = document.getElementById("appMenu-library-history-button");
let sib = document.getElementById("appMenu-library-history-button");
if (sib && !document.getElementById("appMenu-library-pocket-button")) {
let menu = createElementWithAttrs(document, "toolbarbutton", {
"id": "appMenu-library-pocket-button",

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 264 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 641 B

Просмотреть файл

@ -4,25 +4,7 @@
[features/firefox@getpocket.com] chrome.jar:
% content pocket %content/ contentaccessible=yes
% skin pocket classic/1.0 %skin/linux/ os=LikeUnix
% skin pocket classic/1.0 %skin/osx/ os=Darwin
% skin pocket classic/1.0 %skin/windows/ os=WINNT
% skin pocket-shared classic/1.0 %skin/shared/
content/ (content/*)
skin/shared (skin/shared/*)
#ifdef XP_WIN
skin/windows/ (skin/windows/*.png)
#elifdef XP_MACOSX
skin/osx/ (skin/osx/*.png)
#else
skin/linux/ (skin/linux/*.png)
#endif
# windows overrides
% override chrome://pocket/skin/menuPanel.png chrome://pocket/skin/menuPanel-aero.png os=WINNT osversion=6
% override chrome://pocket/skin/menuPanel.png chrome://pocket/skin/menuPanel-aero.png os=WINNT osversion=6.1
% override chrome://pocket/skin/menuPanel@2x.png chrome://pocket/skin/menuPanel-aero@2x.png os=WINNT osversion=6
% override chrome://pocket/skin/menuPanel@2x.png chrome://pocket/skin/menuPanel-aero@2x.png os=WINNT osversion=6.1
% override chrome://pocket/skin/menuPanel.png chrome://pocket/skin/menuPanel-yosemite.png os=Darwin osversion>=10.10
% override chrome://pocket/skin/menuPanel@2x.png chrome://pocket/skin/menuPanel-yosemite@2x.png os=Darwin osversion>=10.10

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.3 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 2.6 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.5 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 3.2 KiB

Двоичные данные
browser/extensions/pocket/skin/osx/menuPanel.png

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.9 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 3.8 KiB

Просмотреть файл

@ -7,6 +7,8 @@
fill: #fbfbfb;
}
#appMenu-library-pocket-button,
#pageAction-panel-pocket,
#pocket-button {
list-style-image: url("chrome://pocket-shared/skin/pocket.svg");
}
@ -174,53 +176,3 @@
animation-timing-function: ease-out;
}
#pocket-button[cui-areatype="toolbar"][open] {
fill: #ef4056;
}
@media not all and (min-resolution: 1.1dppx) {
#pocket-button[cui-areatype="menu-panel"],
toolbarpaletteitem[place="palette"] > #pocket-button {
list-style-image: url(chrome://pocket/skin/menuPanel.png);
-moz-image-region: rect(0, 32px, 32px, 0);
}
#pocket-button[cui-areatype="menu-panel"][panel-multiview-anchor=true] {
-moz-image-region: rect(32px, 32px, 64px, 0);
}
}
@media (min-resolution: 1.1dppx) {
#pocket-button[cui-areatype="menu-panel"],
toolbarpaletteitem[place="palette"] > #pocket-button {
list-style-image: url(chrome://pocket/skin/menuPanel@2x.png);
-moz-image-region: rect(0px, 64px, 64px, 0);
}
#pocket-button[cui-areatype="menu-panel"][panel-multiview-anchor=true] {
-moz-image-region: rect(64px, 64px, 128px, 0);
}
}
#appMenu-library-pocket-button {
list-style-image: url("chrome://pocket-shared/skin/pocket.svg");
}
#panelMenu_pocket {
list-style-image: url("chrome://pocket/content/panels/img/pocketmenuitem16.png");
}
@media (min-resolution: 2dppx) {
#panelMenu_pocket {
list-style-image: url("chrome://pocket/content/panels/img/pocketmenuitem16@2x.png");
}
#panelMenu_pocket > .toolbarbutton-icon {
width: 16px;
}
}
#pageAction-panel-pocket,
#pocket-button {
list-style-image: url("chrome://pocket-shared/skin/pocket.svg");
}

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 2.0 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 4.9 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 1.3 KiB

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 2.6 KiB

Просмотреть файл

@ -28,8 +28,7 @@ add_task(async function() {
await promisePocketEnabled();
checkWindowProperties(true, ["Pocket", "pktUI", "pktUIMessaging"]);
checkElements(true, ["pocket-button", "panelMenu_pocket",
"panelMenu_pocketSeparator"]);
checkElements(true, ["pocket-button", "appMenu-library-pocket-button"]);
// check context menu exists
info("checking content context menu");
@ -53,7 +52,7 @@ add_task(async function() {
await promisePocketDisabled();
checkWindowProperties(false, ["Pocket", "pktUI", "pktUIMessaging"]);
checkElements(false, ["pocket-button", "panelMenu_pocket", "panelMenu_pocketSeparator",
checkElements(false, ["pocket-button", "appMenu-library-pocket-button",
"context-pocket", "context-savelinktopocket"]);
await promisePocketReset();

Просмотреть файл

@ -1516,10 +1516,6 @@ menuitem[checked="true"].subviewbutton > .menu-iconic-left {
display: none !important;
}
#panelMenu_pocket {
display: none;
}
.subviewbutton.download {
-moz-box-align: start;
min-height: 48px;

Просмотреть файл

@ -16,12 +16,12 @@ def main(output, file):
try:
if config.getint('XRE', 'EnableProfileMigrator') == 1:
flags.add('NS_XRE_ENABLE_PROFILE_MIGRATOR')
except:
except Exception:
pass
try:
if config.getint('Crash Reporter', 'Enabled') == 1:
flags.add('NS_XRE_ENABLE_CRASH_REPORTER')
except:
except Exception:
pass
appdata = dict(("%s:%s" % (s, o), config.get(s, o))
for s in config.sections() for o in config.options(s))

Просмотреть файл

@ -10,7 +10,7 @@ import logging
import os
try:
import hashlib
except:
except ImportError:
hashlib = None

Просмотреть файл

@ -126,7 +126,7 @@ def search_path(mozilla_dir, packages_txt):
try:
for path in handle_package(package[1:]):
yield path
except:
except Exception:
pass
if package[0] == 'packages.txt':

Просмотреть файл

@ -432,7 +432,7 @@ def get_compiler_info(compiler, language):
try:
type = CompilerType(data['COMPILER'])
except:
except Exception:
raise FatalCheckError(
'Unknown compiler or compiler not supported.')

Просмотреть файл

@ -120,7 +120,7 @@ def valid_windows_sdk_dir(compiler, windows_sdk_dir, target_version,
maxver = result.splitlines()[-1]
try:
maxver = int(maxver, 0)
except:
except Exception:
pass
else:
sdks[d] = maxver, sdk

Просмотреть файл

@ -166,7 +166,7 @@ def GetFileHashAndSize(filename):
sha512Hash = shaObj.hexdigest()
size = os.path.getsize(filename)
except:
except Exception:
raise Exception("Unable to get filesize/hash from file: %s" % filename)
return (sha512Hash, size)

Просмотреть файл

@ -26,7 +26,7 @@ def get_program_output(*command):
try:
with open(os.devnull) as stderr:
return subprocess.check_output(command, stderr=stderr)
except:
except Exception:
return ''

Просмотреть файл

@ -141,7 +141,7 @@ def get_file_annotation(filename):
def get_macroassembler_definitions(filename):
try:
fileAnnot = get_file_annotation(filename)
except:
except Exception:
return []
style_section = False

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -16,7 +16,6 @@ DIST_INSTALL = False
NoVisibilityFlags()
CONFIGURE_SUBST_FILES += [
'doxygen.cfg',
'makefiles/test/Makefile',
'tests/src-simple/Makefile',
]

Просмотреть файл

@ -11,6 +11,9 @@ const TEST_URI = "data:text/html;charset=utf-8,<head>" +
"ets.css'></head><body><div></div><span></span></body>";
const {TreeWidget} = require("devtools/client/shared/widgets/TreeWidget");
const kStrictKeyPressEvents = SpecialPowers.getBoolPref(
"dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content");
add_task(async function () {
await addTab("about:blank");
let [host, win, doc] = await createHost("bottom", TEST_URI);
@ -105,7 +108,7 @@ async function testKeyboardInteraction(tree, win) {
info("Pressing down key to select next item");
event = defer();
tree.once("select", pass);
EventUtils.sendKey("DOWN", win);
EventUtils.synthesizeKey("KEY_ArrowDown", {code: "ArrowDown"}, win);
let [name, data, attachment] = await event.promise;
is(name, "select", "Select event was fired after pressing down");
is(data[0], "level1", "Correct item was selected after pressing down");
@ -116,7 +119,7 @@ async function testKeyboardInteraction(tree, win) {
info("Pressing down key again to select next item");
event = defer();
tree.once("select", pass);
EventUtils.sendKey("DOWN", win);
EventUtils.synthesizeKey("KEY_ArrowDown", {code: "ArrowDown"}, win);
[name, data, attachment] = await event.promise;
is(data.length, 2, "Correct level item was selected after second down keypress");
is(data[0], "level1", "Correct parent level");
@ -125,7 +128,7 @@ async function testKeyboardInteraction(tree, win) {
info("Pressing down key again to select next item");
event = defer();
tree.once("select", pass);
EventUtils.sendKey("DOWN", win);
EventUtils.synthesizeKey("KEY_ArrowDown", {code: "ArrowDown"}, win);
[name, data, attachment] = await event.promise;
is(data.length, 3, "Correct level item was selected after third down keypress");
is(data[0], "level1", "Correct parent level");
@ -135,7 +138,7 @@ async function testKeyboardInteraction(tree, win) {
info("Pressing down key again to select next item");
event = defer();
tree.once("select", pass);
EventUtils.sendKey("DOWN", win);
EventUtils.synthesizeKey("KEY_ArrowDown", {code: "ArrowDown"}, win);
[name, data, attachment] = await event.promise;
is(data.length, 2, "Correct level item was selected after fourth down keypress");
is(data[0], "level1", "Correct parent level");
@ -143,7 +146,8 @@ async function testKeyboardInteraction(tree, win) {
// pressing left to check expand collapse feature.
// This does not emit any event, so listening for keypress
tree.root.children.addEventListener("keypress", function () {
const eventToListen = kStrictKeyPressEvents ? "keydown" : "keypress";
tree.root.children.addEventListener(eventToListen, () => {
// executeSoon so that other listeners on the same method are executed first
executeSoon(() => event.resolve(null));
}, {once: true});
@ -151,7 +155,7 @@ async function testKeyboardInteraction(tree, win) {
event = defer();
node = tree._selectedLabel;
ok(node.hasAttribute("expanded"), "Item is expanded before left keypress");
EventUtils.sendKey("LEFT", win);
EventUtils.synthesizeKey("KEY_ArrowLeft", {code: "ArrowLeft"}, win);
await event.promise;
ok(!node.hasAttribute("expanded"), "Item is not expanded after left keypress");
@ -164,7 +168,7 @@ async function testKeyboardInteraction(tree, win) {
// parent node should have no effect of this keypress
node = tree.root.children.firstChild.nextSibling.firstChild;
ok(node.hasAttribute("expanded"), "Parent is expanded");
EventUtils.sendKey("LEFT", win);
EventUtils.synthesizeKey("KEY_ArrowLeft", {code: "ArrowLeft"}, win);
[name, data] = await event.promise;
is(data.length, 3, "Correct level item was selected after second left keypress");
is(data[0], "level1", "Correct parent level");
@ -177,7 +181,7 @@ async function testKeyboardInteraction(tree, win) {
info("Pressing down key to select next item");
event = defer();
tree.once("select", pass);
EventUtils.sendKey("DOWN", win);
EventUtils.synthesizeKey("KEY_ArrowDown", {code: "ArrowDown"}, win);
[name, data, attachment] = await event.promise;
is(data.length, 2, "Correct level item was selected after fifth down keypress");
is(data[0], "level1", "Correct parent level");
@ -185,27 +189,27 @@ async function testKeyboardInteraction(tree, win) {
// collapsing the item to check expand feature.
tree.root.children.addEventListener("keypress", function () {
tree.root.children.addEventListener(eventToListen, () => {
executeSoon(() => event.resolve(null));
}, {once: true});
info("Pressing left key to collapse the item");
event = defer();
node = tree._selectedLabel;
ok(node.hasAttribute("expanded"), "Item is expanded before left keypress");
EventUtils.sendKey("LEFT", win);
EventUtils.synthesizeKey("KEY_ArrowLeft", {code: "ArrowLeft"}, win);
await event.promise;
ok(!node.hasAttribute("expanded"), "Item is collapsed after left keypress");
// pressing right should expand this now.
tree.root.children.addEventListener("keypress", function () {
tree.root.children.addEventListener(eventToListen, () => {
executeSoon(() => event.resolve(null));
}, {once: true});
info("Pressing right key to expend the collapsed item");
event = defer();
node = tree._selectedLabel;
ok(!node.hasAttribute("expanded"), "Item is collapsed before right keypress");
EventUtils.sendKey("RIGHT", win);
EventUtils.synthesizeKey("KEY_ArrowRight", {code: "ArrowRight"}, win);
await event.promise;
ok(node.hasAttribute("expanded"), "Item is expanded after right keypress");
@ -215,11 +219,11 @@ async function testKeyboardInteraction(tree, win) {
node = tree._selectedLabel;
// pressing down again should not change selection
event = defer();
tree.root.children.addEventListener("keypress", function () {
tree.root.children.addEventListener(eventToListen, () => {
executeSoon(() => event.resolve(null));
}, {once: true});
info("Pressing down key on last item of the tree");
EventUtils.sendKey("DOWN", win);
EventUtils.synthesizeKey("KEY_ArrowDown", {code: "ArrowDown"}, win);
await event.promise;
ok(tree.isSelected(["level1.1", "level2", "level3"]),

Просмотреть файл

@ -438,7 +438,7 @@ public:
ParentRunnable(const PrincipalInfo& aPrincipalInfo,
OpenMode aOpenMode,
WriteParams aWriteParams)
const WriteParams& aWriteParams)
: mOwningEventTarget(GetCurrentThreadEventTarget()),
mPrincipalInfo(aPrincipalInfo),
mOpenMode(aOpenMode),
@ -1317,7 +1317,7 @@ public:
ChildRunnable(nsIPrincipal* aPrincipal,
OpenMode aOpenMode,
WriteParams aWriteParams,
const WriteParams& aWriteParams,
ReadParams aReadParams)
: mPrincipal(aPrincipal),
mWriteParams(aWriteParams),

Просмотреть файл

@ -17,6 +17,9 @@
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(runTests, window);
const kStrictKeyPressEvents =
SpecialPowers.getBoolPref("dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content");
function testInitializingUntrustedEvent()
{
const kTests = [
@ -207,86 +210,106 @@ function testInitializingUntrustedEvent()
function testSynthesizedKeyLocation()
{
const kTests = [
{ key: "a", isModifier: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false,
{ key: "a", isModifier: false, isPrintable: true,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_A,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD },
},
{ key: "VK_SHIFT", isModifier: true,
event: { shiftKey: true, ctrlKey: false, altKey: false, metaKey: false,
{ key: "KEY_Shift", isModifier: true, isPrintable: false,
event: { shiftKey: true, ctrlKey: false, altKey: false, metaKey: false, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_SHIFT,
location: KeyboardEvent.DOM_KEY_LOCATION_LEFT },
},
{ key: "VK_SHIFT", isModifier: true,
event: { shiftKey: true, ctrlKey: false, altKey: false, metaKey: false,
{ key: "KEY_Shift", isModifier: true, isPrintable: false,
event: { shiftKey: true, ctrlKey: false, altKey: false, metaKey: false, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_SHIFT,
location: KeyboardEvent.DOM_KEY_LOCATION_RIGHT },
},
{ key: "VK_CONTROL", isModifier: true,
event: { shiftKey: false, ctrlKey: true, altKey: false, metaKey: false,
{ key: "KEY_Control", isModifier: true, isPrintable: false,
event: { shiftKey: false, ctrlKey: true, altKey: false, metaKey: false, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_CONTROL,
location: KeyboardEvent.DOM_KEY_LOCATION_LEFT },
},
{ key: "VK_CONTROL", isModifier: true,
event: { shiftKey: false, ctrlKey: true, altKey: false, metaKey: false,
{ key: "KEY_Control", isModifier: true, isPrintable: false,
event: { shiftKey: false, ctrlKey: true, altKey: false, metaKey: false, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_CONTROL,
location: KeyboardEvent.DOM_KEY_LOCATION_RIGHT },
},
/* XXX Alt key activates menubar even if we consume the key events.
{ key: "VK_ALT", isModifier: true,
event: { shiftKey: false, ctrlKey: false, altKey: true, metaKey: false,
{ key: "KEY_Alt", isModifier: true, isPrintable: false,
event: { shiftKey: false, ctrlKey: false, altKey: true, metaKey: false, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_ALT,
location: KeyboardEvent.DOM_KEY_LOCATION_LEFT },
},
{ key: "VK_ALT", isModifier: true,
event: { shiftKey: false, ctrlKey: false, altKey: true, metaKey: false,
{ key: "KEY_Alt", isModifier: true, isPrintable: false,
event: { shiftKey: false, ctrlKey: false, altKey: true, metaKey: false, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_ALT,
location: KeyboardEvent.DOM_KEY_LOCATION_RIGHT },
},
*/
{ key: "VK_META", isModifier: true,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: true,
{ key: "KEY_Meta", isModifier: true, isPrintable: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: true, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_META,
location: KeyboardEvent.DOM_KEY_LOCATION_LEFT },
},
{ key: "VK_META", isModifier: true,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: true,
{ key: "KEY_Meta", isModifier: true, isPrintable: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: true, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_META,
location: KeyboardEvent.DOM_KEY_LOCATION_RIGHT },
},
{ key: "VK_DOWN", isModifier: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false,
{ key: "KEY_ArrowDown", isModifier: false, isPrintable: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_DOWN,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD },
},
{ key: "VK_DOWN", isModifier: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false,
{ key: "KEY_ArrowDown", isModifier: false, isPrintable: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_DOWN,
location: KeyboardEvent.DOM_KEY_LOCATION_NUMPAD },
},
{ key: "5", isModifier: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false,
{ key: "5", isModifier: false, isPrintable: true,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_5,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD },
},
{ key: "VK_NUMPAD5", isModifier: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false,
{ key: "5", isModifier: false, isPrintable: true,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false, numLockKey: true,
keyCode: KeyboardEvent.DOM_VK_NUMPAD5,
location: KeyboardEvent.DOM_KEY_LOCATION_NUMPAD },
},
{ key: "+", isModifier: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false,
{ key: "+", isModifier: false, isPrintable: true,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_EQUALS,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD },
},
{ key: "VK_ADD", isModifier: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false,
{ key: "+", isModifier: false, isPrintable: true,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false, numLockKey: true,
keyCode: KeyboardEvent.DOM_VK_ADD,
location: KeyboardEvent.DOM_KEY_LOCATION_NUMPAD },
},
{ key: "VK_RETURN", isModifier: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false,
{ key: "KEY_Enter", isModifier: false, isPrintable: true,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_RETURN,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD },
},
{ key: "VK_RETURN", isModifier: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false,
{ key: "KEY_Enter", isModifier: false, isPrintable: true,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_RETURN,
location: KeyboardEvent.DOM_KEY_LOCATION_NUMPAD },
},
{ key: "VK_NUM_LOCK", isModifier: true,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false,
{ key: "KEY_NumLock", isModifier: true, isPrintable: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_NUM_LOCK,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD },
},
{ key: "VK_INSERT", isModifier: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false,
{ key: "KEY_Insert", isModifier: false, isPrintable: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_INSERT,
location: KeyboardEvent.DOM_KEY_LOCATION_STANDARD },
},
{ key: "VK_INSERT", isModifier: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false,
{ key: "KEY_Insert", isModifier: false, isPrintable: false,
event: { shiftKey: false, ctrlKey: false, altKey: false, metaKey: false, numLockKey: false,
keyCode: KeyboardEvent.DOM_VK_INSERT,
location: KeyboardEvent.DOM_KEY_LOCATION_NUMPAD },
},
];
@ -333,10 +356,18 @@ function testSynthesizedKeyLocation()
getLocationName(currentTest.event.location) + ": ";
synthesizeKey(currentTest.key, currentTest.event);
ok(events.keydown, description + "keydown event wasn't fired");
if (currentTest.isModifier) {
todo(events.keypress, description + "keypress event was fired for modifier key");
if (kStrictKeyPressEvents) {
if (currentTest.isPrintable) {
ok(events.keypress, description + "keypress event wasn't fired for printable key");
} else {
ok(!events.keypress, description + "keypress event was fired for non-printable key");
}
} else {
ok(events.keypress, description + "keypress event wasn't fired");
if (currentTest.isModifier) {
todo(events.keypress, description + "keypress event was fired for modifier key");
} else {
ok(events.keypress, description + "keypress event wasn't fired");
}
}
ok(events.keyup, description + "keyup event wasn't fired");
}

Просмотреть файл

@ -8,6 +8,9 @@ const kKeyList = [
{ code: "VK_F11", suppressed: false},
];
const kStrictKeyPressEvents =
SpecialPowers.getBoolPref("dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content");
function frameScript() {
let doc = content.document;
addMessageListener("Test:RequestFullscreen", () => {
@ -82,14 +85,14 @@ async function temporaryRemoveUnexpectedKeyEventCapture(callback) {
"Test:KeyReceived", captureUnexpectedKeyEvent);
}
function receiveExpectedKeyEvents(keyCode) {
function receiveExpectedKeyEvents(aKeyCode, aTrusted) {
return new Promise(resolve => {
let events = ["keydown", "keypress", "keyup"];
let events = kStrictKeyPressEvents && aTrusted ? ["keydown", "keyup"] : ["keydown", "keypress", "keyup"];
function listener({ data }) {
let expected = events.shift();
is(data.type, expected, `Should receive a ${expected} event`);
is(data.keyCode, keyCode,
`Should receive the event with key code ${keyCode}`);
is(data.keyCode, aKeyCode,
`Should receive the event with key code ${aKeyCode}`);
if (!events.length) {
gMessageManager.removeMessageListener("Test:KeyReceived", listener);
resolve();
@ -148,7 +151,7 @@ add_task(async function() {
info("Dispatch untrusted key events from content");
await temporaryRemoveUnexpectedKeyEventCapture(async function() {
let promiseExpectedKeyEvents = receiveExpectedKeyEvents(keyCode);
let promiseExpectedKeyEvents = receiveExpectedKeyEvents(keyCode, false);
gMessageManager.sendAsyncMessage("Test:DispatchUntrustedKeyEvents", code);
await promiseExpectedKeyEvents;
});
@ -157,7 +160,7 @@ add_task(async function() {
await temporaryRemoveUnexpectedFullscreenChangeCapture(async function() {
await temporaryRemoveUnexpectedKeyEventCapture(async function() {
let promiseExpectedKeyEvents = suppressed ?
Promise.resolve() : receiveExpectedKeyEvents(keyCode);
Promise.resolve() : receiveExpectedKeyEvents(keyCode, true);
EventUtils.synthesizeKey(code, {});
await promiseExpectedKeyEvents;
let state = await promiseOneMessage("Test:FullscreenChanged");

Просмотреть файл

@ -35,6 +35,8 @@ SimpleTest.waitForFocus(function() {
const defaultMinimum = "NaN";
const defaultMaximum = "NaN";
const defaultStep = 1;
const kStrictKeyPressEvents =
SpecialPowers.getBoolPref("dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content");
// Helpers:
// For the sake of simplicity, we do not currently support fractional value,
@ -141,7 +143,7 @@ function expectedValueAfterStepUpOrDown(stepFactor, element) {
}
function expectedValAfterKeyEvent(key, element) {
return expectedValueAfterStepUpOrDown(key == "VK_UP" ? 1 : -1, element);
return expectedValueAfterStepUpOrDown(key == "KEY_ArrowUp" ? 1 : -1, element);
}
function test() {
@ -154,7 +156,7 @@ function test() {
var defaultValue = 0;
var oldVal, expectedVal;
for (key of ["VK_UP", "VK_DOWN"]) {
for (key of ["KEY_ArrowUp", "KEY_ArrowDown"]) {
// Start at middle:
oldVal = elem.value = -1;
expectedVal = expectedValAfterKeyEvent(key, elem);
@ -189,10 +191,9 @@ function test() {
is(elem.value, String(expectedVal), "Test repeat of " + key + " for number control");
// Test preventDefault():
elem.addEventListener("keypress", function(evt) {
elem.addEventListener(kStrictKeyPressEvents ? "keydown" : "keypress", function(evt) {
evt.preventDefault();
elem.removeEventListener("keypress", arguments.callee);
});
}, {once: true});
oldVal = elem.value = 0;
expectedVal = 0;
synthesizeKey(key, {});

Просмотреть файл

@ -23,10 +23,15 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=1295719
SimpleTest.waitForExplicitFinish();
SimpleTest.waitForFocus(runTests);
const kStrictKeyPressEvents =
SpecialPowers.getBoolPref("dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content");
function runTests() {
let number = window.document.getElementById("test_number");
let range = window.document.getElementById("test_range");
let waiting_event_sequence = ["keydown", "keypress", "input", "change"];
let waiting_event_sequence =
kStrictKeyPressEvents ? ["keydown", "input", "change"] :
["keydown", "keypress", "input", "change"];
let waiting_event_idx = 0;
waiting_event_sequence.forEach((eventType) => {
@ -35,7 +40,7 @@ function runTests() {
is(waiting_event, eventType, "Waiting " + waiting_event + " get " + eventType);
// Input element will fire input and change events when handling keypress
// with keycode=arrows. When user press and hold the keyboard, we expect
// that input element repeatedly fires "keydown", "keypress", "input", and
// that input element repeatedly fires "keydown"(, "keypress"), "input", and
// "change" events until user release the keyboard. Using
// waiting_event_sequence as a circular buffer and reset waiting_event_idx
// when it point to the end of buffer.
@ -49,15 +54,15 @@ function runTests() {
});
number.focus();
synthesizeKey("VK_DOWN", {type: "keydown"});
synthesizeKey("VK_DOWN", {type: "keydown"});
synthesizeKey("VK_DOWN", {type: "keyup"});
synthesizeKey("KEY_ArrowDown", {type: "keydown", code: "ArrowDown"});
synthesizeKey("KEY_ArrowDown", {type: "keydown", code: "ArrowDown"});
synthesizeKey("KEY_ArrowDown", {type: "keyup", code: "ArrowDown"});
number.blur();
range.focus();
waiting_event_idx = 0;
synthesizeKey("VK_DOWN", {type: "keydown"});
synthesizeKey("VK_DOWN", {type: "keydown"});
synthesizeKey("VK_DOWN", {type: "keyup"});
synthesizeKey("KEY_ArrowDown", {type: "keydown", code: "ArrowDown"});
synthesizeKey("KEY_ArrowDown", {type: "keydown", code: "ArrowDown"});
synthesizeKey("KEY_ArrowDown", {type: "keyup", code: "ArrowDown"});
SimpleTest.finish();
}

Просмотреть файл

@ -22,41 +22,46 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=633058
SimpleTest.waitForExplicitFinish();
// Turn off Spatial Navigation so that the 'keypress' event fires.
const kStrictKeyPressEvents =
SpecialPowers.getBoolPref("dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content");
// Turn off Spatial Navigation so that the 'keypress' event fires in traditional behavior.
SimpleTest.waitForFocus(function() {
SpecialPowers.pushPrefEnv({"set":[['snav.enabled', false]]}, startTest);
});
function startTest() {
var nbExpectedKeyPress = 8;
var nbExpectedKeyDown = 8;
var nbExpectedKeyPress = kStrictKeyPressEvents ? 1 : 8;
var inputGotKeyPress = 0;
var inputGotKeyDown = 0;
var divGotKeyPress = 0;
var divGotKeyDown = 0;
var input = document.getElementsByTagName('input')[0];
var content = document.getElementById('content');
content.addEventListener('keypress', function() {
divGotKeyPress++;
if (divGotKeyPress == nbExpectedKeyPress) {
is(inputGotKeyPress, nbExpectedKeyPress, "input got all keypress events");
is(divGotKeyPress, nbExpectedKeyPress, "div got all keypress events");
SimpleTest.finish();
}
});
input.addEventListener('keypress', function() {
inputGotKeyPress++;
});
content.addEventListener("keydown", () => { divGotKeyDown++; });
content.addEventListener("keypress", () => { divGotKeyPress++; });
input.addEventListener("keydown", () => { inputGotKeyDown++; });
input.addEventListener("keypress", () => { inputGotKeyPress++; });
input.addEventListener('focus', function() {
synthesizeKey('VK_UP', {});
synthesizeKey('VK_LEFT', {});
synthesizeKey('VK_RIGHT', {});
synthesizeKey('VK_DOWN', {});
synthesizeKey('VK_BACK_SPACE', {});
synthesizeKey('VK_DELETE', {});
synthesizeKey('VK_ESCAPE', {});
synthesizeKey('VK_RETURN', {});
SimpleTest.executeSoon(() => {
synthesizeKey('KEY_ArrowUp', {});
synthesizeKey('KEY_ArrowLeft', {});
synthesizeKey('KEY_ArrowRight', {});
synthesizeKey('KEY_ArrowDown', {});
synthesizeKey('KEY_Backspace', {});
synthesizeKey('KEY_Delete', {});
synthesizeKey('KEY_Escape', {});
synthesizeKey('KEY_Enter', {}); // Will dispatch keypress event even in strict behavior.
is(inputGotKeyDown, nbExpectedKeyDown, "input got all keydown events");
is(inputGotKeyPress, nbExpectedKeyPress, "input got all keypress events");
is(divGotKeyDown, nbExpectedKeyDown, "div got all keydown events");
is(divGotKeyPress, nbExpectedKeyPress, "div got all keypress events");
SimpleTest.finish();
});
}, {once: true});
input.focus();
}

Просмотреть файл

@ -1,12 +0,0 @@
/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*/
// Used internally by Gecko
dictionary SettingChangeNotification {
DOMString key = "";
any value;
boolean isInternalChange = false;
};

Просмотреть файл

@ -265,9 +265,6 @@ with Files("SVG*"):
with Files("ScriptProcessorNode.webidl"):
BUG_COMPONENT = ("Core", "Web Audio")
# TODO: SettingChangeNotification
# are FirefoxOS::*, leaving as Core::DOM
with Files("Selection.webidl"):
BUG_COMPONENT = ("Core", "Selection")
@ -766,7 +763,6 @@ WEBIDL_FILES = [
'ServiceWorkerContainer.webidl',
'ServiceWorkerGlobalScope.webidl',
'ServiceWorkerRegistration.webidl',
'SettingChangeNotification.webidl',
'ShadowRoot.webidl',
'SharedWorker.webidl',
'SharedWorkerGlobalScope.webidl',

Просмотреть файл

@ -5760,13 +5760,6 @@ nsCSSFrameConstructor::FindSVGData(Element* aElement,
return &sTSpanData;
}
return &sSuppressData;
} else if (aTag == nsGkAtoms::text) {
static const FrameConstructionData sTextData =
FCDATA_WITH_WRAPPING_BLOCK(FCDATA_DISALLOW_OUT_OF_FLOW |
FCDATA_ALLOW_BLOCK_STYLES,
NS_NewSVGTextFrame,
nsCSSAnonBoxes::mozSVGText);
return &sTextData;
} else if (aTag == nsGkAtoms::tspan ||
aTag == nsGkAtoms::textPath) {
return &sSuppressData;
@ -5786,6 +5779,11 @@ nsCSSFrameConstructor::FindSVGData(Element* aElement,
SIMPLE_SVG_CREATE(path, NS_NewSVGGeometryFrame),
SIMPLE_SVG_CREATE(defs, NS_NewSVGContainerFrame),
SIMPLE_SVG_CREATE(generic_, NS_NewSVGGenericContainerFrame),
{ &nsGkAtoms::text,
FCDATA_WITH_WRAPPING_BLOCK(FCDATA_DISALLOW_OUT_OF_FLOW |
FCDATA_ALLOW_BLOCK_STYLES,
NS_NewSVGTextFrame,
nsCSSAnonBoxes::mozSVGText) },
{ &nsGkAtoms::foreignObject,
FCDATA_WITH_WRAPPING_BLOCK(FCDATA_DISALLOW_OUT_OF_FLOW,
NS_NewSVGForeignObjectFrame,

Просмотреть файл

@ -51,6 +51,9 @@ const kIsWin = navigator.platform.indexOf("Win") == 0;
const kIsMac = navigator.platform.indexOf("Mac") == 0;
const kIsAndroid = navigator.appVersion.indexOf("Android") != 0;
const kStrictKeyPressEvents =
SpecialPowers.getBoolPref("dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content");
function runTests()
{
var doPreventDefault = false;
@ -85,7 +88,7 @@ function runTests()
keyDownEventConsumed = false;
}
function check(aExpectingKeydownConsumed, aDescription)
function check(aExpectingKeydownConsumed, aIsPrintableKey, aDescription)
{
if (doPreventDefault) {
ok(!keyPressEventFired, "keypress event shouldn't be fired for " + aDescription +
@ -99,7 +102,15 @@ function runTests()
ok(!keyDownEventConsumedByJS, "keydown event of " + aDescription + " shouldn't be consumed in content level");
ok(keyDownEventConsumed, "keydown event of " + aDescription + " should be consumed in system level");
} else {
ok(keyPressEventFired, "keypress event should be fired for " + aDescription);
if (aIsPrintableKey) {
ok(keyPressEventFired, "keypress event should be fired for printable key, " + aDescription);
} else {
if (kStrictKeyPressEvents) {
ok(!keyPressEventFired, "keypress event shouldn't be fired for non-printable key, " + aDescription);
} else {
ok(keyPressEventFired, "keypress event should be fired even for non-printable key, " + aDescription);
}
}
ok(!keyDownEventConsumedByJS, "keydown event of " + aDescription + " shouldn't be consumed in content level");
ok(!keyDownEventConsumed, "keydown event of " + aDescription + " should be consumed in system level");
}
@ -116,67 +127,67 @@ function runTests()
doPreventDefault = consume;
for (var i = 0; i < listbox.options.length + 1; i++) {
reset()
synthesizeKey("VK_DOWN", {});
check(true, "DownArrow key on listbox #" + i);
synthesizeKey("KEY_ArrowDown", {code: "ArrowDown"});
check(true, false, "DownArrow key on listbox #" + i);
}
for (var i = 0; i < listbox.options.length + 1; i++) {
reset()
synthesizeKey("VK_UP", {});
check(true, "UpArrow key on listbox #" + i);
synthesizeKey("KEY_ArrowUp", {code: "ArrowUp"});
check(true, false, "'ArrowUp' key on listbox #" + i);
}
for (var i = 0; i < listbox.options.length + 1; i++) {
reset()
synthesizeKey("VK_RIGHT", {});
check(true, "RightArrow key on listbox #" + i);
synthesizeKey("KEY_ArrowRight", {code: "ArrowRight"});
check(true, false, "'ArrowRight' key on listbox #" + i);
}
for (var i = 0; i < listbox.options.length + 1; i++) {
reset()
synthesizeKey("VK_LEFT", {});
check(true, "LeftArrow key on listbox #" + i);
synthesizeKey("KEY_ArrowLeft", {code: "ArrowLeft"});
check(true, false, "'ArrowLeft' key on listbox #" + i);
}
for (var i = 0; i < 4; i++) {
reset()
synthesizeKey("VK_PAGE_DOWN", {});
check(true, "PageDown key on listbox #" + i);
synthesizeKey("KEY_PageDown", {code: "PageDown"});
check(true, false, "'PageDown' key on listbox #" + i);
}
for (var i = 0; i < 4; i++) {
reset()
synthesizeKey("VK_PAGE_UP", {});
check(true, "PageUp key on listbox #" + i);
synthesizeKey("KEY_PageUp", {code: "PageUp"});
check(true, false, "'PageUp' key on listbox #" + i);
}
for (var i = 0; i < 2; i++) {
reset()
synthesizeKey("VK_END", {});
check(true, "End key on listbox #" + i);
synthesizeKey("KEY_End", {code: "End"});
check(true, false, "'End' key on listbox #" + i);
}
for (var i = 0; i < 2; i++) {
reset()
synthesizeKey("VK_HOME", {});
check(true, "Home key on listbox #" + i);
synthesizeKey("KEY_Home", {code: "Home"});
check(true, false, "'Home' key on listbox #" + i);
}
reset()
synthesizeKey("VK_RETURN", {});
check(false, "Enter key on listbox");
synthesizeKey("KEY_Enter", {code: "Enter"});
check(false, true, "'Enter' key on listbox");
reset()
synthesizeKey("VK_ESCAPE", {});
check(false, "Esc key on listbox");
synthesizeKey("KEY_Escape", {code: "Escape"});
check(false, false, "'Escape' key on listbox");
reset()
synthesizeKey("VK_F4", {});
check(false, "F4 key on listbox");
synthesizeKey("KEY_F4", {code: "F4"});
check(false, false, "F4 key on listbox");
reset()
synthesizeKey("a", {});
check(false, "'A' key on listbox");
synthesizeKey("a", {code: "KeyA"});
check(false, true, "'A' key on listbox");
});
listbox.removeEventListener("keydown", onKeydown);
@ -196,67 +207,67 @@ function runTests()
doPreventDefault = consume;
for (var i = 0; i < multipleListbox.options.length + 1; i++) {
reset()
synthesizeKey("VK_DOWN", {});
check(true, "DownArrow key on multiple listbox #" + i);
synthesizeKey("KEY_ArrowDown", {code: "ArrowDown"});
check(true, false, "'ArrowDown' key on multiple listbox #" + i);
}
for (var i = 0; i < multipleListbox.options.length + 1; i++) {
reset()
synthesizeKey("VK_UP", {});
check(true, "UpArrow key on multiple listbox #" + i);
synthesizeKey("KEY_ArrowUp", {code: "ArrowUp"});
check(true, false, "'ArrowUp' key on multiple listbox #" + i);
}
for (var i = 0; i < multipleListbox.options.length + 1; i++) {
reset()
synthesizeKey("VK_RIGHT", {});
check(true, "RightArrow key on multiple listbox #" + i);
synthesizeKey("KEY_ArrowRight", {code: "ArrowRight"});
check(true, false, "'ArrowRight' key on multiple listbox #" + i);
}
for (var i = 0; i < multipleListbox.options.length + 1; i++) {
reset()
synthesizeKey("VK_LEFT", {});
check(true, "LeftArrow key on multiple listbox #" + i);
synthesizeKey("KEY_ArrowLeft", {code: "ArrowLeft"});
check(true, false, "'ArrowLeft' key on multiple listbox #" + i);
}
for (var i = 0; i < 4; i++) {
reset()
synthesizeKey("VK_PAGE_DOWN", {});
check(true, "PageDown key on multiple listbox #" + i);
synthesizeKey("KEY_PageDown", {code: "PageDown"});
check(true, false, "'PageDown' key on multiple listbox #" + i);
}
for (var i = 0; i < 4; i++) {
reset()
synthesizeKey("VK_PAGE_UP", {});
check(true, "PageUp key on multiple listbox #" + i);
synthesizeKey("KEY_PageUp", {code: "PageUp"});
check(true, false, "'PageUp' key on multiple listbox #" + i);
}
for (var i = 0; i < 2; i++) {
reset()
synthesizeKey("VK_END", {});
check(true, "End key on multiple listbox #" + i);
synthesizeKey("KEY_End", {code: "End"});
check(true, false, "'End' key on multiple listbox #" + i);
}
for (var i = 0; i < 2; i++) {
reset()
synthesizeKey("VK_HOME", {});
check(true, "Home key on multiple listbox #" + i);
synthesizeKey("KEY_Home", {code: "Home"});
check(true, false, "'Home' key on multiple listbox #" + i);
}
reset()
synthesizeKey("VK_RETURN", {});
check(true, "Enter key on multiple listbox");
synthesizeKey("KEY_Enter", {code: "Enter"});
check(true, true, "'Enter' key on multiple listbox");
reset()
synthesizeKey("VK_ESCAPE", {});
check(false, "Esc key on multiple listbox");
synthesizeKey("KEY_Escape", {code: "Escape"});
check(false, false, "'Escape' key on multiple listbox");
reset()
synthesizeKey("VK_F4", {});
check(false, "F4 key on multiple listbox");
synthesizeKey("KEY_F4", {code: "F4"});
check(false, false, "'F4' key on multiple listbox");
reset()
synthesizeKey("a", {});
check(false, "'A' key on multiple listbox");
synthesizeKey("a", {code: "KeyA"});
check(false, true, "'A' key on multiple listbox");
});
multipleListbox.removeEventListener("keydown", onKeydown);
@ -277,14 +288,14 @@ function runTests()
if (!kIsMac) {
for (var i = 0; i < combobox.options.length + 1; i++) {
reset()
synthesizeKey("VK_DOWN", {});
check(true, "DownArrow key on combobox #" + i);
synthesizeKey("KEY_ArrowDown", {code: "ArrowDown"});
check(true, false, "'ArrowDown' key on combobox #" + i);
}
for (var i = 0; i < combobox.options.length + 1; i++) {
reset()
synthesizeKey("VK_UP", {});
check(true, "UpArrow key on combobox #" + i);
synthesizeKey("KEY_ArrowUp", {code: "ArrowUp"});
check(true, false, "'ArrowUp' key on combobox #" + i);
}
} else {
todo(false, "Make this test work on OSX");
@ -292,57 +303,57 @@ function runTests()
for (var i = 0; i < combobox.options.length + 1; i++) {
reset()
synthesizeKey("VK_RIGHT", {});
check(true, "RightArrow key on combobox #" + i);
synthesizeKey("KEY_ArrowRight", {code: "ArrowRight"});
check(true, false, "'ArrowRight' key on combobox #" + i);
}
for (var i = 0; i < combobox.options.length + 1; i++) {
reset()
synthesizeKey("VK_LEFT", {});
check(true, "LeftArrow key on combobox #" + i);
synthesizeKey("KEY_ArrowLeft", {code: "ArrowLeft"});
check(true, false, "'ArrowLeft' key on combobox #" + i);
}
for (var i = 0; i < 4; i++) {
reset()
synthesizeKey("VK_PAGE_DOWN", {});
check(true, "PageDown key on combobox #" + i);
synthesizeKey("KEY_PageDown", {code: "PageDown"});
check(true, false, "'PageDown' key on combobox #" + i);
}
for (var i = 0; i < 4; i++) {
reset()
synthesizeKey("VK_PAGE_UP", {});
check(true, "PageUp key on combobox #" + i);
synthesizeKey("KEY_PageUp", {code: "PageUp"});
check(true, false, "'PageUp' key on combobox #" + i);
}
for (var i = 0; i < 2; i++) {
reset()
synthesizeKey("VK_END", {});
check(true, "End key on combobox #" + i);
synthesizeKey("KEY_End", {code: "End"});
check(true, false, "'End' key on combobox #" + i);
}
for (var i = 0; i < 2; i++) {
reset()
synthesizeKey("VK_HOME", {});
check(true, "Home key on combobox #" + i);
synthesizeKey("KEY_Home", {code: "Home"});
check(true, false, "'Home' key on combobox #" + i);
}
reset()
synthesizeKey("VK_RETURN", {});
check(false, "Enter key on combobox");
synthesizeKey("KEY_Enter", {code: "Enter"});
check(false, true, "'Enter' key on combobox");
reset()
synthesizeKey("VK_ESCAPE", {});
check(true, "Esc key on combobox");
synthesizeKey("KEY_Escape", {code: "Escape"});
check(true, false, "'Escape' key on combobox");
if (!kIsWin) {
reset()
synthesizeKey("VK_F4", {});
check(false, "F4 key on combobox");
synthesizeKey("KEY_F4", {code: "F4"});
check(false, false, "'F4' key on combobox");
}
reset()
synthesizeKey("a", {});
check(false, "'A' key on combobox");
synthesizeKey("a", {code: "KeyA"});
check(false, true, "'A' key on combobox");
});
function finish()
@ -365,74 +376,74 @@ function runTests()
{
testOpenDropDown(function () {
reset()
synthesizeKey("VK_DOWN", { altKey: true });
synthesizeKey("KEY_ArrowDown", {code: "ArrowDown", altKey: true});
}, function () {
check(true, "Alt + DownArrow key on combobox at opening dropdown");
check(true, false, "Alt + DownArrow key on combobox at opening dropdown");
for (var i = 0; i < combobox.options.length + 1; i++) {
reset()
synthesizeKey("VK_DOWN", {});
check(true, "DownArrow key on combobox during dropdown open #" + i);
synthesizeKey("KEY_ArrowDown", {code: "ArrowDown"});
check(true, false, "'ArrowDown' key on combobox during dropdown open #" + i);
}
for (var i = 0; i < combobox.options.length + 1; i++) {
reset()
synthesizeKey("VK_UP", {});
check(true, "UpArrow key on combobox during dropdown open #" + i);
synthesizeKey("KEY_ArrowUp", {code: "ArrowUp"});
check(true, false, "'ArrowUp' key on combobox during dropdown open #" + i);
}
for (var i = 0; i < combobox.options.length + 1; i++) {
reset()
synthesizeKey("VK_RIGHT", {});
check(true, "RightArrow key on combobox during dropdown open #" + i);
synthesizeKey("KEY_ArrowRight", {code: "ArrowRight"});
check(true, false, "'ArrowRight' key on combobox during dropdown open #" + i);
}
for (var i = 0; i < combobox.options.length + 1; i++) {
reset()
synthesizeKey("VK_LEFT", {});
check(true, "LeftArrow key on combobox during dropdown open #" + i);
synthesizeKey("KEY_ArrowLeft", {code: "ArrowLeft"});
check(true, false, "'ArrowLeft' key on combobox during dropdown open #" + i);
}
for (var i = 0; i < 4; i++) {
reset()
synthesizeKey("VK_PAGE_DOWN", {});
check(true, "PageDown key on combobox during dropdown open #" + i);
synthesizeKey("KEY_PageDown", {code: "PageDown"});
check(true, false, "'PageDown' key on combobox during dropdown open #" + i);
}
for (var i = 0; i < 4; i++) {
reset()
synthesizeKey("VK_PAGE_UP", {});
check(true, "PageUp key on combobox during dropdown open #" + i);
synthesizeKey("KEY_PageUp", {code: "PageUp"});
check(true, false, "'PageUp' key on combobox during dropdown open #" + i);
}
for (var i = 0; i < 2; i++) {
reset()
synthesizeKey("VK_END", {});
check(true, "End key on combobox during dropdown open #" + i);
synthesizeKey("KEY_End", {code: "End"});
check(true, false, "'End' key on combobox during dropdown open #" + i);
}
for (var i = 0; i < 2; i++) {
reset()
synthesizeKey("VK_HOME", {});
check(true, "Home key on combobox during dropdown open #" + i);
synthesizeKey("KEY_Home", {code: "Home"});
check(true, false, "'Home' key on combobox during dropdown open #" + i);
}
testCloseDropDown(function () {
reset()
synthesizeKey("VK_RETURN", {});
synthesizeKey("KEY_Enter", {code: "Enter"});
}, function () {
testOpenDropDown(function () {
check(true, "Enter key on combobox at closing dropdown");
check(true, true, "'Enter' key on combobox at closing dropdown");
synthesizeKey("VK_UP", { altKey: true });
synthesizeKey("KEY_ArrowUp", {code: "ArrowUp", altKey: true});
}, function () {
check(true, "Alt + UpArrow key on combobox at opening dropdown");
check(true, false, "'Alt' + 'ArrowUp' key on combobox at opening dropdown");
testCloseDropDown(function () {
reset()
synthesizeKey("VK_ESCAPE", {});
synthesizeKey("KEY_Escape", {code: "Escape"});
}, function () {
check(true, "Esc key on combobox at closing dropdown");
check(true, false, "'Escape' key on combobox at closing dropdown");
// F4 key opens/closes dropdown only on Windows. So, other platforms
// don't need to do anymore.
@ -443,15 +454,15 @@ function runTests()
testOpenDropDown(function () {
reset()
synthesizeKey("VK_F4", {});
synthesizeKey("KEY_F4", {code: "F4"});
}, function () {
check(true, "F4 key on combobox at opening dropdown on Windows");
check(true, false, "'F4' key on combobox at opening dropdown on Windows");
testCloseDropDown(function () {
reset()
synthesizeKey("VK_F4", {});
synthesizeKey("KEY_F4", {code: "F4"});
}, function () {
check(true, "F4 key on combobox at closing dropdown on Windows");
check(true, false, "'F4' key on combobox at closing dropdown on Windows");
aCallback();
return;

Просмотреть файл

@ -134,7 +134,7 @@ class ReftestServer:
rtncode = self._process.poll()
if (rtncode is None):
self._process.terminate()
except:
except Exception:
self.automation.log.info("Failed to shutdown server at %s" %
self.shutdownURL)
traceback.print_exc()
@ -255,7 +255,7 @@ class RemoteReftest(RefTest):
self.log.info("Failed to kill process %d: %s" % (proc.pid, str(e)))
else:
self.log.info("NOT killing %s (not an orphan?)" % procd)
except:
except Exception:
# may not be able to access process info for all processes
continue
@ -367,7 +367,7 @@ class RemoteReftest(RefTest):
try:
os.remove(self.pidFile)
os.remove(self.pidFile + ".xpcshell.pid")
except:
except Exception:
print ("Warning: cleaning up pidfile '%s' was unsuccessful "
"from the test harness" % self.pidFile)
@ -453,7 +453,7 @@ def run_test_harness(parser, options):
retVal = reftest.verifyTests(options.tests, options)
else:
retVal = reftest.runTests(options.tests, options)
except:
except Exception:
print "Automation Error: Exception caught while running tests"
traceback.print_exc()
retVal = 1

Просмотреть файл

@ -565,7 +565,7 @@ class RefTest(object):
for jobArgs in perProcessArgs:
try:
jobArgs.remove("--run-tests-in-parallel")
except:
except Exception:
pass
jobArgs[0:0] = [sys.executable, "-u"]

Просмотреть файл

@ -494,6 +494,13 @@
]
}
},
"meh": {
"default": {
"visibleDefaultEngines": [
"google", "yahoo-espanol", "bing", "amazondotcom", "twitter", "wikipedia-es"
]
}
},
"ml": {
"default": {
"visibleDefaultEngines": [

Просмотреть файл

@ -444,7 +444,6 @@ def watchman_hg(hg_version, hg_config, watchman):
# Miscellaneous programs
# ==============================================================
check_prog('DOXYGEN', ('doxygen',), allow_missing=True)
check_prog('XARGS', ('xargs',))
@depends(target)

Просмотреть файл

@ -3862,32 +3862,6 @@ fi])
AC_DEFINE_UNQUOTED(MOZ_USER_DIR,"$MOZ_USER_DIR")
dnl ========================================================
dnl = Doxygen configuration
dnl ========================================================
dnl Use commas to specify multiple dirs to this arg
MOZ_DOC_INPUT_DIRS='./dist/include ./dist/idl'
MOZ_ARG_WITH_STRING(doc-input-dirs,
[ --with-doc-input-dirs=DIRS
Header/idl dirs to create docs from],
[ MOZ_DOC_INPUT_DIRS=`echo "$withval" | sed "s/,/ /g"` ] )
AC_SUBST(MOZ_DOC_INPUT_DIRS)
dnl Use commas to specify multiple dirs to this arg
MOZ_DOC_INCLUDE_DIRS='./dist/include ./dist/include/nspr'
MOZ_ARG_WITH_STRING(doc-include-dirs,
[ --with-doc-include-dirs=DIRS
Include dirs to preprocess doc headers],
[ MOZ_DOC_INCLUDE_DIRS=`echo "$withval" | sed "s/,/ /g"` ] )
AC_SUBST(MOZ_DOC_INCLUDE_DIRS)
MOZ_DOC_OUTPUT_DIR='./dist/docs'
MOZ_ARG_WITH_STRING(doc-output-dir,
[ --with-doc-output-dir=DIR
Dir to generate docs into],
[ MOZ_DOC_OUTPUT_DIR=$withval ] )
AC_SUBST(MOZ_DOC_OUTPUT_DIR)
if test -z "$SKIP_COMPILER_CHECKS"; then
dnl ========================================================
dnl =

Просмотреть файл

@ -4,7 +4,7 @@
try:
from setuptools import setup
except:
except ImportError:
from distutils.core import setup

Просмотреть файл

@ -18,7 +18,7 @@ class NullTerminal(object):
self.stream = stream or sys.__stdout__
try:
self.is_a_tty = os.isatty(self.stream.fileno())
except:
except Exception:
self.is_a_tty = False
class NullCallableString(unicode):

Просмотреть файл

@ -637,7 +637,7 @@ class Certificate(object):
except ValueError:
try:
featureValue = namedFeatures[feature]
except:
except Exception:
raise UnknownTLSFeature(feature)
sequence.setComponentByPosition(len(sequence),
univ.Integer(featureValue))

Просмотреть файл

@ -106,6 +106,19 @@ talos-dromaeojs-stylo-disabled:
- --add-option
- --webServer,localhost
talos-flex:
description: "Talos XUL flexbox emulation enabled"
try-name: flex
treeherder-symbol: T(f)
tier: 3
run-on-projects: ['mozilla-central', 'try']
max-run-time: 1800
mozharness:
extra-options:
- --suite=flex
- --add-option
- --webServer,localhost
talos-g1:
description: "Talos g1"
try-name: g1

Просмотреть файл

@ -54,6 +54,7 @@ linux64/opt:
- linux-talos-stylo-disabled
- awsy
- mochitest-headless
- linux-talos-flex
linux64-nightly/opt:
build-platform: linux64-nightly/opt
test-sets:

Просмотреть файл

@ -151,6 +151,9 @@ linux-talos-profiling:
- talos-tp5o-profiling
- talos-tp6-profiling
linux-talos-flex:
- talos-flex
windows-qr-tests:
- crashtest
- mochitest-gpu

Просмотреть файл

@ -141,6 +141,6 @@ def create_task(session, task_id, label, task_def):
if res.status_code != 200:
try:
logger.error(res.json()['message'])
except:
except Exception:
logger.error(res.text)
res.raise_for_status()

Просмотреть файл

@ -106,7 +106,7 @@ def calculate_time(options):
if res.status_code != 200:
try:
logger.error(res.json()['message'])
except:
except Exception:
logger.error(res.text)
res.raise_for_status()
# the task's `created` time is close to when the hook ran, although that

Просмотреть файл

@ -193,7 +193,7 @@ class TcpTransport(object):
self._sock.settimeout(self.socket_timeout)
self._sock.connect((self.host, self.port))
except:
except Exception:
# Unset so that the next attempt to send will cause
# another connection attempt.
self._sock = None

Просмотреть файл

@ -144,7 +144,7 @@ class CommonTestCase(unittest.TestCase):
raise
except _ExpectedFailure as e:
expected_failure(result, e.exc_info)
except:
except Exception:
self._enter_pm()
result.addError(self, sys.exc_info())
else:
@ -152,7 +152,7 @@ class CommonTestCase(unittest.TestCase):
if self.expected == 'fail':
try:
testMethod()
except:
except Exception:
raise _ExpectedFailure(sys.exc_info())
raise _UnexpectedSuccess
else:
@ -175,7 +175,7 @@ class CommonTestCase(unittest.TestCase):
result.addFailure(self, sys.exc_info())
except SkipTest as e:
self._addSkip(result, str(e))
except:
except Exception:
self._enter_pm()
result.addError(self, sys.exc_info())
else:
@ -184,7 +184,7 @@ class CommonTestCase(unittest.TestCase):
if self.expected == "fail":
try:
self.tearDown()
except:
except Exception:
raise _ExpectedFailure(sys.exc_info())
else:
self.tearDown()
@ -192,7 +192,7 @@ class CommonTestCase(unittest.TestCase):
raise
except _ExpectedFailure as e:
expected_failure(result, e.exc_info)
except:
except Exception:
self._enter_pm()
result.addError(self, sys.exc_info())
success = False

Просмотреть файл

@ -912,7 +912,7 @@ class BaseMarionetteTestRunner(object):
# we want to display current test results.
# so we keep the exception to raise it later.
interrupted = sys.exc_info()
except:
except Exception:
# For any other exception we return immediately and have to
# cleanup running processes
self.cleanup()
@ -929,7 +929,7 @@ class BaseMarionetteTestRunner(object):
self.logger.info("Using shuffle seed: %d" % self.shuffle_seed)
self.logger.suite_end()
except:
except Exception:
# raise only the exception if we were not interrupted
if not interrupted:
raise

Просмотреть файл

@ -201,7 +201,7 @@ class GeckoviewTestRunner:
finally:
try:
shutil.rmtree(dump_dir)
except:
except Exception:
self.log.warn("unable to remove directory: %s" % dump_dir)
return crashed
@ -233,7 +233,7 @@ def run_test_harness(log, parser, options):
except KeyboardInterrupt:
log.info("rungeckoview.py | Received keyboard interrupt")
result = -1
except:
except Exception:
traceback.print_exc()
log.error(
"rungeckoview.py | Received unexpected exception while running tests")

Просмотреть файл

@ -479,7 +479,7 @@ class RobocopTestRunner(MochitestDesktop):
# terse.
if self.options.log_mach is None:
self.printDeviceInfo(printLogcat=True)
except:
except Exception:
self.log.error(
"Automation Error: Exception caught while running tests")
traceback.print_exc()
@ -567,7 +567,7 @@ def run_test_harness(parser, options):
except KeyboardInterrupt:
robocop.log.info("runrobocop.py | Received keyboard interrupt")
runResult = -1
except:
except Exception:
traceback.print_exc()
robocop.log.error(
"runrobocop.py | Received unexpected exception while running tests")

Просмотреть файл

@ -519,7 +519,7 @@ class MochitestServer(object):
# https://bugzilla.mozilla.org/show_bug.cgi?id=912285
# self._process.terminate()
self._process.proc.terminate()
except:
except Exception:
self._log.info("Failed to stop web server on %s" % self.shutdownURL)
traceback.print_exc()
self._process.kill()
@ -1173,7 +1173,7 @@ class MochitestDesktop(object):
sock = socket.create_connection(("127.0.0.1", 8191))
sock.close()
break
except:
except Exception:
time.sleep(0.1)
else:
self.log.error("runtests.py | Timed out while waiting for "
@ -1964,7 +1964,7 @@ toolbar#nav-bar {
os.remove(options.pidFile)
if os.path.exists(options.pidFile + ".xpcshell.pid"):
os.remove(options.pidFile + ".xpcshell.pid")
except:
except Exception:
self.log.warning(
"cleaning up pidfile '%s' was unsuccessful from the test harness" %
options.pidFile)
@ -2072,7 +2072,7 @@ toolbar#nav-bar {
try:
if 'firefox' in proc.name():
firefoxes = "%s%s\n" % (firefoxes, proc.as_dict(attrs=attrs))
except:
except Exception:
# may not be able to access process info for all processes
continue
if len(firefoxes) > 0:
@ -2784,7 +2784,7 @@ toolbar#nav-bar {
except KeyboardInterrupt:
self.log.info("runtests.py | Received keyboard interrupt.\n")
status = -1
except:
except Exception:
traceback.print_exc()
self.log.error(
"Automation Error: Received unexpected exception while running application\n")
@ -2837,12 +2837,12 @@ toolbar#nav-bar {
if HAVE_PSUTIL:
try:
browser_proc = [psutil.Process(browser_pid)]
except:
except Exception:
self.log.info('Failed to get proc for pid %d' % browser_pid)
browser_proc = []
try:
child_procs = [psutil.Process(pid) for pid in child_pids]
except:
except Exception:
self.log.info('Failed to get child procs')
child_procs = []
for pid in child_pids:

Просмотреть файл

@ -370,7 +370,7 @@ def run_test_harness(parser, options):
retVal = mochitest.verifyTests(options)
else:
retVal = mochitest.runTests(options)
except:
except Exception:
log.error("Automation Error: Exception caught while running tests")
traceback.print_exc()
mochitest.stopServers()

Просмотреть файл

@ -30,6 +30,9 @@
<p>blah blah blah blah</p>
</div>
<script class="testbody" type="text/javascript">
const kStrictKeyPressEvents =
SpecialPowers.getBoolPref("dom.keyboardevent.keypress.dispatch_non_printable_keys_only_system_group_in_content");
info("\nProfile::EventUtilsLoadTime: " + (loadTime - start) + "\n");
function starttest() {
SimpleTest.waitForFocus(
@ -44,7 +47,7 @@ function starttest() {
is(check, true, 'sendMouseEvent should dispatch click event');
check = false;
$("testKeyEvent").addEventListener("keypress", function() { check = true; });
$("testKeyEvent").addEventListener("keypress", function() { check = true; }, {once: true});
$("testKeyEvent").focus();
sendChar("x");
is($("testKeyEvent").value, "x", "sendChar should work");
@ -56,10 +59,18 @@ function starttest() {
is($("testStrEvent").value, "string", "sendString should work");
$("testStrEvent").value = "";
check = false;
var keydown = false;
var keypress = false;
$("testKeyEvent").focus();
$("testKeyEvent").addEventListener("keydown", function() { keydown = true; }, {once: true});
$("testKeyEvent").addEventListener("keypress", function() { keypress = true; }, {once: true});
sendKey("DOWN");
is(check, true, "sendKey should dispatch keyPress");
ok(keydown, "sendKey should dispatch keyDown");
if (kStrictKeyPressEvents) {
ok(!keypress, "sendKey shouldn't dispatch keyPress for non-printable key");
} else {
ok(keypress, "sendKey should dispatch keyPress even for non-printable key");
}
/* test synthesizeMouse* */
//focus trick enables us to run this in iframes

Просмотреть файл

@ -73,7 +73,7 @@ class TestRunner(object):
except TestAssertion as e:
status = "FAIL"
message = e.message
except:
except Exception:
status = "ERROR"
message = traceback.format_exc()
else:
@ -97,7 +97,7 @@ def main():
runner = TestRunner()
try:
runner.run()
except:
except Exception:
logger.critical("Error during test run:\n%s" % traceback.format_exc())

Просмотреть файл

@ -306,7 +306,7 @@ class ExpressionParser(object):
self.iter = self._tokenize()
self.token = self.iter.next()
return self.expression()
except:
except Exception:
extype, ex, tb = sys.exc_info()
formatted = ''.join(traceback.format_exception_only(extype, ex))
reraise(ParseError("could not parse: %s\nexception: %svariables: %s" %

Просмотреть файл

@ -73,7 +73,7 @@ class TestDirectoryConversion(unittest.TestCase):
""" # noqa
self.assertEqual(str(manifest), out_tmpl % dict(stub=stub))
except:
except BaseException:
raise
finally:
shutil.rmtree(stub) # cleanup
@ -96,7 +96,7 @@ class TestDirectoryConversion(unittest.TestCase):
parser.read(os.path.join(stub, 'subdir', 'manifest.ini'))
self.assertEqual(len(parser.tests), 1)
self.assertEqual(parser.tests[0]['name'], 'subfile')
except:
except BaseException:
raise
finally:
shutil.rmtree(stub)
@ -113,7 +113,7 @@ class TestDirectoryConversion(unittest.TestCase):
self.assertEqual([i['name'] for i in parser.tests],
['bar', 'fleem', 'foo'])
self.assertFalse(os.path.exists(os.path.join(stub, 'subdir', 'manifest.ini')))
except:
except BaseException:
raise
finally:
shutil.rmtree(stub)
@ -131,7 +131,7 @@ class TestDirectoryConversion(unittest.TestCase):
parser = convert([stub], pattern=('f*', 's*'), relative_to=stub)
self.assertEqual([i['name'] for i in parser.tests],
['fleem', 'foo', 'subdir/subfile'])
except:
except BaseException:
raise
finally:
shutil.rmtree(stub)

Просмотреть файл

@ -47,7 +47,7 @@ class TestSymlinkConversion(unittest.TestCase):
parser = convert([stub], relative_to='.')
self.assertEqual([i['name'] for i in parser.tests],
files)
except:
except BaseException:
raise
finally:
shutil.rmtree(stub)

Просмотреть файл

@ -84,7 +84,7 @@ def check_for_crashes(dump_directory,
if test_name is None:
try:
test_name = os.path.basename(sys._getframe(1).f_code.co_filename)
except:
except Exception:
test_name = "unknown"
crash_info = CrashInfo(dump_directory, symbols_path, dump_save_path=dump_save_path,
@ -348,7 +348,7 @@ def check_for_java_exception(logcat, test_name=None, quiet=False):
if test_name is None:
try:
test_name = os.path.basename(sys._getframe(1).f_code.co_filename)
except:
except Exception:
test_name = "unknown"
found_exception = False
@ -562,7 +562,7 @@ def cleanup_pending_crash_reports():
try:
mozfile.remove(location)
logger.info("Removed pending crash reports at '%s'" % location)
except:
except Exception:
pass

Просмотреть файл

@ -103,7 +103,7 @@ def get_debugger_path(debugger):
path = check_output(['xcrun', '--find', 'lldb']).strip()
if path:
return path
except:
except Exception:
# Just default to find_executable instead.
pass

Просмотреть файл

@ -1728,7 +1728,7 @@ class ADBDevice(ADBCommand):
"""
# remove trailing /
local = os.path.normpath(local)
remote = os.path.normpath(remote)
remote = posixpath.normpath(remote)
copy_required = False
if os.path.isdir(local):
copy_required = True
@ -1748,7 +1748,7 @@ class ADBDevice(ADBCommand):
remote = '/'.join(remote.rstrip('/').split('/')[:-1])
try:
self.command_output(["push", local, remote], timeout=timeout)
except:
except BaseException:
raise
finally:
if copy_required:
@ -1773,7 +1773,7 @@ class ADBDevice(ADBCommand):
"""
# remove trailing /
local = os.path.normpath(local)
remote = os.path.normpath(remote)
remote = posixpath.normpath(remote)
copy_required = False
original_local = local
if self._adb_version >= '1.0.36' and \
@ -1801,7 +1801,7 @@ class ADBDevice(ADBCommand):
local = '/'.join(local.rstrip('/').split('/')[:-1])
try:
self.command_output(["pull", remote, local], timeout=timeout)
except:
except BaseException:
raise
finally:
if copy_required:

Просмотреть файл

@ -570,7 +570,7 @@ class DeviceManager(object):
try:
mdsum = hashlib.md5()
except:
except Exception:
return None
while 1:

Просмотреть файл

@ -279,7 +279,7 @@ class DeviceManagerADB(DeviceManager):
retryLimit=retryLimit, timeout=self.short_timeout)
if re.search("unzip: exiting", data) or re.search("Operation not permitted", data):
raise Exception("unzip failed, or permissions error")
except:
except Exception:
self._logger.warning(traceback.format_exc())
self._logger.warning("zip/unzip failure: falling back to normal push")
self._useZip = False
@ -305,7 +305,7 @@ class DeviceManagerADB(DeviceManager):
retryLimit=retryLimit, timeout=timeout):
raise DMError("failed to push %s (copy of %s) to %s" %
(newLocal, localDir, remoteDir))
except:
except BaseException:
raise
finally:
mozfile.remove(tempParent)
@ -450,7 +450,7 @@ class DeviceManagerADB(DeviceManager):
if not native and not sig:
try:
self.shellCheckOutput(["am", "force-stop", appname], timeout=self.short_timeout)
except:
except Exception:
# no problem - will kill it instead
self._logger.info("killProcess failed force-stop of %s" % appname)
@ -589,7 +589,7 @@ class DeviceManagerADB(DeviceManager):
try:
self.mkDir(root)
return root
except:
except Exception:
pass
raise DMError("Unable to set up device root using paths: [%s]"
@ -869,7 +869,7 @@ class DeviceManagerADB(DeviceManager):
proc = ProcessHandler(["zip", "-?"], storeOutput=False, processOutputLine=_noOutput)
proc.run()
proc.wait()
except:
except Exception:
return False
return True

Просмотреть файл

@ -163,7 +163,7 @@ class DroidADB(DeviceManagerADB, DroidMixin):
# Increased timeout to 60 seconds after intermittent timeouts at 30.
data = self.shellCheckOutput(
["dumpsys", "window", "windows"], timeout=60)
except:
except Exception:
# dumpsys seems to intermittently fail (seen on 4.3 emulator), producing
# no output.
return ""

Просмотреть файл

@ -8,7 +8,7 @@ from __future__ import absolute_import
from setuptools import setup
PACKAGE_NAME = 'mozdevice'
PACKAGE_VERSION = '0.51'
PACKAGE_VERSION = '0.52'
deps = ['mozfile >= 1.0',
'mozlog >= 3.0',

Просмотреть файл

@ -34,6 +34,6 @@ def create_stub():
except Exception:
try:
shutil.rmtree(tempdir)
except:
except Exception:
pass
raise

Просмотреть файл

@ -132,7 +132,7 @@ class TestExtract(unittest.TestCase):
try:
for path in stubs.files:
archive.add(os.path.join(tempdir, *path), arcname=os.path.join(*path))
except:
except BaseException:
os.remove(archive)
raise
finally:
@ -149,7 +149,7 @@ class TestExtract(unittest.TestCase):
try:
for path in stubs.files:
archive.write(os.path.join(tempdir, *path), arcname=os.path.join(*path))
except:
except BaseException:
os.remove(filename)
raise
finally:

Просмотреть файл

@ -45,7 +45,7 @@ class FileOpenCloseThread(threading.Thread):
if self.delete:
try:
os.remove(self.path)
except:
except Exception:
pass

Просмотреть файл

@ -109,7 +109,7 @@ def install(src, dest):
if '://' in src:
try:
return _install_url(src, dest)
except:
except Exception:
exc, val, tb = sys.exc_info()
msg = "{} ({})".format(msg, val)
reraise(InvalidSource, msg, tb)
@ -135,18 +135,18 @@ def install(src, dest):
return install_dir
except:
except BaseException:
cls, exc, trbk = sys.exc_info()
if did_we_create:
try:
# try to uninstall this properly
uninstall(dest)
except:
except Exception:
# uninstall may fail, let's just try to clean the folder
# in this case
try:
mozfile.remove(dest)
except:
except Exception:
pass
if issubclass(cls, Exception):
error = InstallError('Failed to install "%s (%s)"' % (src, str(exc)))

Просмотреть файл

@ -122,7 +122,7 @@ class DataType(object):
try:
return self.convert(value)
except:
except Exception:
raise ValueError("Failed to convert value %s of type %s for field %s to type %s" %
(value, type(value).__name__, self.name, self.__class__.__name__))

Просмотреть файл

@ -145,7 +145,7 @@ class ProcessHandlerMixin(object):
self.debug("calling TerminateProcess")
try:
winprocess.TerminateProcess(self._handle, winprocess.ERROR_CONTROL_C_EXIT)
except:
except Exception:
traceback.print_exc()
raise OSError("Could not terminate process")
finally:
@ -353,7 +353,7 @@ class ProcessHandlerMixin(object):
# Spin up our thread for managing the IO Completion Port
self._procmgrthread = threading.Thread(target=self._procmgr)
except:
except Exception:
print("""Exception trying to use job objects;
falling back to not using job objects for managing child processes""", file=sys.stderr)
tb = traceback.format_exc()
@ -521,7 +521,7 @@ falling back to not using job objects for managing child processes""", file=sys.
if item[self.pid] == 'FINISHED':
self.debug("received 'FINISHED' from _procmgrthread")
self._process_events.task_done()
except:
except Exception:
traceback.print_exc()
raise OSError("IO Completion Port failed to signal process shutdown")
finally:

Просмотреть файл

@ -39,7 +39,7 @@ class TestProfilePrint(unittest.TestCase):
self.assertEqual(set(parts.keys()), keys)
self.assertEqual(pref_string, parts['user.js'].strip())
except:
except BaseException:
raise
finally:
mozfile.rmtree(tempdir)

Просмотреть файл

@ -238,7 +238,7 @@ class BaseRunner(object):
quiet=quiet)
self.crashed += crash_count
except:
except Exception:
traceback.print_exc()
return crash_count

Просмотреть файл

@ -296,7 +296,7 @@ def verify_android_device(build_obj, install=False, xre=False, debugger=False, v
proc.wait()
if proc.proc.returncode == 0:
git_pull_complete = True
except:
except Exception:
if proc.poll() is None:
proc.kill(signal.SIGTERM)
if not git_pull_complete:
@ -586,7 +586,7 @@ class AndroidEmulator(object):
"""
try:
self.proc.wait()
except:
except Exception:
if self.proc.poll() is None:
self.cleanup()
return self.proc.poll()
@ -650,7 +650,7 @@ class AndroidEmulator(object):
telnet_ok = True
else:
_log_warning("Unable to connect to port 5554")
except:
except Exception:
_log_warning("Trying again after unexpected exception")
finally:
if tn is not None:
@ -739,7 +739,7 @@ def _find_sdk_exe(substs, exe, tools):
try:
creation_time = os.path.getctime(exe_path)
_log_debug(" ...with creation time %s" % time.ctime(creation_time))
except:
except Exception:
_log_warning("Could not get creation time for %s" % exe_path)
prop_path = os.path.join(os.path.dirname(exe_path), "source.properties")
@ -815,7 +815,7 @@ def _tooltool_fetch():
proc.run()
try:
proc.wait()
except:
except Exception:
if proc.poll() is None:
proc.kill(signal.SIGTERM)
@ -845,7 +845,7 @@ def _get_device_platform(substs):
output = dm.shellCheckOutput(cmd, timeout=10)
if output:
sdk_level = int(output)
except:
except Exception:
_log_warning("unable to determine Android sdk level")
pie = ''
if sdk_level and sdk_level >= 21:

Просмотреть файл

@ -67,7 +67,7 @@ class AutophoneRunner(object):
json.dump(self.config, f)
if self.verbose:
print("saved configuration: %s" % self.config)
except:
except Exception:
self.build_obj.log(logging.ERROR, "autophone", {},
"unable to save 'mach autophone' "
"configuration to %s" % self.CONFIG_FILE)
@ -85,7 +85,7 @@ class AutophoneRunner(object):
self.config = json.load(f)
if self.verbose:
print("loaded configuration: %s" % self.config)
except:
except Exception:
self.build_obj.log(logging.ERROR, "autophone", {},
"unable to load 'mach autophone' "
"configuration from %s" % self.CONFIG_FILE)
@ -181,7 +181,7 @@ class AutophoneRunner(object):
try:
if os.path.exists(self.build_obj.substs["ADB"]):
adb_path = self.build_obj.substs["ADB"]
except:
except Exception:
if self.verbose:
self.build_obj.log(logging.ERROR, "autophone", {},
str(sys.exc_info()[0]))
@ -208,7 +208,7 @@ class AutophoneRunner(object):
else:
self.build_obj.log(logging.WARNING, "autophone", {},
"Device '%s' is not rooted - skipping" % serial)
except:
except Exception:
self.build_obj.log(logging.ERROR, "autophone", {},
"Failed to get list of connected Android devices.")
if self.verbose:
@ -314,7 +314,7 @@ log_level = DEBUG
time_out = 300""" % (xre_path, xre_path))
if self.verbose:
print("Created %s with host utilities path %s" % (defaults_path, xre_path))
except:
except Exception:
self.build_obj.log(logging.ERROR, "autophone", {},
"Unable to create %s" % defaults_path)
if self.verbose:
@ -447,7 +447,7 @@ time_out = 300""" % (xre_path, xre_path))
dm = DeviceManagerADB(adbPath=adb_path, retryLimit=1, deviceSerial=device)
if dm._haveSu or dm._haveRootShell:
return True
except:
except Exception:
self.build_obj.log(
logging.WARN, "autophone", {},
"Unable to verify root on device.")
@ -644,7 +644,7 @@ quit
proc.wait()
if proc.proc.returncode == 0:
proc_complete = True
except:
except Exception:
if proc.poll() is None:
proc.kill(signal.SIGTERM)
if not proc_complete:

Просмотреть файл

@ -202,7 +202,7 @@ def test_environment(xrePath, env=None, crashreporter=True, debugger=False,
except OSError as err:
log.info("Failed determine available memory, disabling ASan"
" low-memory configuration: %s" % err.strerror)
except:
except Exception:
log.info("Failed determine available memory, disabling ASan"
" low-memory configuration")
else:

Просмотреть файл

@ -13,7 +13,7 @@ PACKAGE_VERSION = '0.3'
try:
pwd = os.path.dirname(os.path.abspath(__file__))
description = open(os.path.join(pwd, 'README.rst')).read()
except:
except Exception:
description = ''
setup(

Просмотреть файл

@ -98,7 +98,7 @@ def binary():
"""Return a Firefox binary"""
try:
return build.get_binary_path()
except:
except Exception:
pass
app = 'firefox'
@ -106,7 +106,7 @@ def binary():
if os.path.isdir(bindir):
try:
return mozinstall.get_binary(bindir, app_name=app)
except:
except Exception:
pass
if 'GECKO_INSTALLER_URL' in os.environ:

Просмотреть файл

@ -105,7 +105,7 @@ class AndroidEmulatorTest(TestingMixin, EmulatorMixin, BaseScript, MozbaseMixin)
dirs = self.query_abs_dirs()
try:
test_dir = self.config["suite_definitions"][self.test_suite]["testsdir"]
except:
except Exception:
test_dir = self.test_suite
return os.path.join(dirs['abs_test_install_dir'], test_dir)
@ -179,7 +179,7 @@ class AndroidEmulatorTest(TestingMixin, EmulatorMixin, BaseScript, MozbaseMixin)
try:
os.remove(AUTH_FILE)
self.info("deleted %s" % AUTH_FILE)
except:
except Exception:
self.warning("failed to remove %s" % AUTH_FILE)
avd_path = os.path.join(avd_home_dir, 'avd')
@ -776,7 +776,7 @@ class AndroidEmulatorTest(TestingMixin, EmulatorMixin, BaseScript, MozbaseMixin)
try:
cwd = self._query_tests_dir()
except:
except Exception:
self.fatal("Don't know how to run --test-suite '%s'!" % self.test_suite)
env = self.query_env()
if minidump:

Просмотреть файл

@ -120,7 +120,7 @@ class ConfigTest(BaseScript):
local_dict = {}
try:
execfile(config_file, global_dict, local_dict)
except:
except Exception:
self.add_summary("%s is invalid python." % config_file,
level="error")
self.error(pprint.pformat(sys.exc_info()[1]))

Просмотреть файл

@ -754,7 +754,7 @@ class DesktopUnittest(TestingMixin, MercurialScript, BlobUploadMixin, MozbaseMix
try:
for nc in psutil.net_connections():
f.write(" %s\n" % str(nc))
except:
except Exception:
f.write("Exception getting network info: %s\n" % sys.exc_info()[0])
f.write("\nProcesses:\n")
try:
@ -762,9 +762,9 @@ class DesktopUnittest(TestingMixin, MercurialScript, BlobUploadMixin, MozbaseMix
ctime = str(datetime.fromtimestamp(p.create_time()))
f.write(" PID %d %s %s created at %s\n" %
(p.pid, p.name(), str(p.cmdline()), ctime))
except:
except Exception:
f.write("Exception getting process info: %s\n" % sys.exc_info()[0])
except:
except Exception:
# psutil throws a variety of intermittent exceptions
self.info("Unable to complete system-info.log: %s" % sys.exc_info()[0])

Просмотреть файл

@ -248,7 +248,7 @@ def run_test_harness(options, args):
if options.log_tbpl_level == 'debug' or options.log_mach_level == 'debug':
dm_args['logLevel'] = logging.DEBUG # noqa python 2 / 3
dm = devicemanagerADB.DeviceManagerADB(**dm_args)
except:
except BaseException:
if options.with_b2g_emulator:
runner.cleanup()
runner.wait()

Просмотреть файл

@ -15,7 +15,7 @@ import urllib2
try:
from subprocess import check_call as call
except:
except ImportError:
from subprocess import call
# globals

Просмотреть файл

@ -22,6 +22,9 @@
"talos_options": ["--disable-stylo"],
"tests": ["dromaeo_css", "kraken"]
},
"flex-e10s": {
"tests": ["tart_flex", "ts_paint_flex"]
},
"other-e10s": {
"tests": ["a11yr", "ts_paint", "tpaint", "sessionrestore", "sessionrestore_many_windows", "sessionrestore_no_auto_restore", "tabpaint", "cpstartup"]
},

Просмотреть файл

@ -171,7 +171,7 @@ class LinuxCounterManager(CounterManager):
"""Returns the last value of the counter 'counterName'"""
try:
return self.registeredCounters[counterName][0](self.pidList())
except:
except Exception:
return None
def pidList(self):
@ -179,5 +179,5 @@ class LinuxCounterManager(CounterManager):
try:
return [self.process.pid] + [child.pid
for child in self.process.children()]
except:
except Exception:
print("WARNING: problem updating child PID's")

Просмотреть файл

@ -21,7 +21,7 @@ def GetProcessData(pid):
universal_newlines=True, shell=True)
handle.wait()
data = handle.stdout.readlines()
except:
except Exception:
print("Unexpected error executing '%s': %s", (command, sys.exc_info()))
raise

Просмотреть файл

@ -202,7 +202,7 @@ class WinCounterManager(CounterManager):
)
self.registeredCounters[counter][1].append((newhc,
expandedPath))
except:
except Exception:
continue
if oldCounterListLength != len(self.registeredCounters[counter][1]):

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше