Introduce a new helper element.isInXULDocument that should be used when we need to infer the context (chrome or content) from a given element.
The existing element.isXULElement is still relevant and should be used to detect actual XUL elements, which need to be handled differently from HTML elements.
Use the new helper isInXULDocument:
- in element.from, to decide to create ChromeWebElement or ContentWebElement for a given node.
- in element.add, to infer the context
Differential Revision: https://phabricator.services.mozilla.com/D94907
This caused some local breakage when using `mach run` due to the privileged
content process being disabled, but the startup cache being enabled (I think?) -
removing it allowed `mach run` to use the privilegedremote process again.
I think the issue which caused this pref to be added here has been fixed now, so
it shouldn't be necessary anymore.
Differential Revision: https://phabricator.services.mozilla.com/D94643
We know that this test will never fail with any of the hardware used by our test infrastructure. It also force create a RDD process even when not actually used in the tests; skewing the results.
Differential Revision: https://phabricator.services.mozilla.com/D94804
While all navigation related commands trigger the navigation through
the top-level browsing context, observing the page load events still
has to happen in the current browsing context.
Differential Revision: https://phabricator.services.mozilla.com/D94649
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
This adds the ability to force the bookmarks toolbar to appear on all pages. The checkbox in the toolbar context menu will reflect if the toolbar will appear outside of the newtab page. The toolbar will always appear on the newtab page. Profiles that already had the toolbar showing will have a migration to keep their experience unchanged.
Differential Revision: https://phabricator.services.mozilla.com/D89222
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
Change error handling and initialization on the server side.
On the Marionette Python client side, add a `kind` attribute to HTMLElement
to distinguish chrome elements from content elements in the action sequence
sent to the server. This change is necessary for `performActions` in contrast to
other command implementations because of the extra parsing step done by
`actions.Chain.fromJson` on the server side.
Note that for the time being Marionette's ReferenceStore does not
distinguish chrome and content elements (Bug 1672788), so this client-side
change is correct but not strictly necessary.
Differential Revision: https://phabricator.services.mozilla.com/D93778
Element references in the parent process are always WebElements.
As such rename element arguments of the parent actor methods,
but still pass them as elements to the child actor.
Differential Revision: https://phabricator.services.mozilla.com/D94438
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
When waiting for a navigation to complete the
"browsing-context-discarded" observer notification
is used to determine if the currently selected
browsing context has been closed or just replaced
due to a remoteness change.
Differential Revision: https://phabricator.services.mozilla.com/D93747
By not re-using the "remote-listening" observer topic in Marionette
allows us to send different data through the observer notification.
This also prevents a crash in the Remote Agent component, which
expects a string, and not a boolean value to receive in data.
Differential Revision: https://phabricator.services.mozilla.com/D93513
The goal is to stop using the listener.js framescript to support navigation in reftests using marionette.
Instead we will port the current logic to JSWindowActor.
Differential Revision: https://phabricator.services.mozilla.com/D92648
Due to delays when the click and the appropriate event will actually
happen within the child process, the beforeunload timer with 200ms
timeout needs to be run after the click event has been received.
Differential Revision: https://phabricator.services.mozilla.com/D93194
The goal is to stop using the listener.js framescript to support navigation in reftests using marionette.
Instead we will port the current logic to JSWindowActor.
Differential Revision: https://phabricator.services.mozilla.com/D92648
In order to avoid over/under-counting, we need to treat window.print()
specially. The new UI was using aOpenWindowInfo.isForPrintPreview for
that, but that doesn't quite work for the old UI (because it will
trigger a regular print, not a preview).
But since isForPrintPreview was only really needed to distinguish
window.print(), just rename it and set it to true when the old UI is
triggered by window.print() as well.
Differential Revision: https://phabricator.services.mozilla.com/D92925