Commit Graph
72 Commits
Author SHA1 Message Date
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
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
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 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 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
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
Mark Banner e3a6e036d7 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 4ef77070ac 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
Mark Banner a2bd8d1bf4 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 1e3410cbdd 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
Mark Banner d22663f0f9 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 a180c6cba3 Backed out changeset 528295e7cb0c (bug 1758476) for causing tabswitch failures CLOSED TREE 2022-03-14 12:27:48 -04:00
Mark Banner beed912c8e 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
Florian Quèze 9ec1ba97b1 Bug 1754015 - Assert.jsm should throw when comparing a NaN number, r=Gijs.
Differential Revision: https://phabricator.services.mozilla.com/D138041
2022-02-16 09:56:34 +00:00
criss e345f72ff8 Backed out 3 changesets (bug 1754015, bug 1754012) for causing failures on test_nsIX509CertValidity.js. CLOSED TREE
Backed out changeset 6928edee3bbc (bug 1754012)
Backed out changeset 6792032bd169 (bug 1754012)
Backed out changeset 8f11731d9aee (bug 1754015)
2022-02-08 13:42:46 +02:00
Florian Quèze 1f0fb01fe7 Bug 1754015 - Assert.jsm should throw when comparing a NaN number, r=Gijs.
Differential Revision: https://phabricator.services.mozilla.com/D138041
2022-02-08 10:35:50 +00:00
Julien Wajsberg 56df894f1f Bug 1690631 - Add string matching helpers to Assert.jsm r=Gijs
This adds Assert.stringContains and Assert.stringMatches.

Differential Revision: https://phabricator.services.mozilla.com/D104254
2021-02-11 17:59:03 +00:00
Joel Maher b5ff176f81 Bug 1654553 - fix browser chrome tests to support Object.is instead of ==. r=gbrown,preferences-reviewers,Gijs,rpl
fix browser chrome tests to support Object.is instead of ==

Differential Revision: https://phabricator.services.mozilla.com/D84539
2020-07-27 17:02:35 +00:00
Kris Maglione 9bddbcfdd1 Bug 1649221: Update ChromeUtils.generateQI callers to pass strings. r=mccr8,remote-protocol-reviewers,marionette-reviewers,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,preferences-reviewers,agi,whimboo,Bebe,twisniewski
Differential Revision: https://phabricator.services.mozilla.com/D81594
2020-07-10 23:58:28 +00:00
Mark Banner d375cfec54 Bug 1620542 - Automatically fix ESLint errors in .eslintrc.js files. r=mossop
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D65703
2020-03-07 10:09:44 +00:00
Geoff Brown ca663966b3 Bug 1614640 - Improve reftest suite_start data to provide consistent group/manifest names even when not run-by-manifest; r=ahal
Reftest-family test suites can be "run-by-manifest" (reftest-plain, on desktop), or not
(all reftest-family suites on Android, crashtest and jsreftest on desktop). When not
run-by-manifest, code in reftest.jsm is used to format the suite_start data; when
run-by-manifest, code in runreftest.py is used. Currently, the reftest.jsm implementation
submits a simple array of test IDs -- no associated manifests -- possibly consistent with
the concept that tests are not being run/grouped by manifest.

This patch updates the reftest.jsm implementation to generate the same format of
suite_start data as the python implementation: An array of dictionaries mapping
manifest IDs to arrays of associated test IDs.

Differential Revision: https://phabricator.services.mozilla.com/D63875
2020-02-26 22:34:44 +00:00
Geoff Brown 21938a9638 Bug 1582785 - Enable some xpcshell tests on Android; r=geckoview-reviewers,agi
Most of these tests have been disabled for a long time; they run well
in the current test environment.

Differential Revision: https://phabricator.services.mozilla.com/D46642
2019-09-23 22:43:55 +00:00
Victor Porof 5a4a810e4d Bug 1561435 - Format testing/, a=automatic-formatting
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D35962
2019-07-05 11:01:24 +02:00
Ian Moody 9a71b08d20 Bug 1541025 - testing/ automated ESLint no-throw-literal fixes. r=jmaher
Result of running:
$ mach eslint -funix testing/ | sed -Ee 's/:.+//' - | xargs sed -E \
    -e 's/throw ((["`])[^"]+\2);/throw new Error(\1);/g' \
    -e 's/throw ((["`])[^"]+\2 \+ [^ ";]+);/throw new Error(\1);/g' \
    -e 's/throw \(/throw new Error(/g' -i

Differential Revision: https://phabricator.services.mozilla.com/D25758
2019-04-02 13:44:16 +00:00
Gijs Kruitbosch bb0958915c Bug 1541958 - remove nsIUserInfo which is unused, r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D26212
2019-04-04 20:09:34 +00:00
Mark Banner d5029e0dae Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D23850
2019-03-28 09:38:14 +00:00
Kris Maglione 856fa07b17 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
2019-01-17 10:18:31 -08:00
Mark Banner 3d6aaad3f5 Bug 1486741 - Enable ESLint rule comma-dangle for all of mozilla-central (automatic fixes). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D8389
2018-10-19 12:55:39 +00:00
Mark Banner 66456fdd15 Bug 1452706 - Make the 'expected' argument to Assert.throws/rejects required rather than optional. r=mikedeboer
MozReview-Commit-ID: 25flGw5sWga
2018-06-01 14:33:31 +01:00
Coroiu Cristina aba0081bbd Backed out 3 changesets (bug 1452706) for xpcshell failures at devtools/server/tests/unit/test_format_command.js
Backed out changeset 6abc5dc6baaf (bug 1452706)
Backed out changeset 4fbd34b0807a (bug 1452706)
Backed out changeset 626c790eb6f3 (bug 1452706)
2018-07-04 21:20:21 +03:00
Mark Banner 77e86411e0 Bug 1452706 - Make the 'expected' argument to Assert.throws/rejects required rather than optional. r=mikedeboer
MozReview-Commit-ID: 25flGw5sWga
2018-06-01 14:33:31 +01:00
Kris Maglione fd7e9e6a69 Bug 1456035: Part 4 - Convert callers of XPCOMUtils.generateQI to ChromeUtils.generateQI. r=mccr8
This also removes any redundant Ci.nsISupports elements in the interface
lists.

This was done using the following script:

https://bitbucket.org/kmaglione/m-c-rewrites/src/acecb401b76cfcc6ff7f0ba3ae69929955716152/processors/chromeutils-generateQI.jsm

MozReview-Commit-ID: AIx10P8GpZY
2018-04-22 20:55:06 -07:00
Thom Chiovoloni cc4865fffe Bug 1439772 - Avoid truncating operands when reporting failure for Assert.deepEqual r=mikedeboer
MozReview-Commit-ID: 1hlYFE3Xcwn
2018-02-20 18:17:16 -05:00
Andrew McCreight 272cee1e65 Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG
2018-02-06 09:36:57 -08:00
Kris Maglione 0bb74efdf1 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
https://bitbucket.org/kmaglione/m-c-rewrites/src/37e3803c7a23385bab5ea077ba8692bcfe1608fc/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Cosmin Sabou f09d6d985d 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 fd67f090b2 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
https://bitbucket.org/kmaglione/m-c-rewrites/src/37e3803c7a23385bab5ea077ba8692bcfe1608fc/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Brindusan Cristian 483ba301cb 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 683a97d172 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
https://bitbucket.org/kmaglione/m-c-rewrites/src/37e3803c7a23385bab5ea077ba8692bcfe1608fc/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl
2018-01-29 15:20:18 -08:00
Dan Banner 503979c95a Bug 1367704 - Enable the semi ESLint rule across the tree. r=standard8
MozReview-Commit-ID: GrlcOI9K2hJ
2017-05-28 19:57:46 +01:00
Eric Rahm 4d399e631a Bug 1389598 - Part 4: Remove remaining gonk refs. r=froydnj 2017-08-11 17:45:18 -07:00
Geoff Brown af6269644d Bug 1375678 - Enable eslint on testing/modules - additional changes; r=standard8 2017-06-23 15:08:04 -06:00
Geoff Brown 0a70da2e30 Bug 1375678 - Enable lint on testing/modules - mechanical changes; r=standard8 2017-06-23 15:08:02 -06:00
Florian Quèze d0406d270c Bug 1374282 - script generated patch to remove Task.jsm calls, r=Mossop. 2017-06-22 12:51:42 +02:00
Sebastian Hengst a7e0b60a11 Backed out changeset cc96b54811f6 (bug 1357625) for failing xpcshell's test_PromiseUtils.js. r=backout 2017-04-19 16:29:47 +02:00
Mark Hammond 83fa644b0a Bug 1357625 - Have Assert.rejects resolve with the expected exception. r=mikedeboer
MozReview-Commit-ID: FJ31cd5pgul
2017-04-19 12:51:43 +10:00