Bug 1594786 - Part 1 - Add withHandlingUserInput function to extension test suite. r=rpl

Differential Revision: https://phabricator.services.mozilla.com/D53981

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Harry Twyford 2019-11-20 19:26:54 +00:00
Родитель 13820098e8
Коммит c07cd3197b
2 изменённых файлов: 15 добавлений и 0 удалений

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

@ -111,6 +111,13 @@ this.test = class extends ExtensionAPI {
return {
test: {
withHandlingUserInput(callback) {
ExtensionCommon.withHandlingUserInput(
context.contentWindow,
callback
);
},
sendMessage(...args) {
extension.emit("test-message", ...args);
},

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

@ -9,6 +9,14 @@
"defaultContexts": ["content", "devtools"],
"description": "none",
"functions": [
{
"name": "withHandlingUserInput",
"type": "function",
"description": "Calls the callback function wrapped with user input set. This is only used for internal unit testing.",
"parameters": [
{"type": "function", "name": "callback"}
]
},
{
"name": "notifyFail",
"type": "function",