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

301 Коммитов

Автор SHA1 Сообщение Дата
Julian Descottes 2e9e1cc305 Bug 1741369 - [devtools] Update paths to loader files outside devtools/ r=perftest-reviewers,preferences-reviewers,sparky,Gijs
Depends on D131217

Differential Revision: https://phabricator.services.mozilla.com/D131218
2021-11-17 12:43:27 +00:00
Jan-Erik Rediger 6762b77e28 Bug 1708668 - Enable Glean testing in xpcshell tests. r=chutten
This ensures Glean is initialized in an xpcshell environment on Android.
When GeckoView is embedded the surrounding app is responsible to
initialize Glean from the Kotlin side.

This also enables the first few FOG tests to run on Android.
For now it changes the Android-specific test file.
As long as not all metric types are enabled we can't reliably test other metrics.

Differential Revision: https://phabricator.services.mozilla.com/D127420
2021-10-22 08:53:29 +00:00
Jens Stutte 87de42e070 Bug 1726813: Ensure AppShutdown remains in sync with shutdown notifications in the parent process. r=xpcom-reviewers,nika,dom-worker-reviewers,asuth
The goal here is to ensure we can always rely on `AppShutdown::GetShutdownPhase` to be in sync with the "real" application status, mainly this was needed for xpcshell tests to not break if we add assertions on our shutdown state on some global singletons.

We keep the existing observer notification topics but force them (on the parent process) to be issued through the new `advanceShutdownPhase` function of the startup service using the `ShutdownPhase` enum. This way we can synchronize `AppShutdown`'s internal status accordingly.

Some further notes:

  # The `MOZ_ASSERT(AppShutdown::IsNoOrLegalShutdownTopic(aTopic));` in `NotifyObservers` helped a lot to identify missing cases. I think we should keep it in order to stay safe.
  # Introducing the `cenum IDLShutdownPhase` helps to keep the knowledge about the mapping from shutdown phases to observer topics exclusively inside AppShutdown.cpp. Still callers must know what they do in order to choose a proper phase, of course.
  # However we must be aware that `AppShutdown` this way can be kept in sync with the shutdown notifications only in the parent process and that `GetCurrentShutdownPhase` might not give the correct result in child processes. We might want to file a follow up bug that adds some asserts to avoid improper use of `AppShutdown` functions in child processes (but I do not want to make this patch bigger as needed to solve the blocking dependency for bug 1697972).
  # The socket process is one example of a child process that "overloads" shutdown topics. I was wondering if it is the right call to use the very same topic names here to request shutdown to the socket process or if it should have its own topics. Those topics triggered the assert and thus I had to disable it for child processes, for now.
  # This goes together with the more general approach to define process type specific shutdown phases (and hence mappings to topics) as drafted very roughly in bug 1697745.
  # This patch seemed to trigger a known intermittent more often, thus the change here in `ServiceWorkerManager`.

Differential Revision: https://phabricator.services.mozilla.com/D124350
2021-09-15 07:25:29 +00:00
Mark Banner 28abf1cb81 Bug 1515695 - Remove Task.jsm. r=florian,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D118001
2021-06-17 08:28:02 +00:00
Mark Banner 39a3db78d4 Bug 1707711 - Stop using ChromeUtils.import(..., null) in testing/. r=kmag
Also clean up some unused exclusions in .eslintrc.js.

Differential Revision: https://phabricator.services.mozilla.com/D114623
2021-05-10 08:56:05 +00:00
Sandor Molnar 8d9abf3285 Backed out changeset ed582ad8db97 (bug 1707711) for causing dt failures in browser_webconsole_stubs_page_error. CLOSED TREE 2021-05-09 18:46:56 +03:00
Mark Banner 44419c64f1 Bug 1707711 - Stop using ChromeUtils.import(..., null) in testing/. r=kmag
Also clean up some unused exclusions in .eslintrc.js.

Differential Revision: https://phabricator.services.mozilla.com/D114623
2021-05-09 08:06:41 +00:00
Agi Sferro 74aceaaf86 Bug 1700917 - Actually initialize the profile in GeckoView xpcshell. r=jmaher
Looks like spoofing the event is not enough as GeckoView intialization code
(indirectly) uses the profile folder.

We also catch exceptions coming from the init code and throw them appropriately
so we don't ignore errors during initialization.

Differential Revision: https://phabricator.services.mozilla.com/D109797
2021-03-26 18:30:16 +00:00
Agi Sferro 92b119c179 Bug 1567341 - Add _TEST_CWD to xpcshell's head.js file. r=jmaher
This variable can be used by platforms to modify the current directory, useful
on Android as the process where the xpcshell test runs does not really have the
concept of CWD.

Differential Revision: https://phabricator.services.mozilla.com/D106207
2021-03-24 21:49:36 +00:00
Agi Sferro 1f3a058709 Bug 1567341 - Properly initialize GeckoView in xpcshell-test. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D106202
2021-03-24 21:49:34 +00:00
Alexandru Michis 497409d76e Backed out 24 changesets (bug 1567341) for causing xpcshell failures in test_telemetry.js
CLOSED TREE

Backed out changeset deb795c7d0ed (bug 1567341)
Backed out changeset 62d24a3e5e33 (bug 1567341)
Backed out changeset 1185cabd94e0 (bug 1567341)
Backed out changeset 73a4ae419261 (bug 1567341)
Backed out changeset b6eb111329f3 (bug 1567341)
Backed out changeset 0dc0bfedc042 (bug 1567341)
Backed out changeset 9dca635e41d7 (bug 1567341)
Backed out changeset c34928580933 (bug 1567341)
Backed out changeset f9ba384bb407 (bug 1567341)
Backed out changeset ec25c2df380e (bug 1567341)
Backed out changeset 9e8ea542b51e (bug 1567341)
Backed out changeset 3dc62863a028 (bug 1567341)
Backed out changeset 6c104f865540 (bug 1567341)
Backed out changeset c422ca4207ea (bug 1567341)
Backed out changeset e3df748ed62f (bug 1567341)
Backed out changeset 9d1f27796a97 (bug 1567341)
Backed out changeset 1d93ba23f809 (bug 1567341)
Backed out changeset 55652f6af6ed (bug 1567341)
Backed out changeset 9fb892955a88 (bug 1567341)
Backed out changeset 1cdd95c43416 (bug 1567341)
Backed out changeset 5a839d5e3e33 (bug 1567341)
Backed out changeset ea84b5749a27 (bug 1567341)
Backed out changeset dcb1ae146475 (bug 1567341)
Backed out changeset d72accc274ac (bug 1567341)
2021-03-24 23:37:43 +02:00
Agi Sferro c553c5f3d3 Bug 1567341 - Add _TEST_CWD to xpcshell's head.js file. r=jmaher
This variable can be used by platforms to modify the current directory, useful
on Android as the process where the xpcshell test runs does not really have the
concept of CWD.

Differential Revision: https://phabricator.services.mozilla.com/D106207
2021-03-24 20:19:59 +00:00
Agi Sferro 352b889c93 Bug 1567341 - Properly initialize GeckoView in xpcshell-test. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D106202
2021-03-24 20:19:57 +00:00
Jens Stutte 05581ddca4 Bug 1678330: Ensure nested SpinEventLoopUntil(OrShutdown) calls are traceable to the originating source in case of crash. r=nika,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106839
2021-03-02 22:11:58 +00:00
Cosmin Sabou b2eb620ed0 Backed out changeset 03cae7800b41 (bug 1678330) for mochitest plain failures on test_window_open_discarded_bc.html. CLOSED TREE 2021-03-02 20:18:21 +02:00
Jens Stutte a0af9ea0a4 Bug 1678330: Ensure nested SpinEventLoopUntil(OrShutdown) calls are traceable to the originating source in case of crash. r=nika,extension-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D106839
2021-03-02 15:15:20 +00:00
Akshat 5bacc6cf77 Bug 1691638 Corrects XPCShell documentation website r=gbrown DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D104556
2021-02-09 19:44:44 +00:00
Florian Quèze 70b524ecf0 Bug 1687784 - Profiler markers from mochitests and xpcshell tests should use the Test category, r=mconley.
Differential Revision: https://phabricator.services.mozilla.com/D102466
2021-01-20 21:04:00 +00:00
Alexandre Poirot 3f9e98f591 Bug 1682780 - [devtools] Avoid pausing on thread actor's attach request. r=nchevobbe,jdescottes
We always used to pause when "attaching" the thread actor.
We ought to call ThreadActor's attach method first before using it.
And this method do various things:
  * Initialize the Debugger API, enable it, register various listeners, so that breakpoint can work,
  * Pause the current thread by starting a nested event loop
So that we also ought to resume the thread, by calling ThreadActor's resume right after attach.
Otherwise the page would be paused as soon as we open the DevTools.
Which sounds like something we might have wanted a very long time ago.
But sounds like pure legacy behavior from today's perspective.

Differential Revision: https://phabricator.services.mozilla.com/D99919
2021-01-07 15:02:11 +00:00
Frederic Wang 93461aced4 Bug 1673856 Do not set network.dns.ipv4OnlyDomains when running XPCShell r=valentin,necko-reviewers
This preference is currently only used when running Windows XPCShell
tests in order to disable IPv6 resolution for "localhost". However, this
does not seem to be needed anymore and actually breaks the expectation
that "localhost" resolves to IPv4 and IPv6 loopback addresses
(see bugs 1673315, 1673364, 1220810).

Differential Revision: https://phabricator.services.mozilla.com/D94986
2020-10-28 13:50:00 +00:00
Anny Gakhokidze 5755a94b86 Bug 1589102 - Part 7: Fix test_browsing_context_structured_clone.js to instead schedule precise gc, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D85086
2020-08-28 17:20:57 +00:00
Butkovits Atila 3bd0e5497c Backed out 10 changesets (bug 1589102) for failure at browser_saveHeapSnapshot_e10s_01.js CLOSED TREE
Backed out changeset 0d22ad297b19 (bug 1589102)
Backed out changeset 14bcaf2a452c (bug 1589102)
Backed out changeset 20905f91e2bb (bug 1589102)
Backed out changeset 29ee0fbe855f (bug 1589102)
Backed out changeset d1f6185030af (bug 1589102)
Backed out changeset 31949872cc1d (bug 1589102)
Backed out changeset ec04e1a20597 (bug 1589102)
Backed out changeset ffe8da473b91 (bug 1589102)
Backed out changeset 3b92f7306c64 (bug 1589102)
Backed out changeset b187548e258f (bug 1589102)
2020-08-05 21:47:50 +03:00
Anny Gakhokidze 92343d143d Bug 1589102 - Part 8: Fix test_browsing_context_structured_clone.js to instead schedule precise gc, r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D85086
2020-08-05 16:55:05 +00:00
Doug Thayer 8f54209ef6 Bug 1651165 - Rename idle service r=Gijs,geckoview-reviewers,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83413
2020-07-20 16:06:59 +00:00
Florian Quèze 3449d19a7e Bug 1637637 - disable fast shutdown for the test_prefs_store.js and test_prefs_tracker.js tests where it crashes, r=gbrown.
Depends on D72407

Differential Revision: https://phabricator.services.mozilla.com/D76167
2020-05-20 16:35:51 +00:00
Florian Quèze 79e59b15e8 Bug 1637637 - Exit(0) at the end of xpcshell tests, r=gbrown.
Differential Revision: https://phabricator.services.mozilla.com/D72407
2020-05-20 16:14:31 +00:00
Florian Quèze f75e2d8068 Bug 1632862 - Add profiler markers in xpcshell tests, r=gbrown.
Differential Revision: https://phabricator.services.mozilla.com/D72398
2020-05-05 17:26:41 +00:00
sagudev 84e60a5d6c Bug 1322254 - Remove network.disable.ipc.security pref r=valentin,necko-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D71914
2020-04-24 17:42:35 +00:00
Coroiu Cristina 43be71277d Backed out 2 changesets (bug 1625500) for multiple failures on a CLOSED TREE
Backed out changeset 7d80233bcfcd (bug 1625500)
Backed out changeset 0a35b13dfcde (bug 1625500)
2020-04-17 15:36:05 +03:00
Gijs Kruitbosch cc39a339a0 Bug 1625500 - fix use of .then(x, x) in the tree, r=marionette-reviewers,Standard8,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D68614
2020-04-17 11:41:49 +00:00
Jan-Erik Rediger 0819017624 Bug 1619990 - Always load dynamic-builtin probes in xpcshell test environment. r=chutten,gbrown
Differential Revision: https://phabricator.services.mozilla.com/D66039

--HG--
extra : moz-landing-system : lando
2020-03-10 19:37:36 +00:00
Alexandre Poirot 9073e966ec Bug 1614791 - Rename DebuggerServer to DevToolsServer. r=jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D61363

--HG--
rename : devtools/server/debugger-server.js => devtools/server/devtools-server.js
extra : moz-landing-system : lando
2020-02-17 10:28:24 +00:00
Andrew McCreight 9cdc76e45f Bug 1586393, part 1 - Add test-complete observer notification. r=mconley
This allows generic code, like a testing JSM, to do clean up when a
test completes, in a way that will work in different test suites.

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

--HG--
extra : moz-landing-system : lando
2019-10-29 21:25:02 +00:00
Mark Banner b1970e6a2f Bug 1571466 - Cleanup unnecessary ESLint global definitions. r=mossop
These are raised as redeclares or unused variables by ESLint 6.

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

--HG--
extra : moz-landing-system : lando
2019-08-19 07:11:56 +00:00
Julian Descottes 3df7a88f3b Bug 1572390 - Split main.js in debugger-server and debugger-server-connection r=yulia,ochameau
Differential Revision: https://phabricator.services.mozilla.com/D41009

--HG--
rename : devtools/server/main.js => devtools/server/debugger-server-connection.js
rename : devtools/server/main.js => devtools/server/debugger-server.js
extra : moz-landing-system : lando
2019-08-08 12:44:13 +00:00
Victor Porof 97787f6eab Bug 1561435 - Fix linting errors for testing/, r=standard8
# ignore-this-changeset

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

--HG--
extra : source : 7c8fead01ad5b68b81c2dfe3006eb497abb23f44
extra : intermediate-source : c900487402597c47ee28e088af19b4ad786df50f
2019-06-27 17:27:33 +02:00
Victor Porof 2b036e45c5 Bug 1561435 - Format testing/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : c0948f31e520ca087279cf429ca5f1db5a8341b8
2019-07-05 11:01:24 +02:00
Kris Maglione 1c39319950 Bug 1540856: Part 1 - Remove useless references to lightweightThemes preferences. r=aswan,dao
Differential Revision: https://phabricator.services.mozilla.com/D25677

--HG--
extra : rebase_source : d65a8b4e152342fd039cf35a410311f7ac664c9c
extra : histedit_source : c3fc70a285b39a6a8c09bac963211159573a5d09
2019-04-01 15:22:20 -07:00
Mark Banner 53b3788bba Bug 1415265 - Implement a central configuration for setting ESLint environments for test directories. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D23849

--HG--
extra : moz-landing-system : lando
2019-03-28 09:38:02 +00:00
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