Several mochitests currently add boilerplate useAddonManager and an
extension ID, because the implementations of some extension APIs depend
on a registration with the AddonManager via GeckoViewWebExtension.
To avoid the need for this boilerplate, use the AddonManager by default
in mochitests on Android only.
xpcshell tests can use `useAddonManager: "android-only"` to opt in to
the same mechanism.
Differential Revision: https://phabricator.services.mozilla.com/D124087
Until fixing bug 1686012, clipboard in the headless mode does not support
"text/html" flavor. Therefore, the `waitForClipboard` in the test does not
get expected value as `aData` in the first callback.
So, it should request `text/unicode` in the headless mode.
Depends on D119483
Differential Revision: https://phabricator.services.mozilla.com/D119484
The public key pinning implementation is much less complex than the HSTS
implementation, and only needs a small subset of the parameters of the latter.
Furthermore, the information it relies on is static, and so is safe to access
from content processes. This patch separates the two implementations, thus
simplifying both of them and avoiding some unnecessary IPC calls in the
process.
Differential Revision: https://phabricator.services.mozilla.com/D117096
The public key pinning implementation is much less complex than the HSTS
implementation, and only needs a small subset of the parameters of the latter.
Furthermore, the information it relies on is static, and so is safe to access
from content processes. This patch separates the two implementations, thus
simplifying both of them and avoiding some unnecessary IPC calls in the
process.
Differential Revision: https://phabricator.services.mozilla.com/D117096
The public key pinning implementation is much less complex than the HSTS
implementation, and only needs a small subset of the parameters of the latter.
Furthermore, the information it relies on is static, and so is safe to access
from content processes. This patch separates the two implementations, thus
simplifying both of them and avoiding some unnecessary IPC calls in the
process.
Differential Revision: https://phabricator.services.mozilla.com/D117096
Instead of using a framescript, change promiseFocus to use the SpecialPowers actor. In addition, promiseFocus may now take a browsing context to focus a specific subframe's window. If that subframe is deeply nested, messages will be passed back and forth between the parent and each successive subframe to get to the one subframe that is desired to be focused. Similarly, this process is used when focusing a higher level frame that already has its focused element set to a subframe.
Differential Revision: https://phabricator.services.mozilla.com/D116387
NPAPI plugins are no longer supported. MozPaintWait and MozPaintWaitFinished events are no longer sent -- they came exclusively from nsPluginInstanceOwner, which was removed in bug 1682030.
Differential Revision: https://phabricator.services.mozilla.com/D114021
Removes NPAPI plugin features from tests outside of dom/plugins. Some tests are updated to avoid NPAPI behavior and others are deleted if they no longer offer anthing useful.
Differential Revision: https://phabricator.services.mozilla.com/D107134
Removes NPAPI plugin features from tests outside of dom/plugins. Some tests are updated to avoid NPAPI behavior and others are deleted if they no longer offer anthing useful.
Differential Revision: https://phabricator.services.mozilla.com/D107134
This change adds a new mochitest-only helper called `AppTestDelegate`. This
helper will provide primitives that are not normally available at the toolkit
level.
Each app can implement the `AppUiTestDelegate` API to provide the primitives.
This is done so that we can ensure compatibility of the Extension API across
implementations.
The initial set of APIs is as follows:
```
class TestDelegate {
clickPageAction(window, extensionId);
closePageAction(window, extensionId);
clickBrowserAction(window, extensionId);
closeBrowserAction(window, extensionId);
awaitExtensionPanel(window, extensionId);
// Returns a unique identifier for the tab
openNewForegroundTab(window, url, waitForLoad);
// tabId must be the identifier from openNewForegroundTab
removeTab(tabId);
}
```
Differential Revision: https://phabricator.services.mozilla.com/D99170
We keep mMedium in nsPresContext rather than just looking it up in the
browsing context because that's used quite more frequently.
Differential Revision: https://phabricator.services.mozilla.com/D103782
This change adds a new mochitest-only helper called `AppTestDelegate`. This
helper will provide primitives that are not normally available at the toolkit
level.
Each app can implement the `AppUiTestDelegate` API to provide the primitives.
This is done so that we can ensure compatibility of the Extension API across
implementations.
The initial set of APIs is as follows:
```
class TestDelegate {
clickPageAction(window, extensionId);
closePageAction(window, extensionId);
clickBrowserAction(window, extensionId);
closeBrowserAction(window, extensionId);
awaitExtensionPanel(window, extensionId);
// Returns a unique identifier for the tab
openNewForegroundTab(window, url, waitForLoad);
// tabId must be the identifier from openNewForegroundTab
removeTab(tabId);
}
```
Differential Revision: https://phabricator.services.mozilla.com/D99170
This also fixes an issue where MockFilePicker wouldn't set the mode correctly,
which caused it to always use "modeOpen". For this test we need to pass
"modeGetFolder" in order for the prompt to show.
Differential Revision: https://phabricator.services.mozilla.com/D96526
This also fixes an issue where MockFilePicker wouldn't set the mode correctly,
which caused it to always use "modeOpen". For this test we need to pass
"modeGetFolder" in order for the prompt to show.
Differential Revision: https://phabricator.services.mozilla.com/D96526
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Make some ad-hoc manual updates to `testing/marionette/client/setup.py`, `testing/marionette/harness/setup.py`, and `testing/firefox-ui/harness/setup.py`, which have hard-coded regexes that break after the reformat.
5. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Allow-list all Python code in tree for use with the black linter, and re-format all code in-tree accordingly.
To produce this patch I did all of the following:
1. Make changes to tools/lint/black.yml to remove include: stanza and update list of source extensions.
2. Run ./mach lint --linter black --fix
3. Make some ad-hoc manual updates to python/mozbuild/mozbuild/test/configure/test_configure.py -- it has some hard-coded line numbers that the reformat breaks.
4. Add a set of exclusions to black.yml. These will be deleted in a follow-up bug (1672023).
# ignore-this-changeset
Differential Revision: https://phabricator.services.mozilla.com/D94045
Some tests rely on SpecialPowers.pushPermissions/popPermissions/flushPermissions
operating on the same permissions stack no matter the SpecialPowers instance
they're called on. This works when all of those SpeicalPowers instances are in
the same process, but with out-of-process Fision frames, that isn't always the
case.
This patch updates the permission stack code to operate the same way as the
preference stack code, which was already updated to deal with this issue.
Differential Revision: https://phabricator.services.mozilla.com/D90320