Commit Graph
294 Commits
Author SHA1 Message Date
Nipun Shukla 6c70f18bc5 Bug 1869842 - Extend MockRegistry to support types and subkeys/children r=nrishel
Differential Revision: https://phabricator.services.mozilla.com/D199434
2024-04-16 19:24:57 +00:00
Mark Banner 48509525c0 Bug 1885723 - Fix more jsm references in testing/. r=jmaher,webdriver-reviewers,Sasha
Differential Revision: https://phabricator.services.mozilla.com/D204849
2024-03-19 08:59:12 +00:00
Dave Townsend ec851d9e3c Bug 1864896: Autofix unused function arguments (testing). r=webdriver-reviewers,perftest-reviewers,jmaher,devtools-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D202990
2024-03-05 14:21:16 +00:00
Geoff Lankow 0657e03cf2 Bug 1879018 - Use replacer function to avoid calling JSON.stringify on XPCOM objects in Assert.sys.mjs. r=jmaher
This is a better way to fix the problem than my previous attempt.

Differential Revision: https://phabricator.services.mozilla.com/D200908
2024-02-07 21:46:20 +00:00
Geoff Lankow d821ad4498 Bug 1876221 - Avoid calling JSON.stringify on XPCOM objects in Assert.sys.mjs. r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D199450
2024-01-24 22:08:05 +00:00
Gregory Pappas cce6d98425 Bug 1863223 - Remove head_e10s and remoteContentScripts r=robwu
Differential Revision: https://phabricator.services.mozilla.com/D199248
2024-01-22 21:54:30 +00:00
Gijs Kruitbosch 316d0be2f9 Bug 1875237 - add date support to Assert less/greater/lessOrEqual/greaterOrEqual methods, r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D198973
2024-01-18 22:11:53 +00:00
Mark Banner e34137ce38 Bug 1872672 - Replace Log.sys.mjs usage in MockRegistrar with console.error logging. r=mossop
As no log appender was previously registered, the error message would never have been logged.

Depends on D197501

Differential Revision: https://phabricator.services.mozilla.com/D197502
2024-01-02 17:38:55 +00:00
Joel Maher f4b2948ab2 Bug 1859896 - Batch 16 - convert xpcshell.ini -> .toml. r=aryx,webdriver-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D194383
2023-11-25 21:08:44 +00:00
Jonathan Watt 839fe1be5d Bug 1865995 p6. Rename createAboutBlankContentViewer to match nsIDocumentViewer's new name. r=emilio,webdriver-reviewers,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D194340
2023-11-23 21:35:21 +00:00
Tooru Fujisawa 61764d0533 Bug 1862693 - Use 1-origin column number in debugger API. r=iain,ochameau,devtools-reviewers
This includes the following API:
  * Debugger.Object.prototype.createSource
     * startColumn field of the parameter object
  * Debugger.Script.prototype.startColumn
     * return value
  * Debugger.Script.prototype.getPossibleBreakpoints
     * minColumn and maxColumn property of the query
     * columnNumber property of the returned array elements
  * Debugger.Script.prototype.getOffsetMetadata
     * columnNumber property of the returned array elements
  * Debugger.Script.prototype.getOffsetLocation
     * columnNumber property of the returned array elements
  * Debugger.Script.prototype.getAllColumnOffsets
     * columnNumber property of the returned array elements
  * Debugger.Script.prototype.getOffsetsCoverage
     * columnNumber property of the returned array elements
  * Debugger.Source.prototype.startColumn
     * return value

This patch modifies DevTools code to convert the column number from/to 1-origin,
while keep using 0-origin on their side.

One exception is the WASM's column number, which had been using 1-origin 1.
Each consumer in DevTools handles the WASM case, and the code can be removed
once DevTools internal also switches to 1-origin column number.

The other exception is to use 1-based column number in logCustomFormatterError,
which is folded from bug 1864783 patch.

Differential Revision: https://phabricator.services.mozilla.com/D193270
2023-11-22 12:31:30 +00:00
Natalia Csoregi e0d56104a6 Backed out 14 changesets (bug 1865005, bug 1864168, bug 1864155, bug 1862814, bug 1862693) for causing bustage on nsRFPService.cpp. CLOSED TREE
Backed out changeset a4f3e7625abf (bug 1865005)
Backed out changeset ab38141e470b (bug 1862814)
Backed out changeset a679b50dc4a9 (bug 1862814)
Backed out changeset e340886ce62a (bug 1862814)
Backed out changeset 1378502e64b0 (bug 1862814)
Backed out changeset 8ee94e5e79c2 (bug 1862814)
Backed out changeset 6d4ef1cdfabb (bug 1864168)
Backed out changeset 2c30c4d757fc (bug 1864168)
Backed out changeset d4db9576559b (bug 1864168)
Backed out changeset 8ffec0d83028 (bug 1864168)
Backed out changeset fa77d852b494 (bug 1864168)
Backed out changeset f6646771a26a (bug 1864168)
Backed out changeset 7bd0ff6986df (bug 1864155)
Backed out changeset 39867b503289 (bug 1862693)
2023-11-22 14:01:55 +02:00
Tooru Fujisawa ce6ae2444e Bug 1862693 - Use 1-origin column number in debugger API. r=iain,ochameau,devtools-reviewers
This includes the following API:
  * Debugger.Object.prototype.createSource
     * startColumn field of the parameter object
  * Debugger.Script.prototype.startColumn
     * return value
  * Debugger.Script.prototype.getPossibleBreakpoints
     * minColumn and maxColumn property of the query
     * columnNumber property of the returned array elements
  * Debugger.Script.prototype.getOffsetMetadata
     * columnNumber property of the returned array elements
  * Debugger.Script.prototype.getOffsetLocation
     * columnNumber property of the returned array elements
  * Debugger.Script.prototype.getAllColumnOffsets
     * columnNumber property of the returned array elements
  * Debugger.Script.prototype.getOffsetsCoverage
     * columnNumber property of the returned array elements
  * Debugger.Source.prototype.startColumn
     * return value

This patch modifies DevTools code to convert the column number from/to 1-origin,
while keep using 0-origin on their side.

One exception is the WASM's column number, which had been using 1-origin 1.
Each consumer in DevTools handles the WASM case, and the code can be removed
once DevTools internal also switches to 1-origin column number.

The other exception is to use 1-based column number in logCustomFormatterError,
which is folded from bug 1864783 patch.

Differential Revision: https://phabricator.services.mozilla.com/D193270
2023-11-22 11:13:53 +00:00
Rob Wu 35078ff612 Bug 1856464 - Include stack in Assert.rejects r=jmaher
Assert.rejects uses callbacks in a way that the stack no longer includes
the original caller in the stack when the stack is generated.
Consequently, when AssertionError tries to identify the caller, it is
unable to do so, resulting in a `null` stack.

This `null` stack is passed by the SpecialPowers glue to
`do_report_result` in xpcshell/head.js, which doesn't expect a `null`
stack, and consequently the following error is reported:
"TypeError: can't access property "filename", stack is null"

To fix this issue, we save the stack (including the caller) upon
entering `Assert.rejects`, and forward that to `AssertionError`.

Differential Revision: https://phabricator.services.mozilla.com/D189863
2023-10-26 09:59:26 +00:00
Rob Wu 1980dc5310 Bug 1856464 - Add test coverage for Assert.rejects itself r=jmaher
... and make sure that `Assert.rejects(Promise.resolve())` resolves even
if the `_reporter` override does not throw. This is needed for the test
to run to completion; otherwise the new Harness_sanity tests get stuck.

An extra test has been added to test_assert.js to verify that under
normal circumstances, `Assert.rejects(Promise.resolve())` rejects.

Differential Revision: https://phabricator.services.mozilla.com/D189862
2023-10-26 09:59:25 +00:00
Natalia Csoregi ea60318846 Backed out 2 changesets (bug 1856464) for causing failures on test_SpecialPowersSandbox.html. CLOSED TREE
Backed out changeset 4a8a737bf972 (bug 1856464)
Backed out changeset d91e54437030 (bug 1856464)
2023-10-26 01:20:48 +03:00
Rob Wu db1919dbde Bug 1856464 - Include stack in Assert.rejects r=jmaher
Assert.rejects uses callbacks in a way that the stack no longer includes
the original caller in the stack when the stack is generated.
Consequently, when AssertionError tries to identify the caller, it is
unable to do so, resulting in a `null` stack.

This `null` stack is passed by the SpecialPowers glue to
`do_report_result` in xpcshell/head.js, which doesn't expect a `null`
stack, and consequently the following error is reported:
"TypeError: can't access property "filename", stack is null"

To fix this issue, we save the stack (including the caller) upon
entering `Assert.rejects`, and forward that to `AssertionError`.

Differential Revision: https://phabricator.services.mozilla.com/D189863
2023-10-25 17:28:40 +00:00
Rob Wu 92870a6c48 Bug 1856464 - Add test coverage for Assert.rejects itself r=jmaher
... and make sure that `Assert.rejects(Promise.resolve())` resolves even
if the `_reporter` override does not throw. This is needed for the test
to run to completion; otherwise the new Harness_sanity tests get stuck.

An extra test has been added to test_assert.js to verify that under
normal circumstances, `Assert.rejects(Promise.resolve())` rejects.

Differential Revision: https://phabricator.services.mozilla.com/D189862
2023-10-25 17:28:39 +00:00
Noemi Erli 7d9f4647cf Backed out 2 changesets (bug 1856464) for causing failures in test_SpecialPowersSandbox.js
Backed out changeset 16e6c8b1d450 (bug 1856464)
Backed out changeset 076438699342 (bug 1856464)
2023-10-25 16:31:12 +03:00
Rob Wu 1d74d14989 Bug 1856464 - Include stack in Assert.rejects r=jmaher
Assert.rejects uses callbacks in a way that the stack no longer includes
the original caller in the stack when the stack is generated.
Consequently, when AssertionError tries to identify the caller, it is
unable to do so, resulting in a `null` stack.

This `null` stack is passed by the SpecialPowers glue to
`do_report_result` in xpcshell/head.js, which doesn't expect a `null`
stack, and consequently the following error is reported:
"TypeError: can't access property "filename", stack is null"

To fix this issue, we save the stack (including the caller) upon
entering `Assert.rejects`, and forward that to `AssertionError`.

Differential Revision: https://phabricator.services.mozilla.com/D189863
2023-10-25 12:48:07 +00:00
Rob Wu 4553dc8a3e Bug 1856464 - Add test coverage for Assert.rejects itself r=jmaher
... and make sure that `Assert.rejects(Promise.resolve())` resolves even
if the `_reporter` override does not throw. This is needed for the test
to run to completion; otherwise the new Harness_sanity tests get stuck.

An extra test has been added to test_assert.js to verify that under
normal circumstances, `Assert.rejects(Promise.resolve())` rejects.

Differential Revision: https://phabricator.services.mozilla.com/D189862
2023-10-25 12:48:07 +00:00
Sylvestre Ledru 2e0e132821 Bug 1856530 - run file-whitespace on toml files r=linter-reviewers,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D189896
2023-10-03 09:22:18 +00:00
Joel Maher 16a80e018b Bug 1853245 - Migrate .ini manifests to .toml (Batch 7.5). r=aryx,extension-reviewers,robwu
Differential Revision: https://phabricator.services.mozilla.com/D189264
2023-09-29 11:38:53 +00:00
Gregory Pappas e9950eccfd Bug 1845311 - Use ChromeUtils.defineLazyGetter in more places r=arai,webdriver-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,anti-tracking-reviewers,sessionstore-reviewers,pbz,joschmidt,robwu,issammani,bytesized,owlish,dao
Differential Revision: https://phabricator.services.mozilla.com/D184481
2023-07-26 16:28:11 +00:00
Mark Banner 544ecba3af Bug 1837176 - Convert imports of httpd.js to consume the ES module directly. r=necko-reviewers,webcompat-reviewers,extension-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,cookie-reviewers,twisniewski,robwu,issammani,bytesized,pbz,valentin
Differential Revision: https://phabricator.services.mozilla.com/D181159
2023-07-12 13:38:34 +00:00
Mark Banner 88e658c23d Bug 1792824 - Convert ObjectUtils.jsm to an ES module. r=barret,necko-reviewers,devtools-reviewers,kershaw
Depends on D183308

Differential Revision: https://phabricator.services.mozilla.com/D183309
2023-07-12 08:07:23 +00:00
James Teh fdca51c6f2 Bug 1570560: Remove message and disabling of content accessibility for very old JAWS versions. r=nlapre
Differential Revision: https://phabricator.services.mozilla.com/D180778
2023-06-19 04:24:08 +00:00
Saira Abdulla d8dc989e1b Bug 1824612 - Convert consumers of toolkit/components/extensions to ES modules. r=robwu,webcompat-reviewers,geckoview-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,cookie-reviewers,twisniewski,sgalich,valentin,nalexander,mconley,m_kato
Depends on D175553

Differential Revision: https://phabricator.services.mozilla.com/D176005
2023-05-31 15:27:03 +00:00
Iulian Moraru 05e26cad32 Backed out 2 changesets (bug 1824612) for causing dt failures on browser_dbg-features-source-tree.js. CLOSED TREE
Backed out changeset c3f38adc818e (bug 1824612)
Backed out changeset 58ba8bb3398a (bug 1824612)
2023-05-31 17:28:16 +03:00
Saira Abdulla cac3d1f236 Bug 1824612 - Convert consumers of toolkit/components/extensions to ES modules. r=robwu,webcompat-reviewers,geckoview-reviewers,settings-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,cookie-reviewers,twisniewski,sgalich,valentin,nalexander,mconley,m_kato
Depends on D175553

Differential Revision: https://phabricator.services.mozilla.com/D176005
2023-05-31 10:21:37 +00:00
Kris Maglione 4d2397ca5c Bug 1648545: Part 4 - Move ContentPage.spawn to use SpecialPowers rather than ContentTask. r=ahal,cookie-reviewers,anti-tracking-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D119451
2023-05-27 03:46:44 +00:00
Kris Maglione d7b1a4ddeb Bug 1648545: Part 3 - Support Assert in SpecialPowers.spawn for xpcshell tests. r=ahal,anti-tracking-reviewers,timhuang
Differential Revision: https://phabricator.services.mozilla.com/D119450
2023-05-27 03:46:44 +00:00
Kris Maglione 42012f6b4b Bug 1648545: Part 2 - Load SpecialPowers in XPCShellContentUtils. r=ahal,application-update-reviewers,nalexander,devtools-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D119449
2023-05-27 03:46:44 +00:00
Noemi Erli a08e78ef6e Backed out 4 changesets (bug 1648545) for causing mass failures
Backed out changeset ac3d639547fa (bug 1648545)
Backed out changeset f63760c845f3 (bug 1648545)
Backed out changeset 652b48b10d37 (bug 1648545)
Backed out changeset 1ca7abd873d1 (bug 1648545)
2023-05-26 02:12:58 +03:00
Kris Maglione a453f69a01 Bug 1648545: Part 4 - Move ContentPage.spawn to use SpecialPowers rather than ContentTask. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D119451
2023-05-25 22:04:32 +00:00
Kris Maglione beaa713de3 Bug 1648545: Part 3 - Support Assert in SpecialPowers.spawn for xpcshell tests. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D119450
2023-05-25 22:04:31 +00:00
Kris Maglione ea0b4c7e26 Bug 1648545: Part 2 - Load SpecialPowers in XPCShellContentUtils. r=ahal,application-update-reviewers,nalexander
Differential Revision: https://phabricator.services.mozilla.com/D119449
2023-05-25 22:04:31 +00:00
Joel Maher cb13225e7f Bug 1631828 - use mozilla reason when we have a crash, and track by crash, not test. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D177850
2023-05-22 19:59:17 +00:00
Narcis Beleuzu 470ec5633b Backed out changeset 08b45202b9c7 (bug 1631828) for mochitest failres on runreftest.py . CLOSED TREE 2023-05-22 17:42:25 +03:00
Joel Maher 1cd925e555 Bug 1631828 - use mozilla reason when we have a crash, and track by crash, not test. r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D177850
2023-05-22 13:21:57 +00:00
Mark Banner 0666077666 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Mark Banner 91fde42f7b Bug 1826062 - Automatic fixes for Prettier 2.0.5 upgrade. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,owlish
Differential Revision: https://phabricator.services.mozilla.com/D177025
2023-05-20 12:26:49 +00:00
Barret Rennie 84890f54e7 Bug 1832918 - Remove nsIOSFileConstantsService usage from testing/modules/AppData.sys.mjs r=jmaher
Differential Revision: https://phabricator.services.mozilla.com/D177946
2023-05-16 16:32:23 +00:00
CanadaHonk de0de3489c 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 f207574c81 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 1786dc2a9c 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 6e6d163215 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 32fb6a65eb 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 6df2b51cf5 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 57f2b058ba 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