Граф коммитов

262 Коммитов

Автор SHA1 Сообщение Дата
Kris Maglione 950b0fc87b Bug 1524687: Part 10 - Convert Windows widget module to static registration. r=erahm
--HG--
extra : source : 614be688767fed0d16362dc5fbf0d34fc3c65579
extra : intermediate-source : accad7b4cbc71f35ffd4912044aa82c45872bb94
2019-01-25 15:20:36 -08:00
arthur.iakab 470dbf03b6 Backed out 5 changesets (bug 1524687) for causing build bustages on platform.h CLOSED TREE
Backed out changeset 0f06a6b51bfe (bug 1524687)
Backed out changeset 7a1ef487a9e7 (bug 1524687)
Backed out changeset accad7b4cbc7 (bug 1524687)
Backed out changeset eb33f7e6467c (bug 1524687)
Backed out changeset 86cf09db340b (bug 1524687)
2019-02-21 02:04:02 +02:00
Kris Maglione 1d81cfc069 Bug 1524687: Part 10 - Convert Windows widget module to static registration. r=erahm
--HG--
extra : rebase_source : b64845009833ae2dd808111d52c137b784a23c88
extra : source : 614be688767fed0d16362dc5fbf0d34fc3c65579
2019-01-25 15:20:36 -08:00
Kris Maglione ee6633da5c Bug 1478124: Part 1 - Update component mocks to replace and restore components sanely. r=froydnj
For static components, I don't intend to allow removing or replacing CID
entries, only contract ID entries. And I would generally prefer, when
restoring overrides of those classes, to not create a new dynamic factory
entry for the contract ID.

We already have the ability to mock components without either of those issues,
but registering a new CID entry for the mock (without unregistering the
original), and then restoring the original by calling `registerFactory` with a
null factory object.

This patch updates our existing mocks to behave that way, and paves the way
for the rest of the patches.

Differential Revision: https://phabricator.services.mozilla.com/D15031

--HG--
extra : rebase_source : 449f37ae8a3cc970e5f864d10e43e88d9e7e4bf6
extra : source : bedaa9c437ad30ea88bdc0e8fc83f4a2e980812e
2018-12-19 15:49:48 -08:00
arthur.iakab c1fae83952 Backed out 16 changesets (bug 1478124) for failing android geckoview-junit CLOSED TREE
Backed out changeset fce62c77a56b (bug 1478124)
Backed out changeset eb2fa3b5edf7 (bug 1478124)
Backed out changeset 8dacce59fcc0 (bug 1478124)
Backed out changeset 012fd0107204 (bug 1478124)
Backed out changeset 496aaf774697 (bug 1478124)
Backed out changeset 21f4fda03159 (bug 1478124)
Backed out changeset b0444e0bc801 (bug 1478124)
Backed out changeset d94039b19943 (bug 1478124)
Backed out changeset 5d85deac61c2 (bug 1478124)
Backed out changeset 929fd654c9df (bug 1478124)
Backed out changeset 1ddd80d9e91a (bug 1478124)
Backed out changeset b8d2dfdfc324 (bug 1478124)
Backed out changeset f500020a273a (bug 1478124)
Backed out changeset dd00365ebb55 (bug 1478124)
Backed out changeset 538e40c5ee13 (bug 1478124)
Backed out changeset bedaa9c437ad (bug 1478124)
2019-01-29 10:03:06 +02:00
Kris Maglione f1f3101eb5 Bug 1478124: Part 1 - Update component mocks to replace and restore components sanely. r=froydnj
For static components, I don't intend to allow removing or replacing CID
entries, only contract ID entries. And I would generally prefer, when
restoring overrides of those classes, to not create a new dynamic factory
entry for the contract ID.

We already have the ability to mock components without either of those issues,
but registering a new CID entry for the mock (without unregistering the
original), and then restoring the original by calling `registerFactory` with a
null factory object.

This patch updates our existing mocks to behave that way, and paves the way
for the rest of the patches.

Differential Revision: https://phabricator.services.mozilla.com/D15031

--HG--
extra : rebase_source : 61ef2435d764c2d9daee6a16515eb0efd94a6454
2018-12-19 15:49:48 -08:00
Kris Maglione e930b89c34 Bug 1514594: Part 3 - Change ChromeUtils.import API.
***
Bug 1514594: Part 3a - Change ChromeUtils.import to return an exports object; not pollute global. r=mccr8

This changes the behavior of ChromeUtils.import() to return an exports object,
rather than a module global, in all cases except when `null` is passed as a
second argument, and changes the default behavior not to pollute the global
scope with the module's exports. Thus, the following code written for the old
model:

  ChromeUtils.import("resource://gre/modules/Services.jsm");

is approximately the same as the following, in the new model:

  var {Services} = ChromeUtils.import("resource://gre/modules/Services.jsm");

Since the two behaviors are mutually incompatible, this patch will land with a
scripted rewrite to update all existing callers to use the new model rather
than the old.
***
Bug 1514594: Part 3b - Mass rewrite all JS code to use the new ChromeUtils.import API. rs=Gijs

This was done using the followng script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/tip/processors/cu-import-exports.jsm
***
Bug 1514594: Part 3c - Update ESLint plugin for ChromeUtils.import API changes. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D16747
***
Bug 1514594: Part 3d - Remove/fix hundreds of duplicate imports from sync tests. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16748
***
Bug 1514594: Part 3e - Remove no-op ChromeUtils.import() calls. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16749
***
Bug 1514594: Part 3f.1 - Cleanup various test corner cases after mass rewrite. r=Gijs
***
Bug 1514594: Part 3f.2 - Cleanup various non-test corner cases after mass rewrite. r=Gijs

Differential Revision: https://phabricator.services.mozilla.com/D16750

--HG--
extra : rebase_source : 359574ee3064c90f33bf36c2ebe3159a24cc8895
extra : histedit_source : b93c8f42808b1599f9122d7842d2c0b3e656a594%2C64a3a4e3359dc889e2ab2b49461bab9e27fc10a7
2019-01-17 10:18:31 -08:00
Mark Banner 8e9e4602f8 Bug 1517456 - Make Task.jsm a test-only module. r=florian
Differential Revision: https://phabricator.services.mozilla.com/D15647

--HG--
rename : toolkit/modules/Task.jsm => toolkit/modules/tests/modules/Task.jsm
extra : moz-landing-system : lando
2019-01-04 08:41:58 +00:00
Logan Smyth 4ee33b0d6d Bug 1514248 - Reimplement xpcshell test debugging using a public thread-actor API. r=jlast
Differential Revision: https://phabricator.services.mozilla.com/D14561

--HG--
extra : moz-landing-system : lando
2018-12-14 17:33:45 +00:00
Mark Banner 0304564ac7 Bug 1415483 - Apply the new options to reject-importGlobalProperties across the codebase, remove unnecessary importGlobalProperties. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D13754

--HG--
extra : moz-landing-system : lando
2018-12-11 21:39:40 +00:00
Csoregi Natalia 9e970681f2 Backed out 2 changesets (bug 1415483) for multiple failures e.g. on test_message_manager_ipc.html. CLOSED TREE
Backed out changeset d00748de66fc (bug 1415483)
Backed out changeset 8dea94258f54 (bug 1415483)
2018-12-11 19:30:57 +02:00
Mark Banner 1abdc8687f Bug 1415483 - Apply the new options to reject-importGlobalProperties across the codebase, remove unnecessary importGlobalProperties. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D13754

--HG--
extra : moz-landing-system : lando
2018-12-11 14:09:44 +00:00
Shane Caraveo 22a10e6ade Bug 1505553 add record to xpcshell tests for use in extension tests, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D11248

--HG--
extra : moz-landing-system : lando
2018-11-09 14:43:54 +00:00
Daisuke Akatsuka 56d22dec55 Bug 1497448: Use SocketListener directly. r=ochameau,jdescottes
Depends on D10865

Differential Revision: https://phabricator.services.mozilla.com/D10867

--HG--
extra : moz-landing-system : lando
2018-11-08 00:41:18 +00:00
Andrew Halberstadt 88e52fc195 Bug 1460914 - [xpcshell] Define preferences in testing/profiles instead of testing/xpcshell/head.js, r=ted
This commit creates an empty 'base' profile because I wanted to preserve the
ability to apply a pref to all test harnesses on try. Since xpcshell doesn't
share many prefs with the other harnesses, it can't use the common profile.

So adding a pref to 'common' will apply it everywhere except xpcshell. Adding
a pref to 'base' will apply it everywhere including xpcshell. These profiles
are starting to get a bit messy, but I'd like to punt re-organizing them to a
follow-up bug.

Depends on D9716

Differential Revision: https://phabricator.services.mozilla.com/D9717

--HG--
extra : moz-landing-system : lando
2018-10-26 17:47:18 +00:00
Andrew Halberstadt 203cc276de Bug 1460914 - [xpcshell] Use nsIPrefService.readUserPrefsFromFile to set prefs, r=ted
This uses nsIPrefService.readUserPrefsFromFile to set preferences from a
user.js passed in via the python harness. This allows us to use the profiles
under testing/profiles like all the other harnesses and will make setting prefs
in xpcshell easier to use and understand.

Differential Revision: https://phabricator.services.mozilla.com/D9716

--HG--
extra : moz-landing-system : lando
2018-10-26 17:46:03 +00:00
arthur.iakab 18a752e5d9 Backed out 2 changesets (bug 1460914)for multiple failures on profile_data/base "CLOSED TREE"
Backed out changeset a2161aab4e4e (bug 1460914)
Backed out changeset 9e438c55a248 (bug 1460914)
2018-10-26 19:42:33 +03:00
Andrew Halberstadt d57afd45ce Bug 1460914 - [xpcshell] Define preferences in testing/profiles instead of testing/xpcshell/head.js, r=ted
This commit creates an empty 'base' profile because I wanted to preserve the
ability to apply a pref to all test harnesses on try. Since xpcshell doesn't
share many prefs with the other harnesses, it can't use the common profile.

So adding a pref to 'common' will apply it everywhere except xpcshell. Adding
a pref to 'base' will apply it everywhere including xpcshell. These profiles
are starting to get a bit messy, but I'd like to punt re-organizing them to a
follow-up bug.

Depends on D9716

Differential Revision: https://phabricator.services.mozilla.com/D9717

--HG--
extra : moz-landing-system : lando
2018-10-25 15:23:09 +00:00
Andrew Halberstadt 2dfc1e580d Bug 1460914 - [xpcshell] Use nsIPrefService.readUserPrefsFromFile to set prefs, r=ted
This uses nsIPrefService.readUserPrefsFromFile to set preferences from a
user.js passed in via the python harness. This allows us to use the profiles
under testing/profiles like all the other harnesses and will make setting prefs
in xpcshell easier to use and understand.

Differential Revision: https://phabricator.services.mozilla.com/D9716

--HG--
extra : moz-landing-system : lando
2018-10-25 15:22:44 +00:00
Andrew Halberstadt 33ed7b49d1 Bug 1460914 - [xpcshell] Stop ignoring failures in head.js when setting prefs, r=ted
If something goes wrong when setting prefs, that's something we'll want to know
about as it likely means some tests will start to fail.

Differential Revision: https://phabricator.services.mozilla.com/D9549

--HG--
extra : moz-landing-system : lando
2018-10-23 20:46:33 +00:00
Mark Banner ceaeb93550 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389

--HG--
extra : moz-landing-system : lando
2018-10-19 12:55:39 +00:00
Alexandre Poirot 09d08ff845 Bug 1474980 - Remove deprecated DebuggerServer.addActors(). r=jryans
MozReview-Commit-ID: 8J1wucp1G0p

--HG--
extra : rebase_source : 4a40b578808667ac45519172686e4237bb61423a
2018-07-11 10:41:27 -07:00
Marco Castelluccio b81d990de9 Bug 1472687 - Only reset and dump coverage counters in the parent process for xpcshell tests. r=jmaher
--HG--
extra : rebase_source : 7a5700e8c8de05b1b0da072f9185b0e3cb226649
extra : source : 91778385e1727633a941b68f342900f0e561ec4b
2018-06-29 19:09:15 +01:00
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