Commit Graph

239 Commits

Author SHA1 Message Date
Marco Castelluccio
84a9d2852d Bug 1471769 - Make sure PerTestCoverageUtils doesn't do anything unless per-test mode is enabled. r=jmaher
--HG--
extra : rebase_source : bc11f6bad8ca4392e02c8d736dfb388eec7ffc56
2018-06-28 09:35:45 +01:00
Marco Castelluccio
37e7ee033d Bug 1470151 - Support resetting/dumping coverage counters in per-test mode for xpcshell on Linux. r=jmaher
--HG--
extra : rebase_source : f2d33c3f952a04c96a4ca02691e10ff5241522bf
extra : source : c73f394a4bef01cccd76d635bce9d67e4a48f721
2018-06-21 14:41:32 +01:00
Coroiu Cristina
a2ea371c3c Backed out 3 changesets (bug 1470151) for build bustage at testing/xpcshell/selftest.py on a CLOSED TREE
Backed out changeset c73f394a4bef (bug 1470151)
Backed out changeset 3579431e03dc (bug 1470151)
Backed out changeset ddde7dd347d4 (bug 1470151)
2018-06-27 16:57:10 +03:00
Marco Castelluccio
09c7d31a96 Bug 1470151 - Support resetting/dumping coverage counters in per-test mode for xpcshell on Linux. r=jmaher
--HG--
extra : rebase_source : 92336abb5c9e97dd42d322b4e683c9f617ea4cc2
2018-06-21 14:41:32 +01:00
Ethan Glasser-Camp
a0486a80d1 Bug 1440022: disconnect push tests from actually running r=lina
These tests were only not connecting due to an implementation detail
of the Push component.

MozReview-Commit-ID: 49JPgsfRxTF

--HG--
extra : rebase_source : 10a9116cbd4ecfbd8071b856bfafa59fe6dcdffc
2018-06-13 20:46:17 -04:00
Valentin Gosu
2f9cd15a1b Bug 1463766 - Change do_send_remote_message/do_await_remote_message to allow passing data r=ted
MozReview-Commit-ID: 4OuzgmQlhn5

--HG--
extra : rebase_source : eacd514733d38e20fa21140c6bac1862a6aae075
2018-05-23 16:51:58 +02:00
Boris Zbarsky
16e02a5e28 Bug 1460735 part 1. Remove use of nsIDOMDocument in JS. r=qdot
There are some places where we have a thing which may not even be a node, and
we end up hardcoding the value of DOCUMENT_NODE there, because
"foo.nodeType == foo.DOCUMENT_NODE" will test true if foo is not a node: both
sides will be undefined.
2018-05-29 13:39:00 -04:00
Kris Maglione
01c298aca6 Bug 1460092: Add ESLint rule to enforce use of ChromeUtils.generateQI. r=Gijs
Also fixes existing code which fails the rule.

MozReview-Commit-ID: CkLFgsspGMU

--HG--
extra : rebase_source : 86a43837659aa2ad83a87eab53b7aa8d39ccf55b
2018-05-08 18:36:22 -07:00
Kris Maglione
36be8aabaf Bug 1453881: Part 2 - Assert that task functions do not return generators. r=florian
In older builds, task functions were allowed to return generators, which were
automatically wrapped into tasks using Task.jsm. This model is no longer
supported, so to prevent it from passing silently, we should check for and
reject uses of the old pattern.

MozReview-Commit-ID: 4cHo7pEqYJn

--HG--
extra : rebase_source : c045550457152a8961f0e76e9489c799dfd0840e
extra : histedit_source : 9d2e14a1ab80a6a099101c256b68102ac34513d8
2018-04-12 12:37:28 -07:00
Peter Van der Beken
f5754d679a Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 6: Mark some IDL interfaces as non-scriptable. r=bz.
--HG--
extra : rebase_source : 5911f91bd7a63cd3603494e087e3858bd0527500
2018-03-01 20:19:56 +01:00
Kris Maglione
ad43cab9bd Bug 1446833: Part 4 - Make sure directory service overrides actually take effect. r=rhelmer
The directory service caches certain directory entries, or has them set by
other callers using `.set()`. When we try to override those directories with
custom providers, the cached value still takes precedence.

It might make more sense to just store the directory entry values directly in
the directory service's hash, but this patch just takes the less obtrusive
path of clearing cached values for keys that we override.

This patch also fixes the few instances where add-on manager tests leave files
in the global temporary directory which are now caught by the shutdown
assertions.

MozReview-Commit-ID: Jq92TngLO1L

--HG--
extra : rebase_source : 76eb1f02882bd10151115bf1e934a38d313d0cb2
extra : histedit_source : df0293e06e4357080318beb92c7a1e00766a8799
2018-03-18 15:55:08 -07:00
Kris Maglione
dda7c9b02e Bug 1446833: Part 3 - Match more common head.js filename patterns when filtering assertion stack frames. r=florian
The xpcshell harness tries to filter out head.js stack frames when reporting
errors. When it fails, it tends to report strange error locations, with the
name of a unit test file, but the line number of a line in a head file. This
changes the filter to match more common head.js files, such as head_addons.js.

MozReview-Commit-ID: FASWNSR0Noc

--HG--
extra : rebase_source : ad1fa30c8357ee77c08b4df0acd665a7e625227e
extra : histedit_source : 7dde0025fcc8ba3a86258c7649578966e5cdca53%2C975a6db069f5e34e61cc0f6cbebb0f56ffab816c
2018-03-18 15:32:47 -07:00
Kris Maglione
c09b0c1a99 Bug 1446833: Part 2 - Stop using Task.jsm in xpcshell/head.js. r=florian
MozReview-Commit-ID: 6vSpwih9Fnr

--HG--
extra : rebase_source : 9ca452486f144a35514f00742722b6a59efadacd
extra : histedit_source : af6cc6fef47116a4c98113fcd4fd157217a75106
2018-03-18 15:27:04 -07:00
Kris Maglione
d9f4173494 Bug 1446833: Part 1 - Stop throwing raw numeric error codes in xpcshell/head.js. r=florian
The xpcshell harness expects to catch the Cr result codes that it throws, but
it often fails when an assertion is used in asynchronous code. That results in
a raw numeric error code being reported, with no location information
available to figure out why or where the test is failing.

Throwing an actual Exception object maintains location information for use
when the error is reported.

MozReview-Commit-ID: InuytWhDxBP

--HG--
extra : rebase_source : 79692462549fc0240459000b0b490d046f473b67
extra : histedit_source : 83259c3bb633fd046acc8230ee40e88dd0214a4c%2Cf688ffe04de88a2d5dae3c03af240e90a1f2e398
2018-03-18 15:27:18 -07:00
Mike Cooper
466bc9466e Bug 1436113 - Part 2: Refactor "shield-recipe-client" to "normandy" r=Gijs
MozReview-Commit-ID: 8i9Jrq8rj3W

--HG--
extra : rebase_source : 9fb6772a231d214659d024348a52997c74dd5523
extra : amend_source : 312164e67feb3ac43b6b760cad73a2ff6e1f601a
extra : source : 8ccf1c3f156f19293c8a692585a663c5f685d195
2018-03-02 11:18:59 -08:00
Sebastian Hengst
3a10644021 Backed out 6 changesets (bug 888600) for beta simulation failures: build bustage on Linux and Windows opt (bug 1442036) and devtools failure browser_net_view-source-debugger.js (bug 1441961). a=backout
Backed out changeset 83c87140dc3d (bug 888600)
Backed out changeset 2efb9b1753f6 (bug 888600)
Backed out changeset af5303781961 (bug 888600)
Backed out changeset 79ef59047e63 (bug 888600)
Backed out changeset 30d568d628dd (bug 888600)
Backed out changeset c7bd4c6c9741 (bug 888600)

--HG--
extra : histedit_source : 791b22f6770f4fead2f909478a93d65d85829fe0%2Cbb387309e90f53e1dde45dcf8cf4ebedcc6e5c5e
2018-03-01 11:51:09 +02:00
Florian Quèze
0381f3a8ed Bug 1433175 - Fix xpcshell tests, 'Cc' isn't defined in that scope, so use _Services.tm directly, r=Mossop, a=Aryx on CLOSED TREE 2018-02-28 18:51:35 +01:00
Florian Quèze
f3ee8dd20b Bug 1433175 - more aggressive scripted patch to replace remaining Components.classes, Components.interfaces, Components.utils and Components.results uses with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:35 +01:00
Florian Quèze
c714053d73 Bug 1433175 - scripted patch to replace Components.classes[, Components.interfaces.nsI, Components.utils. and Components.results. with Cc, Ci, Cu and Cr, r=Mossop. 2018-02-28 18:51:33 +01:00
Peter Van der Beken
6cf0e1c871 Bug 888600 - Move ContentFrameMessageManager to WebIDL. Part 6: Mark some IDL interfaces as non-scriptable. r=bz.
--HG--
extra : rebase_source : f6f781b04923f67f60718706a78b3c4de15eca94
2018-02-22 20:22:29 +01:00
Mark Banner
01319d9d04 Bug 1437584 - Enable ESLint rule mozilla/use-services for testing/. r=jmaher
MozReview-Commit-ID: DMkgj5UAId4

--HG--
extra : rebase_source : 155f657e68f04850e878535afdb1421933b4a13b
2018-02-12 17:10:00 +00:00
Kris Maglione
918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Cosmin Sabou
9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Kris Maglione
6476f95b13 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
2018-01-29 15:20:18 -08:00
Brindusan Cristian
af8879d1eb Backed out 2 changesets (bug 1431533) for ESlint failures on a CLOSED TREE
Backed out changeset 6e56f4c8843e (bug 1431533)
Backed out changeset 12fc4dee861c (bug 1431533)
2018-01-30 02:32:43 +02:00
Kris Maglione
c276bb9375 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : rebase_source : c004a023389f1f6bf3d2f3efe93c13d423b23ccd
2018-01-29 15:20:18 -08:00
Florian Quèze
db57009a12 Bug 1421992 - Rename do_execute_soon, do_print and do_register_cleanup to executeSoon, info and registerCleanupFunction to match mochitest names, r=Gijs. 2017-12-21 11:08:23 +01:00
Florian Quèze
7dcab2c656 Bug 1421992 - Remove obsolete do_check_* implementations, r=Gijs. 2017-12-21 11:08:21 +01:00
Florian Quèze
032c961e0a Bug 1421992 - script-generated patch to replace do_check_* functions with their Assert.* equivalents, rs=Gijs. 2017-12-21 11:08:17 +01:00
Mark Banner
0f97956b04 Bug 1421604 - Make do_test_pending() be called before checks for skipping xpcshell-tests so that the pending counts are correct. r=ahal
MozReview-Commit-ID: HHHjpOybunU

--HG--
extra : rebase_source : b68eb7509d6e8676c5380e1d6885c6006d34b43f
2017-11-29 13:03:46 +00:00
Julian Descottes
af2e5d5dd1 Bug 1416711 - Add registerAllActors API;r=ochameau
Most of the codebase that needs to create a debugger server
can use a server with all actors registered.

Define an additional method registerAllActors to do that.

By previous implementations, all the call sites that were
using browser: true were indirectly using tab & root: true
as well. So all the call sites using browser: true have been
migrated to registerAllActors and the specific behavior of
the browser: true case has been removed. Passing browser:true
to registerActors now only registers browser specific actors.

MozReview-Commit-ID: F3sx71eGrdG

--HG--
extra : rebase_source : 7704264e84d96e03a0c789103ff466980913d4d2
2017-11-13 21:22:15 +01:00
Julian Descottes
4cac7dcb25 Bug 1416711 - Migrate addBrowser/TabActors to registerActors;r=ochameau
DebuggerServer has old APIs addBrowserActors & addTabActors that can be
replaced by calls to registerActors.

MozReview-Commit-ID: KpYJpbSHM8I

--HG--
extra : rebase_source : c7f20edf503b944ef2582b5fe73bd6d899c0d1cc
2017-11-13 20:29:55 +01:00
Dan Banner
b2e847755c Bug 1367704 - Enable the semi ESLint rule across the tree. r=standard8
MozReview-Commit-ID: GrlcOI9K2hJ

--HG--
extra : rebase_source : 6574cf3c67eb11733ffd9999c260f71c8551abc4
2017-05-28 19:57:46 +01:00
Geoff Brown
cbb956e0c3 Bug 1407679 - Merge nsIIOService and nsIIOService2; r=nwgh 2017-11-10 07:03:36 -07:00
Andrea Marchesini
207b8d909e Bug 1347515 - Get rid of nsIJSON.decodeFromStream, r=qdot 2017-11-10 00:27:22 +01:00
Paolo Amadini
dac52b86d6 Bug 1412282 - Allow calling Assert.jsm methods directly from other test-only modules. r=mikedeboer
This adds a global instance that can be used by invoking assertion methods directly on the imported Assert object. The test suites set the global reporter function to the one for the currently running test.

MozReview-Commit-ID: 8dksVc9o7r

--HG--
extra : rebase_source : 3e382c6d24c6019d29963811c37469cfc23b928f
2017-10-27 14:38:30 +01:00
Sebastian Hengst
1ead0a96a9 Backed out changeset dab1c5badddb (bug 1407679) for failing server startup in mochitests on Android. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 3dc4cb2bbaf55f3f6329687ce64d4e862fc3800b
2017-10-24 21:18:26 +02:00
Valentin Gosu
9dd47ebf50 Bug 1407679 - Merge nsIIOService and nsIIOService2 r=nwgh
Removes deprecated nsIIOService2.newChannelFromURIWithProxyFlags

MozReview-Commit-ID: Gr3nA25kcre

--HG--
extra : rebase_source : 3407b5ed0f8f7067523abee28c137db3cac86b14
2017-10-20 16:41:07 +02:00
Steve Armand
e46ff00709 Bug 1368967 - Enable the ESLint generator-star-spacing rule across mozilla-central. r=standard8
MozReview-Commit-ID: 5do3eoCEAMR

--HG--
extra : rebase_source : 5f692e474e1d7d173fcb4c9c08617f0fe489e443
2017-09-04 00:49:32 -04:00
Masatoshi Kimura
8b713b2b0f Bug 1375125 - Stop using nsILocalFile in the tree. r=froydnj
This mechanically replaces nsILocalFile with nsIFile in
*.js, *.jsm, *.sjs, *.html, *.xul, *.xml, and *.py.

MozReview-Commit-ID: 4ecl3RZhOwC

--HG--
extra : rebase_source : 412880ea27766118c38498d021331a3df6bccc70
2017-08-04 17:49:22 +09:00
Mike de Boer
9b07b832b3 Bug 1380470 - Part 3 - Add add_task().skip() and add_task().only() for XPCShell unit tests. r=ahal
This suite already had `add_task.skip(aTask)` and `add_task.only(aTask)`
implemented, which required quite a bit more boilerplate code to get them right.
I removed this API in favor of `add_task(aTask).skip()` and `add_task(aTask).only()`
so that it's the same signature as Mochitest-browser and Mochitest-chrome.
I also noticed that `add_task` was defined twice, right above the other, which
was of course the latest version. I removed the latter.

MozReview-Commit-ID: BSCCXorzSlC

--HG--
extra : rebase_source : 9fe671baa357882258e1e94e47981185f37e246a
2017-07-18 15:07:38 +02:00
Andrew McCreight
1b0c3c5f57 Bug 1100635 - Fix strict warning in xpcshell/head.js. r=cmanchester+432261
MozReview-Commit-ID: 3KktUF0n5GB

--HG--
extra : rebase_source : 8a560a3ebc3ad56c6011c01c0b8df71184887af6
2017-06-16 15:30:47 -07:00
Nathan Froyd
b28fcc5c4b Bug 1372670 - part 5 - add nsIThreadManager::spinEventLoopUntilEmpty; r=erahm,florian
A number of places in JS need to drain the current thread's event queue,
which cannot be done with nsIThreadManager::spinEventLoopUntil, since we
need to not wait for an incoming event when attempting to process one.
2017-06-21 12:59:28 -04:00
Nathan Froyd
27c58cf89f Bug 1372670 - part 3 - add spinEventLoopUntil to nsIThreadManager; r=erahm,florian 2017-06-21 12:59:28 -04:00
Geoff Brown
0da0034332 Bug 1367235 - Additional changes for eslint on testing/xpcshell; r=Standard8 2017-05-25 07:32:44 -06:00
Geoff Brown
6fe3dae59f Bug 1367235 - Enable eslint on testing/xpcshell - mechanical updates; r=Standard8 2017-05-25 07:32:42 -06:00
Mike Cooper
94879bdf84 Bug 1361578 - Remove SelfSupport, since it is obsoleted by shield-recipe-client. r=Gijs
MozReview-Commit-ID: 1FCqNa5wxZk

--HG--
extra : rebase_source : a7a20b4376ecaf2d4e91da27a7b7b32091f03dbd
2017-05-19 10:02:11 -07:00
Francois Marier
39b6d88744 Bug 1364959 - Clean up Safe Browsing preferences in tests. r=dimi
Remove the forbiddenURI pref which was removed in bug 1274893 as well
as browser.safebrowsing.enabled which got renamed in bug 1025965.

Set dummy URLs for all of the network endpoints.

MozReview-Commit-ID: Efk2fv6cC3g

--HG--
extra : rebase_source : 9fbb3eb0fa7f002fe24577a8a0870ec4d1b7cf31
2017-05-18 16:18:59 -07:00
Greg Mierzwinski
5d46e96825 Bug 1360667 - Change location of coverage collection in xpcshell. r=jmaher
MozReview-Commit-ID: EsA8hTKd15Y

--HG--
extra : rebase_source : 4f2e5bd8b2ecb6dee6b2b85f9687b62feb6c9531
2017-04-28 15:20:37 -04:00
Florian Queze
4c6a68d1c9 Bug 1355161 - script-generated patch to replace .{currentThread,mainThread}.dispatch(..., Ci.nsIThread.DISPATCH_NORMAL) with .dispatchToMainThread(...), r=froydnj. 2017-04-14 18:29:12 +02:00