As an intermediate step to allow mach commands as standalone functions, the MachCommandBase
subclass instance that currently corresponds to self has to be made available as a separate
argument (named command_context).
Differential Revision: https://phabricator.services.mozilla.com/D109650
As an intermediate step to allow mach commands as standalone functions, the MachCommandBase
subclass instance that currently corresponds to self has to be made available as a separate
argument (named command_context).
Differential Revision: https://phabricator.services.mozilla.com/D109650
We have to consider mobile viewport scale to calculate screen position.
And mozInnerScreen isn't valid position if that scale isn't 1 (bug 1701546).
Also, this function won't work on Fission+xorigin with mobile viewport due to
no way to get current mobile viewport scale since window.top isn't same
origin.
Differential Revision: https://phabricator.services.mozilla.com/D110198
This copies some of the basic diagnostic reporting logic from SimpleTest to
TestRunner so that it can report timeout errors without an unnecessary
async roundtrip, and moves timeout handling to use a "message" event which
works in both in-process and out-of-process modes.
Differential Revision: https://phabricator.services.mozilla.com/D110326
This copies some of the basic diagnostic reporting logic from SimpleTest to
TestRunner so that it can report timeout errors without an unnecessary
async roundtrip, and moves timeout handling to use a "message" event which
works in both in-process and out-of-process modes.
Differential Revision: https://phabricator.services.mozilla.com/D110326
It's unclear whether this bug fixes the leaks that prompted this leak threshold,
or whether they were already fixed. It is however clear that mochitests now run
without leaking.
Differential Revision: https://phabricator.services.mozilla.com/D109784
It's unclear whether this bug fixes the leaks that prompted this leak threshold,
or whether they were already fixed. It is however clear that mochitests now run
without leaking.
Differential Revision: https://phabricator.services.mozilla.com/D109784
This copies some of the basic diagnostic reporting logic from SimpleTest to
TestRunner so that it can report timeout errors without an unnecessary
async roundtrip, and moves timeout handling to use a "message" event which
works in both in-process and out-of-process modes.
Differential Revision: https://phabricator.services.mozilla.com/D110326
BrowserTestUtils.promiseAlertDialog and friends account for commonDialog.xhtml,
but not other dialogs which go through gDialogBox. This fixes that by adding a
inWindowDialog option to promiseAlertDialog. I don't like this solution very
much - it requires all of these dialogs to fire the event themselves. An
alternative might be putting this code in some file which these all include,
but given how small the code is that feels like overkill. Alternatives welcome.
Differential Revision: https://phabricator.services.mozilla.com/D109674
mod_pywebsocket3 inherits the stdout and stderr handles of its parent process
(the mochitest harness), so anything printed by the websocket server will appear
in the mochitest log. Most websocket server output is logged to a separate log
file, but exceptions are dumped to stderr.
test_worker_websocket2.html appropriately tests special unicode characters in
the reason code used when closing the websocket. On Windows, under python-3,
the special content of that reason code causes an exception in the mod_pywebsocket3
logging, which is reported to the mochitest log; the test still passes and the
websocket server continues to run correctly, but the exception is picked up by
the treeherder log parser as a "failure".
This patch suppresses the websocket server stderr so that any exception reported
by the websocket server will not affect test status directly.
Differential Revision: https://phabricator.services.mozilla.com/D108308
The html:dialog event can respond to [esc] keypresses itself. In that case,
we need to close the embedded dialog ourselves, or the UI ends up broken.
We also need to make sure that if e.g. the opening multiple pages from bookmarks warning is up,
and then the user tries to quit or in some other way opens another dialog, things don't break.
This also applies to tests that repeatedly invoke dialogs, where we need to wait for both
the SubDialog instance and the wrapping html:dialog element to agree on their state.
Differential Revision: https://phabricator.services.mozilla.com/D107463
The exception seen in this bug can be avoided by simply replacing the terminate() call
with kill(). While we're here, I've tried to simplify the shutdown logic and improve
logging.
Differential Revision: https://phabricator.services.mozilla.com/D107528
The exception seen in this bug can be avoided by simply replacing the terminate() call
with kill(). While we're here, I've tried to simplify the shutdown logic and improve
logging.
Differential Revision: https://phabricator.services.mozilla.com/D107528
We're trying to store a string in a file open in binary mode which doesn't work :)
I'm guessing this was allowed in Python2 or some older 3 version.
Differential Revision: https://phabricator.services.mozilla.com/D104751
For minimizing the previous patch changes, `scale`'s default value for
`screenX/Y` is treated as 1.0. It means that `screenX/Y` are device
pixels by default, but `offsetX/Y` are in CSS pixels by default. This
difference may make developers confused. Therefore, we should align the
default unit of them to `screenPixelsPerCSSPixel`. I.e., their default
unit becomes CSS pixels.
Differential Revision: https://phabricator.services.mozilla.com/D105929
For making the test framework/API change easier, such raw API shouldn't be
used directly. Therefore, this patch makes tests using it directly stop
using it and use `synthesizeNativeMouseEvent` instead.
However, this patch does not fix `browser_touch_event_iframes.js` because
it accesses the API from `ContentTask`. So, `EventUtils.js` isn't available
without larger change.
Note that this patch disables `test_bug596600.xhtml` because as I commented
in it, it's completely broken. It depends on the race of next native event
loop and `waitForTick`, and this patch changes the result of the race.
Differential Revision: https://phabricator.services.mozilla.com/D105765
Currently, it takes a raw native message value, but it makes JS content too
complicated. And on Linux, it cannot synthesize non-primary button events
because GDK has only button press and release messages which dont' include
mouse button information.
For solving these problems, this patch creates a new abstract native message
as `nsIWidget::NativeMouseMessage` and makes each widget converts it to
a platform native message.
Additionally, this patch adds an argument to make it possible its callers
to specify pressing or releasing mouse button with a DOM mouse button value.
Note that the following patch adds new argument to
`synthesizeNativeEventMouse*` for mochitests and which will be tested by
new tests.
Differential Revision: https://phabricator.services.mozilla.com/D105763
Let's make `synthesizeNativeMouseClick*` take an event type, and only when
it's click, it should send native mouse event twice.
Then, we can all them `synthesizeNativeMouseEvent*`.
Differential Revision: https://phabricator.services.mozilla.com/D105759
Surprisingly, they don't take modifiers, and
`nsIWidget::SynthesizeNativeMouseEvent()` which are implementations of
`nsIDOMWindowUtils::SendNativeMouseEvent()` treat given modifier flags
are native's ones, and handle modifiers only on macOS. Therefore, this
patch makes them handle native modifiers of Gecko.
Unfortunately, I'm not so familiar with Android API, and in the short
term, I don't need the support on Android. Therefore, this patch just
adds a TODO comment on Android widget.
Additionally, we don't have a simple way to set modifier only while
posting a mouse input on Windows too. It requires complicated code.
Therefore, I don't add the support for it on Windows too.
Differential Revision: https://phabricator.services.mozilla.com/D105758
Some tests want to specify screen position directly. Therefore, they should
have additional fields in the `Object` param to take offset in screen.
Differential Revision: https://phabricator.services.mozilla.com/D105757
With adding new feild to the `aParam`, `synthesizeNativeMouseClick` can
work as `synthesizenativeMouseClickAtCenter` too. Therefore, we can get
rid of the redundant API.
Additionally, this patch makes `synthesizeNativeMouseClickWithAPZ` can
take the new field for consistency between them.
Differential Revision: https://phabricator.services.mozilla.com/D105756