Commit Graph

4261 Commits

Author SHA1 Message Date
Nicolas Chevobbe
1d0da18eef Bug 1708699 - Add the ability to set headers from GET parameters in document-builder.sjs. r=mconley.
Differential Revision: https://phabricator.services.mozilla.com/D113980
2021-04-30 15:48:53 +00:00
Joel Maher
a297be1afe Bug 1699456 - fix message for normal crash path. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D113376
2021-04-26 19:07:46 +00:00
Butkovits Atila
2e34e363b9 Backed out 2 changesets (bug 1696251) for causing js-bench-sm failures. CLOSED TREE
Backed out changeset 1c84c9a34575 (bug 1696251)
Backed out changeset e169193b7423 (bug 1696251)
2021-04-23 02:53:36 +03:00
Alex Lopez
d1a82b8092 Bug 1696251 - Pass MachCommandBase object as first argument for Mach Commands. r=mhentges,remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers
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
2021-04-22 18:56:15 +00:00
Florian Quèze
8579c53f5b Bug 1706432 - mochitest --profiler should open the captured profile at the end of accessibility tests, r=gbrown.
Differential Revision: https://phabricator.services.mozilla.com/D112800
2021-04-21 15:19:44 +00:00
Kagami Sascha Rosylight
9e2ce50d93 Bug 1637259 - Dispatch touch event for WM_POINTER r=edgar,aklotz
Differential Revision: https://phabricator.services.mozilla.com/D111513
2021-04-21 00:13:14 +00:00
Florian Quèze
c238647be5 Bug 1703583 - automatically reject waitForEvent, waitForCondition and topicObserved promises at the end of a browser test, r=Gijs.
Differential Revision: https://phabricator.services.mozilla.com/D111115
2021-04-19 21:56:04 +00:00
Cosmin Sabou
785f9b8a87 Backed out changeset d4a5d8567977 (bug 1696251) for non-unified build bustages. CLOSED TREE 2021-04-19 19:43:31 +03:00
Alex Lopez
75dfe35468 Bug 1696251 - Pass MachCommandBase object as first argument for Mach Commands. r=mhentges,remote-protocol-reviewers,marionette-reviewers,webdriver-reviewers,perftest-reviewers
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
2021-04-19 16:15:11 +00:00
Andrew Halberstadt
d0cd0fcc69 Bug 1705431 - [mochitest] Refactor MessageLogger.TEST_PATH_PREFIXES into regexes and catch https://mochi.test urls, r=marco
Using regexes will be a little less brittle in the event we change things like
ports or prefix paths.

Differential Revision: https://phabricator.services.mozilla.com/D112354
2021-04-19 12:57:12 +00:00
Geoff Brown
c792752b09 Bug 1704245 - Dump less device info in android test logs; r=jmaher
Make android test logs simpler and easier to read by removing less helpful diagnostic info.

Differential Revision: https://phabricator.services.mozilla.com/D111526
2021-04-12 13:38:28 +00:00
Makoto Kato
ef3c3e56b4 Bug 1700365 - Add workaround that disables zoom to focused input. r=masayuki
This test is often failure on debug build due to zoom to focused input.

Depends on D110198

Differential Revision: https://phabricator.services.mozilla.com/D111366
2021-04-09 09:25:36 +00:00
Makoto Kato
3ed8588b5a Bug 1700365 - synthesizeNativeMouseEvent works on mobile viewport. r=masayuki
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
2021-04-09 09:25:36 +00:00
Kris Maglione
1dc330007c Bug 1701777: Fix timeout handling for xorigin mochitests. r=mccr8
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
2021-04-08 18:34:07 +00:00
Butkovits Atila
24b6ba53d1 Backed out changeset 5221d3a8cc55 (bug 1701777) for causing failures on test_conformance__textures__misc__texture-corner-case-videos.html . 2021-04-08 05:23:26 +03:00
Kris Maglione
a4743a3c00 Bug 1701777: Fix timeout handling for xorigin mochitests. r=mccr8
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
2021-04-07 19:02:41 +00:00
Andreas Pehrson
e69cd8315d Bug 1695580 - Remove mochitest rdd leak threshold. r=mjf,mccr8
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
2021-04-06 20:15:12 +00:00
Brindusan Cristian
f78d18d827 Backed out 8 changesets (bug 1695580) for causing build bustages on DataMutex.h. CLOSED TREE
Backed out changeset ec0b0fcc8d88 (bug 1695580)
Backed out changeset 982a46056fcb (bug 1695580)
Backed out changeset e38e8b90f119 (bug 1695580)
Backed out changeset 6fdd154aa151 (bug 1695580)
Backed out changeset d04f7a7ec375 (bug 1695580)
Backed out changeset 2103cd9e58b7 (bug 1695580)
Backed out changeset de9a7dd7fc79 (bug 1695580)
Backed out changeset ae16f09be41b (bug 1695580)
2021-04-06 17:41:19 +03:00
Andreas Pehrson
c41df44112 Bug 1695580 - Remove mochitest rdd leak threshold. r=mjf,mccr8
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
2021-04-06 12:16:12 +00:00
Joel Maher
224db8c460 Bug 1699456 - When browser-chrome tests have a single test and crash, failures in log processing as the crash is handled in python instead of javascript. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D108958
2021-03-31 22:09:29 +00:00
Florian Quèze
113408d081 Bug 1701524 - add more inner window ids in markers, r=canaltinova.
Differential Revision: https://phabricator.services.mozilla.com/D110046
2021-03-31 18:23:13 +00:00
Butkovits Atila
a1e81094c7 Backed out changeset a76d892ff13b (bug 1701777) for causing failures on test_conformance__textures__misc__texture-corner-case-videos.html. CLOSED TREE 2021-03-31 09:06:47 +03:00
Kris Maglione
0cb6c22523 Bug 1701777: Fix timeout handling for xorigin mochitests. r=mccr8
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
2021-03-31 02:02:36 +00:00
Andrew Halberstadt
f9ca327432 Bug 1701278 - [mochitest] Run mochitest selftests with browser-chrome, r=jmaher
This will give us coverage with the browser-chrome flavor.

Differential Revision: https://phabricator.services.mozilla.com/D109933
2021-03-29 14:26:37 +00:00
Joel Maher
5c7db23d07 Bug 1701278 - [mochitest] Add mochitest selftest test files for browser-chrome r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D109934
2021-03-29 14:26:37 +00:00
Doug Thayer
ec23c3ca31 Bug 1693133 - Fix resetProfile.xhtml tests r=Gijs
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
2021-03-25 17:28:56 +00:00
Andrew Halberstadt
d581304cf1 Bug 1699932 - [ci] Run mochitest and reftest selftests with Python 3, r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D109207
2021-03-22 16:36:34 +00:00
Luca Greco
7b459bbed3 Bug 1698158 - part 3.2 - Remove unnecessary imports from testharness addons experimental API. r=mixedpuppy
Differential Revision: https://phabricator.services.mozilla.com/D108229
2021-03-16 18:15:41 +00:00
Geoff Brown
605df9dfee Bug 1698131 - Suppress websocket server errors in mochitests; r=jmaher
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
2021-03-15 13:53:10 +00:00
Florian Quèze
06bedf6439 Bug 1697797 - Add profiler markers on BrowserTestUtils, TestUtils and SpecialPowers methods, r=mconley.
Differential Revision: https://phabricator.services.mozilla.com/D108009
2021-03-11 21:39:50 +00:00
Gijs Kruitbosch
ea276e4ba5 Bug 1696793 - improve close and multiple dialog handling for window-modal dialogs, r=mtigley
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
2021-03-11 11:34:35 +00:00
Geoff Brown
20efec2f73 Bug 1683177 - Improve mochitest web server shutdown and avoid exception under py3 on Windows; r=ahal
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
2021-03-10 14:24:35 +00:00
Jonathan Kew
ceb44d34d6 Bug 1664730 - Disable async font fallback when running mochitests, to avoid unpredictable extra reflows that can disrupt event-/timing-sensitive tests. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D107284
2021-03-10 12:26:52 +00:00
smolnar
7322fda0de Backed out changeset 1f4840599e64 (bug 1683177) for causing mochitest failures on windows in quota/QuotaManagerService. CLOSED TREE 2021-03-09 01:03:51 +02:00
Geoff Brown
56dac85cb7 Bug 1683177 - Improve mochitest web server shutdown and avoid exception under py3 on Windows; r=ahal
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
2021-03-08 21:07:56 +00:00
James Graham
b9682a9785 Bug 1695263 - Import marionette from driver not harness, r=marionette-reviewers,whimboo
This avoids a lot of unnecessary extra work and dependencies.

Differential Revision: https://phabricator.services.mozilla.com/D106760
2021-03-03 10:03:03 +00:00
Geoff Brown
a8b25adc35 Bug 1695784 - py3 updates for mochitest with --use-test-media-devices; r=jmaher
Allow for clib text/binary conversions under py3.

Differential Revision: https://phabricator.services.mozilla.com/D106854
2021-03-02 00:16:43 +00:00
Andrew Osmond
49ab54fc3d Bug 1693383 - Part 2. Add 'swgl' for Software WebRender in mochitest manifest parsing. r=jgraham
This matches 'swgl' for reftests.

Differential Revision: https://phabricator.services.mozilla.com/D105663
2021-02-24 18:47:24 +00:00
Agi Sferro
a5bf648b7d Bug 1692058 - Open temporary file in w mode when running multiple junit tests. r=droeh,mhentges
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
2021-02-24 17:03:32 +00:00
Agi Sferro
816cdb938f Bug 1609198 - Print logcat on junit test failure. r=droeh,nalexander
This also adds a --verbose flag to |mach geckoview-junit| which always prints
the logcat for every test.

Differential Revision: https://phabricator.services.mozilla.com/D104769
2021-02-24 17:02:54 +00:00
Masayuki Nakano
1c60ca0e2c Bug 1691622 - part 12: Change the default unit of screenX/Y of synthesizeNativeMouseEvent from device pixels to CSS pixels r=smaug
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
2021-02-24 01:27:11 +00:00
Masayuki Nakano
876ef492b9 Bug 1691622 - part 11: Make mochitests stop using nsIDOMWindowUtils.sendNativeMouseEvent directly as far as possible r=smaug
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
2021-02-24 01:27:11 +00:00
Masayuki Nakano
b77b790e20 Bug 1691622 - part 10: Make synthesizeNativeMouseEvent take a button argument r=smaug
Now, it should take `button` argument whose default value is 0 (primary
button).

Differential Revision: https://phabricator.services.mozilla.com/D105764
2021-02-24 01:27:10 +00:00
Masayuki Nakano
ef2253b4a1 Bug 1691622 - part 9: Make nsIWidget::SynthesizeNativeMouseEvent take an XP button ID and abstract message value r=smaug,geckoview-reviewers,agi,m_kato
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
2021-02-24 01:27:10 +00:00
Masayuki Nakano
bc2a8bc131 Bug 1691622 - part 7: Merge synthesizeNativeMouseMove* with synthesizeNativeMouseEvent* r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D105761
2021-02-24 01:27:09 +00:00
Masayuki Nakano
44ff291cb4 Bug 1691622 - part 6: Merge synthesizeNativeMouseClick* with synthesizeNativeMouseEvent* r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D105760
2021-02-24 01:27:08 +00:00
Masayuki Nakano
293d2541c8 Bug 1691622 - part 5: Make synthesizeNativeMouseClick* take an event type r=smaug
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
2021-02-24 01:27:08 +00:00
Masayuki Nakano
b63882dde8 Bug 1691622 - part 4: Make synthesizeNativeMouseClick*() aware of modifiers r=smaug,geckoview-reviewers,m_kato
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
2021-02-24 01:27:07 +00:00
Masayuki Nakano
613d02b00b Bug 1691622 - part 3: Make synthesizeNativeMouseClick take screenX/Y r=smaug
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
2021-02-24 01:27:07 +00:00
Masayuki Nakano
0d0a504a13 Bug 1691622 - part 2: Merge synthesizeNativeMouseClickAtCenter with synthesizeNativeMouseClick r=smaug
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
2021-02-24 01:27:07 +00:00