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
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
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
In many cases with wpt, most of the tests in the file pass, but it is rather time consuming to annotate
.ini files case by case.
Differential Revision: https://phabricator.services.mozilla.com/D91977
By reducing the shutdown and startup timeouts for the appropriate
tests the duration of all the quit and restart tests can be reduced
from 2 minutes to 1 minute.
Also the restart command didn't take the startup timeout into account,
which has been added with this patch.
Differential Revision: https://phabricator.services.mozilla.com/D91710
Even in the case of no load event expected, or the page load strategy
as set to None the callback that triggers the navigation always has
to be called.
Depends on D91443
Differential Revision: https://phabricator.services.mozilla.com/D91444
Similar to closing a tab the internal browsing contexts
need to be nullified. This is necessary because browsing
contexts are asynchronously discarded and garbage collected.
Also the "unload" event as currently used to wait for the
chrome window to be closed fires too early. Instead the
"xul-window-destroyed" observer notification needs to be used.
Differential Revision: https://phabricator.services.mozilla.com/D91296
If a click triggers a navigation in the top-browsing context from
inside a frame, the frame gets removed and as such the "Element Click"
command immediately returns. As such waiting for the navigation to
be finished has to be taken care of by the test itself.
Differential Revision: https://phabricator.services.mozilla.com/D90976
First, by running all the tests in their own tab reduces the risk
of bad interactions between tests.
Also the legacy element click tests actually never tested the
legacy mode because "moz:webdriverClick" has been set to "true"
by default, but the capability for the tests hasn't been changed
to point to false.
Differential Revision: https://phabricator.services.mozilla.com/D90879
Because TestTLSNavigation is not based off BaseNavigationTestCase
each of its tests is run inside the initial tab. This could cause
bad interactions between tests and should be avoided.
Differential Revision: https://phabricator.services.mozilla.com/D90466
Given by the WebDriver specification each command has to check if
the appropriate browsing context it operates in is still open. If
it's not the case a "no such window" error will be thrown.
Until now the code only checked the top-level browsing context for
each of the supported commands. That means if the current browsing
context was not open anymore a command running in a specific frame
of the website has thrown unknown or type errors.
That change makes our implementation WebDriver compliant.
Differential Revision: https://phabricator.services.mozilla.com/D88951
This regressed by the patch on bug 1658928, which changed the type of
URL Marionette returns. While before we were returning the visible
URL from the location bar, the new and broken behavior includes
"about:error" prefixes for broken navigation requests.
Differential Revision: https://phabricator.services.mozilla.com/D89936
During scrolling, the caret's position relative to the
custom-content-container (cached in mImaginaryCaretRectInContainerFrame)
may not change, but its position relative to root frame can (cached in
mImaginaryCaretRect).
We need to update mImaginaryCaret each time we are in SetPosition().
Otherwise, the caret still remembers its pre-scrolling old position next
time when we drag it, resulting the caret jumping to its old
pre-scrolling position suddenly.
Note this bug only occurs on the root scroll frame where the APZ is
enabled, not in any sub-scroll frames where APZ is disable when the
caret is shown.
Differential Revision: https://phabricator.services.mozilla.com/D88638
With the changes on bug 1654628 we do not completely track the current
browsing contexts, but loose the reference when windows are closed.
With this patch the appropriate browsing contexts will be correctly
reset.
Also the commands for switching frames are operating on content
windows and as such are not allowed to update the currently
selected chrome browsing context.
Differential Revision: https://phabricator.services.mozilla.com/D88441
By moving out the "currentURI" getter from the Browser class,
and making it available on the driver other parts of Marionette
like reftests can make use of the "currentURL" property.
Also a couple of methods expressed the passed-around data as
instance of nsIURI whereby it was a string or an instance of
URL. The patch fixes that to always pass-around URL instances.
By doing these changes the command will be Fission compatible now.
Differential Revision: https://phabricator.services.mozilla.com/D87572
With this patch a couple of changes are made to generally make it easier
to handle browsing contexts, and the current window. Basically this includes:
Since bug 1652932 landed the driver class keeps a reference
to the currently selected browsing context in content. As such
there is no need anymore to retrieve it from the framescript
each and every time. As side-effect this also removes the
async requirement and makes code better to read.
Similar handling for the browsing context exists for chrome scope,
which is also cached now, and no longer has to be retrieved via
the current window. With specifically this change "getCurrentURL"
for chrome scope correctly reports the location of the top-browsing
context, and not from the current one.
In the early days of Marionette a feature has been added to
work with embedded xul:browser elements. Those elemenets outside
of the tab browser have been tracked with "curFrame". Given that
until now there wasn't a single case to handle that, and the
code path is basically untested, it will be removed for now.
Differential Revision: https://phabricator.services.mozilla.com/D84707