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

251 Коммитов

Автор SHA1 Сообщение Дата
CanadaHonk 91709586ba Bug 1801379 - Migrate Sinon.jsm to an ES module r=extension-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,fxview-reviewers,devtools-reviewers,Standard8,nchevobbe,sclements,dimi,mconley,bytesized,robwu
Migrated `testing/modules/Sinon.sys.mjs` to an ES module.

`testing` should now be 100% ESM 🎉

Differential Revision: https://phabricator.services.mozilla.com/D173643
2023-03-29 07:34:10 +00:00
shahx95 dbae17218c Bug 1824605 - Convert toolkit/components/processsingleton/ to ES modules. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D173648
2023-03-27 21:41:12 +00:00
Marco Bonardo f3e842d937 Bug 1813986 - Add an asyncVacuum() method to storage async connections, and let VacuumManager use it. r=asuth
Add asyncVacuum to mozIStorageAsyncConnection, that dispatches a runnable to
the helper thread, where it will execute a full or incremental vacuum, depending
on the connection auto_vacuum value.
It also supports vacuuming attached schemas.
asyncVacuum() supports changing both the page_size and auto_vacuum.
Change mozIStorageVacuumParticipant to return a mozIStorageAsyncConnection and
allow specifying whether incremental vacuum should be enabled.
Change vacuumManager notification from heavy-io-task to vacuum-begin and vacuum-end
since the original proposal of notifying heavy IO didn't take off.
Cleanup test_vacuum to be able to use instances of the test VacuumParticipant,
that means we can remove the no more necessary registerESM hack.
Fix Places History as the only cpp consumer.

Differential Revision: https://phabricator.services.mozilla.com/D168298
2023-03-22 15:36:37 +00:00
Noemi Erli eac4250835 Backed out 2 changesets (bug 1813986) for causing build bustages in Logging.h
Backed out changeset 14879c9b6b3c (bug 1813986)
Backed out changeset d90fa56c73e5 (bug 1813986)
2023-03-22 01:19:57 +02:00
Marco Bonardo daa6ee1e11 Bug 1813986 - Add an asyncVacuum() method to storage async connections, and let VacuumManager use it. r=asuth
Add asyncVacuum to mozIStorageAsyncConnection, that dispatches a runnable to
the helper thread, where it will execute a full or incremental vacuum, depending
on the connection auto_vacuum value.
It also supports vacuuming attached schemas.
asyncVacuum() supports changing both the page_size and auto_vacuum.
Change mozIStorageVacuumParticipant to return a mozIStorageAsyncConnection and
allow specifying whether incremental vacuum should be enabled.
Change vacuumManager notification from heavy-io-task to vacuum-begin and vacuum-end
since the original proposal of notifying heavy IO didn't take off.
Cleanup test_vacuum to be able to use instances of the test VacuumParticipant,
that means we can remove the no more necessary registerESM hack.
Fix Places History as the only cpp consumer.

Differential Revision: https://phabricator.services.mozilla.com/D168298
2023-03-21 17:28:04 +00:00
Peter Van der Beken d6fe05cdfd Bug 1816697 - Change test annotations for tests that fail/only succeed with session-history-in-parent. r=smaug
Some of the tests that fail (or only succeed) with SHIP are currently marked for
Fission. This makes them fail once we turn on SHIP without Fission.

Differential Revision: https://phabricator.services.mozilla.com/D169824
2023-02-21 14:58:35 +00:00
Gijs Kruitbosch 387cf24ca0 Bug 1810141 - fix tests to deal with changes to loadURI, r=mossop,perftest-reviewers,geckoview-reviewers,extension-reviewers,sparky,owlish
Depends on D168396

Differential Revision: https://phabricator.services.mozilla.com/D168397
2023-02-13 23:50:41 +00:00
Cristina Horotan 5f4356e527 Backed out 9 changesets (bug 1810141) for several test failures on a CLOSED TREE
Backed out changeset 8781a0d1254d (bug 1810141)
Backed out changeset 131037295784 (bug 1810141)
Backed out changeset 3852fbe290f4 (bug 1810141)
Backed out changeset 118f131a524a (bug 1810141)
Backed out changeset ab5d76846e10 (bug 1810141)
Backed out changeset dce3aa683445 (bug 1810141)
Backed out changeset 4dc41d90dbb3 (bug 1810141)
Backed out changeset 50b57ba1a061 (bug 1810141)
Backed out changeset 569de94781e4 (bug 1810141)
2023-02-13 16:05:30 +02:00
Gijs Kruitbosch ff1cc20bd7 Bug 1810141 - fix tests to deal with changes to loadURI, r=mossop,perftest-reviewers,geckoview-reviewers,extension-reviewers,sparky,owlish
Depends on D168396

Differential Revision: https://phabricator.services.mozilla.com/D168397
2023-02-13 12:55:26 +00:00
Mark Banner d0d17578a8 Bug 1805728 - Stop using Cu.reportError in Deprecated.sys.mjs. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D164715
2022-12-18 10:10:48 +00:00
Mathew Hodson f2c846f97b Bug 1747471 - Remove `FileUtils.getFile` from testing folder. r=barret
Differential Revision: https://phabricator.services.mozilla.com/D155781
2022-12-02 15:54:29 +00:00
Rob Wu 1ecd56d01f Bug 1801870 - Support IPv6 and FQDN hosts in httpd test server + tests r=necko-reviewers,valentin
Differential Revision: https://phabricator.services.mozilla.com/D162993
2022-11-30 20:57:39 +00:00
Mark Banner 4a8185fb14 Bug 1801368 - Migrate StructuredLog.jsm to an ES module. r=ahal
Depends on D162490

Differential Revision: https://phabricator.services.mozilla.com/D162491
2022-11-24 16:17:47 +00:00
Mark Banner 55d53c8bb7 Bug 1801368 - Change StructuredLogger and StructuredFormatter to use class definitions, improve private properties. r=ahal
Depends on D162489

Differential Revision: https://phabricator.services.mozilla.com/D162490
2022-11-24 16:17:47 +00:00
Mark Banner 9fcf807281 Bug 1801368 - Drop unused mutator argument on StructuredLogger. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D162489
2022-11-24 16:17:46 +00:00
Kagami Sascha Rosylight c30b3b7ea6 Bug 1763193 - Add TestUtils.assertOnPackagedBuild and use it on browser_all_files_referenced.js etc. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D162441
2022-11-21 15:02:21 -05:00
Cristian Tuns 27c5989fe5 Backed out changeset 1e4df7ce5341 (bug 1763193) for causing bc failures on browser_startup_mainthreadio.js CLOSED TREE 2022-11-21 14:13:07 -05:00
Kagami Sascha Rosylight db580e9805 Bug 1763193 - Add TestUtils.assertOnPackagedBuild and use it on browser_all_files_referenced.js etc. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D162441
2022-11-21 16:53:14 +00:00
Mark Banner 02375d923e Bug 1799314 - Convert consumers of testing modules to import ES modules direct (testing/). r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D161908
2022-11-17 12:00:28 +00:00
Mark Banner 24f6e8a8ca Bug 1799314 - Convert most of the JSM modules in testing/ to ES modules. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D161431
2022-11-17 12:00:25 +00:00
Barret Rennie ea5c88a8c6 Bug 1798559 - Port osfile.jsm usage to IOUtils in testing/modules/ r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D160954
2022-11-17 03:42:39 +00:00
Gijs Kruitbosch 22d9ccf31a Bug 1763236 - Add class documentation for fundamental building block modules of our test infrastructure, r=sclements,mossop
This is not perfect, but I figured getting most of this stood up will make it easier for
other folks to improve, and is a lot better than expecting people to figure most of this
out themselves. Some known issues:

- alphabetical method ordering isn't necessarily what we want here. I haven't invested
  heavily in improving this. I think this can be a follow-up.
- no markdown or HTML support in sphinx-js so the formatting is... not good sometimes.
- types somehow get a bonus `()` chucked after them (so are listed as e.g. `String()`
  rather than just `String`). Unclear what is causing this; it's happening in other
  extant documentation, too, so I expect is a sphinx-js issue.

Differential Revision: https://phabricator.services.mozilla.com/D161650
2022-11-11 15:56:31 +00:00
Marian-Vasile Laza 5b3627a127 Backed out changeset f3978e4c2caf (bug 1747471) for causing wpt failures on delegateFocus-is-focusable.html. CLOSED TREE 2022-11-08 16:06:45 +02:00
Mathew Hodson 687a0cfe45 Bug 1747471 - Remove `FileUtils.getFile` from testing folder. r=barret
Differential Revision: https://phabricator.services.mozilla.com/D155781
2022-11-08 12:39:30 +00:00
Mark Banner 18753bfe42 Bug 1798212 - Convert consumers of downloads code to ES modules. r=mak,geckoview-reviewers,extension-reviewers,settings-reviewers,credential-management-reviewers,sgalich,mconley,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D161013
2022-11-07 17:56:10 +00:00
Basix c1a22477a0 Bug 1795586 - Migrate storage/test/unit/VacuumParticipant.jsm to ESM. r=mconley
Differential Revision: https://phabricator.services.mozilla.com/D159474
2022-10-19 20:25:11 +00:00
Mark Banner 1b63e93005 Bug 1795370 - Add nsICrashReporter as an interface on nsAppRunner. r=gsvelto
This fixes ESLint issues raised by mozilla/valid-services-properties.
This also changes follow-on issues to use Services.appinfo rather than getService.

Differential Revision: https://phabricator.services.mozilla.com/D159461
2022-10-18 18:22:24 +00:00
Mark Banner 2ffde1e92f Bug 1792341 - Migrate more toolkit/modules consumers to use direct ES module import. r=Gijs,webdriver-reviewers,perftest-reviewers,necko-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,sgalich,owlish,bytesized,AlexandruIonescu,whimboo,mconley,mixedpuppy
Mainly automated changes. Some manual ESLint fixes and whitespace cleanup.

Differential Revision: https://phabricator.services.mozilla.com/D158452
2022-10-18 11:21:26 +00:00
Alexandre Poirot 76aed8f004 Bug 1793575 - [devtools] Convert jsdebugger.jsm to jsdebugger.sys.mjs. r=Honza,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D158571
2022-10-06 14:21:22 +00:00
Mark Banner 8d1ebcb9d6 Bug 1792365 - Convert toolkit/modules consumers to use ES module imports directly. r=webdriver-reviewers,perftest-reviewers,geckoview-reviewers,extension-reviewers,preferences-reviewers,desktop-theme-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,robwu,Gijs,sgalich,bytesized,AlexandruIonescu,dao,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D158094
2022-09-29 06:52:34 +00:00
Mark Banner 7428be4a86 Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop
Differential Revision: https://phabricator.services.mozilla.com/D152736
2022-08-03 11:16:20 +00:00
Tooru Fujisawa 54623364da Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-12 04:21:34 +00:00
Andreea Pavel 7738a75fdd Backed out 11 changesets (Bug 1777486) for failing bc at browser_startup.js on a CLOSED TREE
Backed out changeset b6c4c386f1a6 (Bug 1777486)
Backed out changeset 195cc2de8433 (Bug 1777486)
Backed out changeset 20c746fb1648 (Bug 1777486)
Backed out changeset d5fd8173d62d (Bug 1777486)
Backed out changeset 6d758fab5a3e (Bug 1777486)
Backed out changeset e938b601ba15 (Bug 1777486)
Backed out changeset 0c4ea0b9416b (Bug 1777486)
Backed out changeset 0559c53cc668 (Bug 1777486)
Backed out changeset eea573d3a9f9 (Bug 1777486)
Backed out changeset 9ce3a6496a49 (bug 1777486)
Backed out changeset b0867652fc48 (bug 1777486)
2022-07-11 22:24:40 +03:00
Tooru Fujisawa 8cd6ed7409 Bug 1777486 - Part 2: Migrate XPCOMUtils.jsm consumers with automatic migration. r=webdriver-reviewers,geckoview-reviewers,preferences-reviewers,application-update-reviewers,pip-reviewers,kmag,owlish,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D151214
2022-07-11 15:09:13 +00:00
Tooru Fujisawa f3a8c52c53 Bug 1667455 - Part 4: Stop importing Services.jsm from JSM. r=kmag,webdriver-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,application-update-reviewers,pip-reviewers,twisniewski,devtools-reviewers,m_kato,jdescottes,ochameau,mconley,sfoster,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D150893
2022-07-11 12:41:50 +00:00
Kris Maglione 35eb8605de Bug 1770237: Part 1b - Update MockRegistrar to allow registering JSMs similarly to static components. r=mccr8
This makes it easier to migrate some tests that use chrome manifest
registration. It lets us register JSMs as components in a similar way to how
we register them in static component manifests.

Differential Revision: https://phabricator.services.mozilla.com/D148181
2022-06-22 20:31:32 +00:00
Tooru Fujisawa 2337bc5418 Bug 1772299 - Reject modification to globalThis inside system module. r=Standard8,webdriver-reviewers,jdescottes
Differential Revision: https://phabricator.services.mozilla.com/D148116
2022-06-15 22:20:53 +00:00
Barret Rennie 802ed4da39 Bug 1760130 - Run FileTestUtils cleanup at the latest possible phase r=mak
Differential Revision: https://phabricator.services.mozilla.com/D148147
2022-06-09 16:11:13 +00:00
Tooru Fujisawa e6e999d822 Bug 1772098 - Part 2: Use plain object for lazy getter in testing/modules/. r=kmag
Differential Revision: https://phabricator.services.mozilla.com/D147924
2022-06-06 06:30:33 +00:00
Tooru Fujisawa acaf6f75b5 Bug 1610653 - Part 9: Do not use global this property assignment to define global variable in testing/modules. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D144116
2022-05-30 15:19:38 +00:00
Andrew McCreight c8c5c819df Bug 1514936, part 1 - Remove the outer argument to nsIFactory::createInstance. r=xpcom-reviewers,preferences-reviewers,nika,Gijs
This patch won't actually build, because a few bits of code are used
for both nsIFactory::createInstance and static components, and static
components are not fixed until the next patch.

The first place is nsLoadGroupConstructor, which uses an nsIFactory
macro to create a static component constructor. (This could be worked
around by expanding the macro to the state before this patch.)

The other issue is that nsAppShellConstructor is used in an nsIFactory
on OSX, but as a static component on all other platforms. This could
be worked around by wrapping nsAppShellConstructor in an adaptor that
passes in the extra null argument to nsAppShellConstructor.

Differential Revision: https://phabricator.services.mozilla.com/D146456
2022-05-17 20:24:19 +00:00
Andrew McCreight 01913de302 Bug 1769442 - Remove nsIFactory::lockFactory, breaking compatibility with IClassFactory. r=xpcom-reviewers,Jamie,necko-reviewers,kershaw,nika
nsIFactory is binary compatible with Windows COM's IClassFactory,
but nothing seems to depend on it. This patch removes the test
for compatibility, TestCOM, and removes the lockFactory
method that isn't otherwise needed.

Differential Revision: https://phabricator.services.mozilla.com/D146386
2022-05-16 22:38:51 +00:00
Tooru Fujisawa 32bc0bc61e Bug 1768022 - Use globalThis instead of Cu.getGlobalForObject(this). r=Standard8,webdriver-reviewers,necko-reviewers,whimboo,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D145842
2022-05-10 07:52:01 +00:00
Doug Thayer 04d1c8fd1e Bug 1756823 - Replace ConsoleAPIStorage observer calls with js array r=nchevobbe,webdriver-reviewers,geckoview-reviewers,agi,jdescottes
See the comment in the file explaining it. For a case of logging 100k numbers,
this dropped the time per number from 15 microseconds to 9 with the console
closed, and 55 microseconds to 38 with the console open. I think we could shave
off more with a native approach, but I don't know that it's worth it and it's
much more likely for that to introduce bugs.

Differential Revision: https://phabricator.services.mozilla.com/D143782
2022-05-03 17:21:59 +00:00
Tooru Fujisawa 5aae6d2f7b Bug 1608276 - Part 3: Do not use global this whem loading sinon subscript. r=mossop
Here the Services.scriptloader.loadSubScript is kept as is, given the
sinon-7.2.7.js is vendored script and making it JSM-compatible requires extra
step during re-vendor.

The target object is replaced from `this` to separate object, so that it
keeps working after ESM-ification.

Differential Revision: https://phabricator.services.mozilla.com/D144081
2022-04-26 12:48:06 +00:00
Barret Rennie 2e264dae56 Bug 1762493 - Remove Ajv r=ckerschb,ahal
Differential Revision: https://phabricator.services.mozilla.com/D142881
2022-04-20 15:23:28 +00:00
Mark Banner 2d563feacc Bug 1758476 - Remove some unnecessary uses of the target object argument to ChromeUtils.import. r=mossop,webdriver-reviewers,perftest-reviewers,robwu,whimboo,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D140518
2022-03-17 22:13:08 +00:00
Cristian Tuns e8374bd569 Backed out changeset 528295e7cb0c (bug 1758476) for causing tabswitch failures CLOSED TREE 2022-03-14 12:27:48 -04:00
Mark Banner 0ce30e3008 Bug 1758476 - Remove some unnecessary uses of the target object argument to ChromeUtils.import. r=mossop,webdriver-reviewers,perftest-reviewers,robwu,whimboo,AlexandruIonescu
Differential Revision: https://phabricator.services.mozilla.com/D140518
2022-03-14 10:19:40 +00:00
Mark Banner aa27ba2794 Bug 1758472 - Stop using ChromeUtils.import(..., null) for importing modules in tests. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D140515
2022-03-08 16:59:20 +00:00