зеркало из https://github.com/mozilla/gecko-dev.git
bebfb567e8
To support this API, we do the following: Additions to `GeckoSessionTestRule`: * We add an overload to `webExtensionApiCall` that accepts a `GeckoSession` argument. Instead of sending the message to the extension's background script, this overload instead sends the message to the port for the session's content script. * We add `GeckoSessionTestRule.getSessionPid()` which uses the new `webExtensionApiCall` overload. Moving other existing APIs over to use the new overload is out of scope for this bug and should be done in follow-ups. Additions to the `test-support` extension: * We modify the content script to receive an API call message from the native port. It then forwards the request up to the background script. By doing it this way, the background script will receive the message along with the WebExtension `Tab` object belonging to the sender; * The background script's message handler merges the tab into the arguments to the API as a `tab` property; * The background script then calls the API and the result is returned to the harness using the native port, just like the normal implementation; * We add a `GetPidForTab` API for resolving top-level PIDs from a webext tab id. Differential Revision: https://phabricator.services.mozilla.com/D73723 |
||
---|---|---|
.. | ||
android | ||
locales | ||
.eslintrc.js |